diff Discovery/Inc/base.h @ 1028:3d9552e4997c GasConsumption

Code improvment: line <=> menu id function: In generell the structure of the menus is defined by the tStructure.h using global state defines. In some implementation hardcoded line numbers are used. Risk: In case the order of menu items change the update of other code sections could be forgotten (in the case the update of the top menu) causing unintended behavior. To avoid this the hard coded lines have been replaced by a function connecting the intended function to the menu item defined in the tstructure.h.
author Ideenmodellierer
date Sun, 07 Sep 2025 19:08:43 +0200
parents f29369fff71e
children
line wrap: on
line diff
--- a/Discovery/Inc/base.h	Sun Sep 07 19:03:44 2025 +0200
+++ b/Discovery/Inc/base.h	Sun Sep 07 19:08:43 2025 +0200
@@ -111,6 +111,7 @@
 void set_globalState_Menu_Line(uint8_t line);
 uint8_t get_globalState_Menu_Line(void);
 void get_idSpecificStateList(uint32_t id, SStateList *output);
+uint8_t get_lineOfID(uint32_t id);
 void delayMicros(uint32_t micros);
 void get_RTC_DateTime(RTC_DateTypeDef * sdatestructureget, RTC_TimeTypeDef * stimestructureget);
 void set_RTC_DateTime(RTC_DateTypeDef * sdatestructure, RTC_TimeTypeDef * stimestructure);