Mercurial > public > ostc4
comparison Discovery/Src/tMenuEdit.c @ 718:b9f699d2e3d0
Updated menu structure to support new sensor information page:
The sensor information page has been added to the sensor submenu of the hardware menu. It will be shown dynamically in case a smart sensor is detected. In order to have this dynamic visualization some new functions had to be added to the general menu file. The information page returns to the sensor menu, for this behavior also a new function had to be added.
author | Ideenmodellierer |
---|---|
date | Sun, 20 Nov 2022 20:49:41 +0100 |
parents | e81afd727993 |
children | 190e5814b2f5 |
comparison
equal
deleted
inserted
replaced
717:88f73b05d45c | 718:b9f699d2e3d0 |
---|---|
31 | 31 |
32 #include "externLogbookFlash.h" | 32 #include "externLogbookFlash.h" |
33 #include "gfx_fonts.h" | 33 #include "gfx_fonts.h" |
34 #include "tHome.h" | 34 #include "tHome.h" |
35 #include "tInfoCompass.h" | 35 #include "tInfoCompass.h" |
36 #include "tInfoSensor.h" | |
36 #include "tMenuEditHardware.h" | 37 #include "tMenuEditHardware.h" |
37 #include "tMenuEditPlanner.h" | 38 #include "tMenuEditPlanner.h" |
38 #include "tMenuEditSystem.h" | 39 #include "tMenuEditSystem.h" |
39 #include "tMenuEditXtra.h" | 40 #include "tMenuEditXtra.h" |
40 #include "tMenuEditCustom.h" | 41 #include "tMenuEditCustom.h" |
203 void (*refreshFct)() = NULL; | 204 void (*refreshFct)() = NULL; |
204 | 205 |
205 | 206 |
206 switch(globState) | 207 switch(globState) |
207 { | 208 { |
209 case (StMHARD3_O2_Sensor1): | |
208 case (StMHARD3_O2_Sensor1 & MaskFieldDigit): | 210 case (StMHARD3_O2_Sensor1 & MaskFieldDigit): |
209 case (StMHARD3_O2_Calibrate): | 211 case (StMHARD3_O2_Calibrate): |
210 case (StMHARD3_O2_Source): refreshFct = refresh_O2Sensors; | 212 case (StMHARD3_O2_Source): refreshFct = refresh_O2Sensors; |
211 break; | 213 break; |
212 case (StMHARD2_Compass_SetCourse & MaskFieldDigit): refreshFct = refresh_CompassEdit; | 214 case (StMHARD2_Compass_SetCourse & MaskFieldDigit): refreshFct = refresh_CompassEdit; |
213 break; | 215 break; |
214 /* case (StMXTRA_CompassHeading & MaskFieldDigit): StMXTRA_CompassHeading and StMXTRA_PSCR_O2_Drop share the same menu ID => select function based on divemode */ | 216 /* case (StMXTRA_CompassHeading & MaskFieldDigit): StMXTRA_CompassHeading and StMXTRA_PSCR_O2_Drop share the same menu ID => select function based on divemode */ |
215 case (StMXTRA_PSCR_O2_Drop & MaskFieldDigit): | 217 case (StMXTRA_PSCR_O2_Drop & MaskFieldDigit): |
340 { | 342 { |
341 exitMenuEdit(1); | 343 exitMenuEdit(1); |
342 openInfo_Compass(); | 344 openInfo_Compass(); |
343 } | 345 } |
344 | 346 |
347 void exitMenuEdit_to_InfoSensor(void) | |
348 { | |
349 exitMenuEdit(1); | |
350 openInfo_Sensor(); | |
351 } | |
352 | |
345 | 353 |
346 void exitMenuEdit_to_Home(void) | 354 void exitMenuEdit_to_Home(void) |
347 { | 355 { |
348 exitMenuEdit(1); | 356 exitMenuEdit(1); |
349 set_globalState_tHome(); | 357 set_globalState_tHome(); |
596 { | 604 { |
597 exitMenuEdit_to_InfoCompassCalibration(); | 605 exitMenuEdit_to_InfoCompassCalibration(); |
598 return; | 606 return; |
599 } | 607 } |
600 | 608 |
609 if(newContent == EXIT_TO_INFO_SENSOR) | |
610 { | |
611 exitMenuEdit_to_InfoSensor(); | |
612 return; | |
613 } | |
601 | 614 |
602 switch(ident[id].maintype) | 615 switch(ident[id].maintype) |
603 { | 616 { |
604 case FIELD_NUMBERS: | 617 case FIELD_NUMBERS: |
605 write_buttonTextline(TXT2BYTE_ButtonMinus,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonPlus); | 618 write_buttonTextline(TXT2BYTE_ButtonMinus,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonPlus); |