Moved FEATURE_GARAGE into config-system

This commit is contained in:
CommanderRedYT
2022-01-17 15:41:47 +01:00
parent fa4aeac27d
commit c44e683941
10 changed files with 13 additions and 14 deletions

View File

@ -70,7 +70,6 @@ set(BOBBYCAR_BUILDFLAGS
-DFEATURE_LEDBACKLIGHT
-DPINS_LEDBACKLIGHT=23
-DLEDBACKLIGHT_INVERTED
-DFEATURE_GARAGE
-DFEATURE_NTP
-DFEATURE_WIRELESS_CONFIG
-DPINS_LEDSTRIP=33

View File

@ -63,7 +63,6 @@ set(BOBBYCAR_BUILDFLAGS
-DFEATURE_LEDBACKLIGHT
-DPINS_LEDBACKLIGHT=23
-DLEDBACKLIGHT_INVERTED
-DFEATURE_GARAGE
# -DFEATURE_NTP
-DFEATURE_WIRELESS_CONFIG
-DPINS_LEDSTRIP=33

View File

@ -61,7 +61,6 @@ set(BOBBYCAR_BUILDFLAGS
-DFEATURE_LEDBACKLIGHT
-DPINS_LEDBACKLIGHT=23
-DLEDBACKLIGHT_INVERTED
# -DFEATURE_GARAGE
-DFEATURE_NTP
-DFEATURE_WIRELESS_CONFIG
-DPINS_LEDSTRIP=26

View File

@ -61,7 +61,6 @@ set(BOBBYCAR_BUILDFLAGS
-DFEATURE_LEDBACKLIGHT
-DPINS_LEDBACKLIGHT=23
-DLEDBACKLIGHT_INVERTED
# -DFEATURE_GARAGE
# -DFEATURE_NTP
-DFEATURE_WIRELESS_CONFIG
-DPINS_LEDSTRIP=33

View File

@ -70,7 +70,6 @@ set(BOBBYCAR_BUILDFLAGS
# -DFEATURE_LEDBACKLIGHT
# -DPINS_LEDBACKLIGHT=23
# -DLEDBACKLIGHT_INVERTED
# -DFEATURE_GARAGE
# -DFEATURE_NTP
# -DFEATURE_WIRELESS_CONFIG
-DPINS_LEDSTRIP=33

View File

@ -61,7 +61,6 @@ set(BOBBYCAR_BUILDFLAGS
-DFEATURE_LEDBACKLIGHT
-DPINS_LEDBACKLIGHT=23
-DLEDBACKLIGHT_INVERTED
-DFEATURE_GARAGE
# -DFEATURE_NTP
-DFEATURE_WIRELESS_CONFIG
-DPINS_LEDSTRIP=33

View File

@ -1,4 +1,4 @@
#if defined(FEATURE_GARAGE) && defined (FEATURE_ESPNOW)
#ifdef FEATURE_ESPNOW
#include "garagenmenu.h"
// 3rd party libs

View File

@ -1,7 +1,6 @@
#pragma once
#if defined(FEATURE_GARAGE) && defined (FEATURE_ESPNOW)
#ifdef FEATURE_ESPNOW
// local includes
#include "displays/bobbymenudisplay.h"

View File

@ -21,7 +21,7 @@
#include "displays/menus/demosmenu.h"
#include "displays/menus/greenpassmenu.h"
#include "displays/lockscreen.h"
#if defined(FEATURE_GARAGE) && defined (FEATURE_ESPNOW)
#ifdef FEATURE_ESPNOW
#include "displays/menus/garagenmenu.h"
#endif
#include "displays/menus/otamenu.h"
@ -98,8 +98,11 @@ MainMenu::MainMenu()
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETTINGS>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&bobbyicons::settings>>>(); }
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GREENPASS>, SwitchScreenAction<GreenPassMenu>, StaticMenuItemIcon<&bobbyicons::greenpass>>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LOCKVEHICLE>, SwitchScreenAction<Lockscreen>, StaticMenuItemIcon<&bobbyicons::lock>>>();
#if defined(FEATURE_GARAGE) && defined (FEATURE_ESPNOW)
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GARAGE>, SwitchScreenAction<GarageMenu>>>(); }
#ifdef FEATURE_ESPNOW
if (configs.feature.garage.value)
{
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GARAGE>, SwitchScreenAction<GarageMenu>>>(); }
}
#endif
#ifdef FEATURE_OTA
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UPDATE>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&bobbyicons::update>>>(); }

View File

@ -297,6 +297,7 @@ public:
struct {
ConfigWrapper<bool> ledstrip {false, DoReset, {}, "f_ledstrip" };
ConfigWrapper<bool> webserver_disable_lock{false, DoReset, {}, "f_no_web_lock" };
ConfigWrapper<bool> garage {false, DoReset, {}, "f_garage" };
ConfigWrapper<bool> gschissene_diode {false, DoReset, {}, "f_gschissDiode" };
} feature;
@ -580,12 +581,14 @@ public:
\
x(feature.gschissene_diode) \
x(feature.ledstrip) \
x(feature.webserver_disable_lock)
x(feature.webserver_disable_lock) \
x(feature.garage)
//x(bleSettings.bleEnabled)
#define FEATURES(x) \
x(feature.ledstrip) \
x(feature.webserver_disable_lock)
x(feature.webserver_disable_lock) \
x(feature.garage)
template<typename T>
void callForEveryConfig(T &&callback)