Skip to content

Commit

Permalink
Refactor status menu ID
Browse files Browse the repository at this point in the history
  • Loading branch information
NachtRaveVL committed Apr 7, 2023
1 parent af74fdc commit 2fb3140
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/full/HelioduinoUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ HelioduinoFullUI::~HelioduinoFullUI()
void HelioduinoFullUI::addRemote(Helio_RemoteControl rcType, UARTDeviceSetup rcSetup, uint16_t rcServerPort)
{
HelioRemoteControl *remoteControl = nullptr;
menuid_t statusMenuId = -1; // todo

switch (rcType) {
case Helio_RemoteControl_Serial: {
Expand All @@ -285,7 +284,7 @@ void HelioduinoFullUI::addRemote(Helio_RemoteControl rcType, UARTDeviceSetup rcS
} break;

case Helio_RemoteControl_Simhub: {
remoteControl = new HelioRemoteSimhubControl(rcSetup, statusMenuId);
remoteControl = new HelioRemoteSimhubControl(rcSetup, HELIO_UI_SIMHUB_STATUS_MENU_ID);
HELIO_SOFT_ASSERT(remoteControl, SFP(HStr_Err_AllocationFailure));
} break;

Expand Down
3 changes: 1 addition & 2 deletions src/min/HelioduinoUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,7 @@ void HelioduinoMinUI::addSerialRemote(UARTDeviceSetup rcSetup)

void HelioduinoMinUI::addSimhubRemote(UARTDeviceSetup rcSetup)
{
menuid_t statusMenuId = -1; // todo
HelioRemoteControl *remoteControl = new HelioRemoteSimhubControl(rcSetup, statusMenuId);
HelioRemoteControl *remoteControl = new HelioRemoteSimhubControl(rcSetup, HELIO_UI_SIMHUB_STATUS_MENU_ID);
HELIO_SOFT_ASSERT(remoteControl, SFP(HStr_Err_AllocationFailure));

if (remoteControl && remoteControl->getConnection()) {
Expand Down
1 change: 1 addition & 0 deletions src/shared/HelioUIDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#define HELIO_UI_MENU_ITEM_MAG_LEVEL 2 // Menu item font magnification level
#define HELIO_UI_IOT_MONITOR_TEXT "IoT Monitor" // Menu IoT monitor item text, forced PROGMEM
#define HELIO_UI_AUTHENTICATOR_TEXT "Authenticator" // Menu authenticator item text, forced PROGMEM
#define HELIO_UI_SIMHUB_STATUS_MENU_ID INVALID_MENU_ID // Simhub remote status menu item ID

// Default graphical display theme base (CoolBlue, DarkMode) - keep on separate lines
#define HELIO_UI_GFX_DISP_THEME_BASE CoolBlue
Expand Down

0 comments on commit 2fb3140

Please sign in to comment.