Mercurial > public > hwos_code
comparison src/menu_tree.asm @ 657:c2e97f94c55f default tip
bump to 10.93 / 3.32
| author | heinrichsweikamp |
|---|---|
| date | Tue, 27 Jan 2026 11:01:04 +0100 |
| parents | 8af5aefbcdaf |
| children |
comparison
equal
deleted
inserted
replaced
| 656:8af5aefbcdaf | 657:c2e97f94c55f |
|---|---|
| 166 | 166 |
| 167 IFDEF _external_sensor_eccr | 167 IFDEF _external_sensor_eccr |
| 168 | 168 |
| 169 bcf imprint_sensor_mv ; stop imprinting of live O2 sensor mV data | 169 bcf imprint_sensor_mv ; stop imprinting of live O2 sensor mV data |
| 170 btfss ext_input_s8_ana ; S8/analog sensor input available? | 170 btfss ext_input_s8_ana ; S8/analog sensor input available? |
| 171 bra do_menu_ccr_2 ; NO - do OSTC 2 menu | 171 bra do_menu_ccr_2 ; NO - Non-Bulkhead OSTC menu |
| 172 ;bra do_menu_ccr_cR ; YES - do OSTC cR menu | 172 ;bra do_menu_ccr_cR ; YES - do Bulkhead OSTC menu |
| 173 | 173 |
| 174 do_menu_ccr_cR: ; OSTC cR menu | 174 do_menu_ccr_cR: ; Bulkhead OSTC menu |
| 175 MENU_BEGIN tCCRSetup, .6 | 175 MENU_BEGIN tCCRSetup, .7 |
| 176 MENU_OPT_INC tCCRMode, oCCRMode | 176 MENU_OPT_INC tCCRMode, oCCRMode |
| 177 MENU_CALL tCalibrateMenu, do_menu_calibrate | 177 MENU_CALL tCalibrateMenu, do_menu_calibrate |
| 178 MENU_CALL tDiluentSetup, do_menu_diluent | 178 MENU_CALL tDiluentSetup, do_menu_diluent |
| 179 MENU_CALL tFixedSetpoints, do_menu_setpoints | 179 MENU_CALL tFixedSetpoints, do_menu_setpoints |
| 180 MENU_CALL tScrubberTimer, do_menu_scrubbertimer | |
| 180 MENU_CALL tMore, do_menu_ccr_more | 181 MENU_CALL tMore, do_menu_ccr_more |
| 181 MENU_CALL tBack, do_return_main_menu | 182 MENU_CALL tBack, do_return_main_menu |
| 182 MENU_END | 183 MENU_END |
| 183 | 184 |
| 184 ENDIF ; _external_sensor_eccr | 185 ENDIF ; _external_sensor_eccr |
| 185 | 186 |
| 186 do_menu_ccr_2: | 187 do_menu_ccr_2: |
| 187 MENU_BEGIN tCCRSetup, .5 ; OSTC 2 menu | 188 MENU_BEGIN tCCRSetup, .6 ; Non-Bulkhead OSTC menu |
| 188 MENU_OPT_INC tCCRMode, oCCRMode | 189 MENU_OPT_INC tCCRMode, oCCRMode |
| 189 MENU_CALL tDiluentSetup, do_menu_diluent | 190 MENU_CALL tDiluentSetup, do_menu_diluent |
| 190 MENU_CALL tFixedSetpoints, do_menu_setpoints | 191 MENU_CALL tFixedSetpoints, do_menu_setpoints |
| 192 MENU_CALL tScrubberTimer, do_menu_scrubbertimer | |
| 191 MENU_CALL tMore, do_menu_ccr_more | 193 MENU_CALL tMore, do_menu_ccr_more |
| 192 MENU_CALL tBack, do_return_main_menu | 194 MENU_CALL tBack, do_return_main_menu |
| 193 MENU_END | 195 MENU_END |
| 194 | 196 |
| 195 | 197 |
| 196 ;----------------------------------------------------------------------------- | 198 ;----------------------------------------------------------------------------- |
| 197 ; CCR / pSCR Setup - 2nd Level | 199 ; CCR / pSCR Setup - 2nd Level |
| 198 ; | 200 ; |
| 199 do_menu_ccr_more: | 201 do_menu_ccr_more: |
| 200 IFDEF _external_sensor_eccr | 202 IFDEF _external_sensor_eccr |
| 201 MENU_BEGIN tCCRSetup, .7 ; CCR/pSCR more menu | 203 MENU_BEGIN tCCRSetup, .7 ; CCR/pSCR more menu |
| 202 MENU_OPT_INC tS8Mode, oS8Mode | 204 MENU_OPT_INC tS8Mode, oS8Mode |
| 203 MENU_OPT_INC tCCmaxFracO2, oCCmaxFracO2 | 205 MENU_OPT_INC tCCmaxFracO2, oCCmaxFracO2 |
| 204 MENU_OPT_INC tDilppO2Check, oDilppO2Check | 206 MENU_OPT_INC tDilppO2Check, oDilppO2Check |
| 205 MENU_OPT_INC tGasDensityCheck, oGasDensityCheck | 207 MENU_OPT_INC tGasDensityCheck, oGasDensityCheck |
| 206 MENU_OPT_INC tPSCR_O2_drop, oPSCR_drop | 208 MENU_OPT_INC tPSCR_O2_drop, oPSCR_drop |
| 207 MENU_OPT_INC tPSCR_lungratio, oPSCR_lungratio | 209 MENU_OPT_INC tPSCR_lungratio, oPSCR_lungratio |
| 208 MENU_CALL tBack, do_return_menu_ccr | 210 MENU_CALL tBack, do_return_menu_ccr |
| 209 MENU_END | 211 MENU_END |
| 210 ELSE | 212 ELSE |
| 211 MENU_BEGIN tCCRSetup, .6 ; CCR/pSCR more menu | 213 MENU_BEGIN tCCRSetup, .6 ; CCR/pSCR more menu |
| 212 MENU_OPT_INC tCCmaxFracO2, oCCmaxFracO2 | 214 MENU_OPT_INC tCCmaxFracO2, oCCmaxFracO2 |
| 213 MENU_OPT_INC tDilppO2Check, oDilppO2Check | 215 MENU_OPT_INC tDilppO2Check, oDilppO2Check |
| 214 MENU_OPT_INC tGasDensityCheck, oGasDensityCheck | 216 MENU_OPT_INC tGasDensityCheck, oGasDensityCheck |
| 215 MENU_OPT_INC tPSCR_O2_drop, oPSCR_drop | 217 MENU_OPT_INC tPSCR_O2_drop, oPSCR_drop |
| 216 MENU_OPT_INC tPSCR_lungratio, oPSCR_lungratio | 218 MENU_OPT_INC tPSCR_lungratio, oPSCR_lungratio |
| 217 MENU_CALL tBack, do_return_menu_ccr | 219 MENU_CALL tBack, do_return_menu_ccr |
| 218 MENU_END | 220 MENU_END |
| 219 ENDIF ; _external_sensor_eccr | 221 ENDIF ; _external_sensor_eccr |
| 220 | 222 |
| 223 do_menu_scrubbertimer: | |
| 224 MENU_BEGIN tScrubberTimer, .6 ; The scrubber timer menu | |
| 225 MENU_DYNAMIC dyn_Scrubber_Timer, 0 ; Show current value | |
| 226 MENU_DYNAMIC dyn_Scrubber_Date, 0 ; Show last restart date | |
| 227 MENU_CALL tScrubTmrReset, do_resetScrubberTimer ; Reset to Scrubber Timer Time | |
| 228 MENU_OPT_INC tScrubTmrEnable, oEnable_ScrubTmr ; Scrubber Timer enable | |
| 229 MENU_OPT_INC tScrubTmrTime, oScrubTmrTime ; Increase Scrubber Timer Time | |
| 230 MENU_CALL tBack, do_return_menu_ccr | |
| 231 MENU_END | |
| 232 | |
| 233 do_resetScrubberTimer: | |
| 234 movff opt_ScrubberTime,WREG | |
| 235 mullw .10 | |
| 236 MOVII PRODL,opt_scrubber_timer_mins ; opt_ScrubberTime is in 10 minutes increments | |
| 237 SMOVSS rtc_year,rtc_latched_year ; ISR-safe 6 byte copy of date and time | |
| 238 movff rtc_latched_day,opt_scrubber_timer_day | |
| 239 movff rtc_latched_month,opt_scrubber_timer_month | |
| 240 movff rtc_latched_year,opt_scrubber_timer_year ; Store scrubber restart date | |
| 241 return | |
| 242 | |
| 243 ;----------------------------------------------------------------------------- | |
| 244 ; dynamic Title - show current scrubber time | |
| 245 ; | |
| 246 dyn_Scrubber_Timer: | |
| 247 STRCAT_TEXT tScrubTmrRemain ; "Remaining:" | |
| 248 MOVII opt_scrubber_timer_mins,mpr ; Get the minutes into lo:hi | |
| 249 btfss hi,7 ; Negative timer? | |
| 250 bra dyn_Scrubber_Timer2 ; NO | |
| 251 FONT_COLOR_WARNING ; YES - print in Red (If enabled) | |
| 252 STRCAT "-" ; And add a - | |
| 253 dyn_Scrubber_Timer2: | |
| 254 TSTOSS opt_ScrubTmrEnable ; Scrubber Timer Enabled? | |
| 255 FONT_COLOR_DISABLED ; NO - print in disabled color | |
| 256 bcf hi,7 ; Clear sign bit | |
| 257 output_999 | |
| 258 STRCAT_TEXT tMinutes | |
| 259 return ; done | |
| 260 | |
| 261 ;----------------------------------------------------------------------------- | |
| 262 ; dynamic Title - show last restart date | |
| 263 ; | |
| 264 dyn_Scrubber_Date: | |
| 265 STRCAT_TEXT tScrubTmrLast ; "Last restart:" | |
| 266 movff opt_scrubber_timer_year, lo ; copy year to lo | |
| 267 movff opt_scrubber_timer_month,hi ; copy month to hi | |
| 268 movff opt_scrubber_timer_day, up ; copy day to up | |
| 269 call output_date ; print date | |
| 270 return | |
| 271 | |
| 221 ENDIF ; _ccr_pscr | 272 ENDIF ; _ccr_pscr |
| 222 | 273 |
| 223 | 274 |
| 224 IFDEF _external_sensor_eccr | 275 IFDEF _external_sensor_eccr |
| 225 | 276 |
| 1362 ;----------------------------------------------------------------------------- | 1413 ;----------------------------------------------------------------------------- |
| 1363 ; dynamic Title - show Hardware / Software Configuration | 1414 ; dynamic Title - show Hardware / Software Configuration |
| 1364 ; | 1415 ; |
| 1365 dyn_show_config: | 1416 dyn_show_config: |
| 1366 STRCAT_TEXT tHardware ; print text | 1417 STRCAT_TEXT tHardware ; print text |
| 1367 call I2C_init_compass ; start compass to get compass configuration | 1418 ; call I2C_init_compass ; start compass to get compass configuration |
| 1368 movf HW_descriptor,W ; copy hardware descriptor to WREG | 1419 movf HW_descriptor,W ; copy hardware descriptor to WREG |
| 1369 output_hex ; print as hex | 1420 output_hex ; print as hex |
| 1370 movf HW_variants,W ; copy hardware variants to WREG | 1421 movf HW_variants,W ; copy hardware variants to WREG |
| 1371 output_hex ; print as hex | 1422 output_hex ; print as hex |
| 1372 PUTC "-" ; print a separator | 1423 PUTC "-" ; print a separator |
| 1716 do_menu_syssets: | 1767 do_menu_syssets: |
| 1717 btfsc dn_flag ; dn hardware? | 1768 btfsc dn_flag ; dn hardware? |
| 1718 bra do_menu_syssets_dn ; YES | 1769 bra do_menu_syssets_dn ; YES |
| 1719 btfsc dual_comm ; Dual comm hardware? | 1770 btfsc dual_comm ; Dual comm hardware? |
| 1720 bra do_menu_syssets_dual_comm ; YES | 1771 bra do_menu_syssets_dual_comm ; YES |
| 1721 btfsc battery_gauge_available ; piezo buttons available? | 1772 btfsc adjustable_buttons ; piezo buttons available? |
| 1722 bra do_menu_syssets_piezo ; YES | 1773 bra do_menu_syssets_piezo ; YES |
| 1723 | 1774 |
| 1724 do_menu_syssets_dual_comm: | 1775 do_menu_syssets_dual_comm: |
| 1725 do_menu_syssets_mechanical: | 1776 do_menu_syssets_mechanical: |
| 1726 IFDEF _compass | 1777 IFDEF _compass |
