Skip to content

Commit 7ee7fe4

Browse files
author
NachtRaveVL
committed
Refactor status menu ID
1 parent a0d41b6 commit 7ee7fe4

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/full/HydruinoUI.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ HydruinoFullUI::~HydruinoFullUI()
276276
void HydruinoFullUI::addRemote(Hydro_RemoteControl rcType, UARTDeviceSetup rcSetup, uint16_t rcServerPort)
277277
{
278278
HydroRemoteControl *remoteControl = nullptr;
279-
menuid_t statusMenuId = -1; // todo
280279

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

287286
case Hydro_RemoteControl_Simhub: {
288-
remoteControl = new HydroRemoteSimhubControl(rcSetup, statusMenuId);
287+
remoteControl = new HydroRemoteSimhubControl(rcSetup, HYDRO_UI_SIMHUB_STATUS_MENU_ID);
289288
HYDRO_SOFT_ASSERT(remoteControl, SFP(HStr_Err_AllocationFailure));
290289
} break;
291290

src/min/HydruinoUI.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,7 @@ void HydruinoMinUI::addSerialRemote(UARTDeviceSetup rcSetup)
574574

575575
void HydruinoMinUI::addSimhubRemote(UARTDeviceSetup rcSetup)
576576
{
577-
menuid_t statusMenuId = -1; // todo
578-
HydroRemoteControl *remoteControl = new HydroRemoteSimhubControl(rcSetup, statusMenuId);
577+
HydroRemoteControl *remoteControl = new HydroRemoteSimhubControl(rcSetup, HYDRO_UI_SIMHUB_STATUS_MENU_ID);
579578
HYDRO_SOFT_ASSERT(remoteControl, SFP(HStr_Err_AllocationFailure));
580579

581580
if (remoteControl && remoteControl->getConnection()) {

src/shared/HydroUIDefines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#define HYDRO_UI_MENU_ITEM_MAG_LEVEL 2 // Menu item font magnification level
5252
#define HYDRO_UI_IOT_MONITOR_TEXT "IoT Monitor" // Menu IoT monitor item text, forced PROGMEM
5353
#define HYDRO_UI_AUTHENTICATOR_TEXT "Authenticator" // Menu authenticator item text, forced PROGMEM
54+
#define HYDRO_UI_SIMHUB_STATUS_MENU_ID INVALID_MENU_ID // Simhub remote status menu item ID
5455

5556
// Default graphical display theme base (CoolBlue, DarkMode) - keep on separate lines
5657
#define HYDRO_UI_GFX_DISP_THEME_BASE CoolBlue

0 commit comments

Comments
 (0)