Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 1027:158100a84ebd | 1028:3d9552e4997c |
|---|---|
| 109 void get_globalStateList(SStateList *output); | 109 void get_globalStateList(SStateList *output); |
| 110 void set_globalState_Menu_Page(uint8_t page); | 110 void set_globalState_Menu_Page(uint8_t page); |
| 111 void set_globalState_Menu_Line(uint8_t line); | 111 void set_globalState_Menu_Line(uint8_t line); |
| 112 uint8_t get_globalState_Menu_Line(void); | 112 uint8_t get_globalState_Menu_Line(void); |
| 113 void get_idSpecificStateList(uint32_t id, SStateList *output); | 113 void get_idSpecificStateList(uint32_t id, SStateList *output); |
| 114 uint8_t get_lineOfID(uint32_t id); | |
| 114 void delayMicros(uint32_t micros); | 115 void delayMicros(uint32_t micros); |
| 115 void get_RTC_DateTime(RTC_DateTypeDef * sdatestructureget, RTC_TimeTypeDef * stimestructureget); | 116 void get_RTC_DateTime(RTC_DateTypeDef * sdatestructureget, RTC_TimeTypeDef * stimestructureget); |
| 116 void set_RTC_DateTime(RTC_DateTypeDef * sdatestructure, RTC_TimeTypeDef * stimestructure); | 117 void set_RTC_DateTime(RTC_DateTypeDef * sdatestructure, RTC_TimeTypeDef * stimestructure); |
| 117 uint8_t get_globalMode(void); | 118 uint8_t get_globalMode(void); |
| 118 void set_globalMode(uint8_t newMode); | 119 void set_globalMode(uint8_t newMode); |
