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 a0d41b6 commit 7ee7fe4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/full/HydruinoUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ HydruinoFullUI::~HydruinoFullUI()
void HydruinoFullUI::addRemote(Hydro_RemoteControl rcType, UARTDeviceSetup rcSetup, uint16_t rcServerPort)
{
HydroRemoteControl *remoteControl = nullptr;
menuid_t statusMenuId = -1; // todo

switch (rcType) {
case Hydro_RemoteControl_Serial: {
Expand All @@ -285,7 +284,7 @@ void HydruinoFullUI::addRemote(Hydro_RemoteControl rcType, UARTDeviceSetup rcSet
} break;

case Hydro_RemoteControl_Simhub: {
remoteControl = new HydroRemoteSimhubControl(rcSetup, statusMenuId);
remoteControl = new HydroRemoteSimhubControl(rcSetup, HYDRO_UI_SIMHUB_STATUS_MENU_ID);
HYDRO_SOFT_ASSERT(remoteControl, SFP(HStr_Err_AllocationFailure));
} break;

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

void HydruinoMinUI::addSimhubRemote(UARTDeviceSetup rcSetup)
{
menuid_t statusMenuId = -1; // todo
HydroRemoteControl *remoteControl = new HydroRemoteSimhubControl(rcSetup, statusMenuId);
HydroRemoteControl *remoteControl = new HydroRemoteSimhubControl(rcSetup, HYDRO_UI_SIMHUB_STATUS_MENU_ID);
HYDRO_SOFT_ASSERT(remoteControl, SFP(HStr_Err_AllocationFailure));

if (remoteControl && remoteControl->getConnection()) {
Expand Down
1 change: 1 addition & 0 deletions src/shared/HydroUIDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#define HYDRO_UI_MENU_ITEM_MAG_LEVEL 2 // Menu item font magnification level
#define HYDRO_UI_IOT_MONITOR_TEXT "IoT Monitor" // Menu IoT monitor item text, forced PROGMEM
#define HYDRO_UI_AUTHENTICATOR_TEXT "Authenticator" // Menu authenticator item text, forced PROGMEM
#define HYDRO_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 HYDRO_UI_GFX_DISP_THEME_BASE CoolBlue
Expand Down

0 comments on commit 7ee7fe4

Please sign in to comment.