diff src/menu_tree.asm @ 240:633c7a6de5bc

auto-select correct ccr menu
author heinrichsweikamp
date Mon, 02 Mar 2015 10:54:00 +0100
parents e2ea74646127
children ee81f46714cb
line wrap: on
line diff
--- a/src/menu_tree.asm	Sun Mar 01 21:10:14 2015 +0100
+++ b/src/menu_tree.asm	Mon Mar 02 10:54:00 2015 +0100
@@ -72,8 +72,11 @@
     bcf     menu_show_sensors           ; Clear flag
     bcf     menu_show_sensors2          ; Clear flag
     btfsc   analog_o2_input
-    bra     do_ccr_menu_c3
-    MENU_BEGIN  tCCRSetup, .5
+    bra     do_ccr_menu_cR
+    btfss   optical_input
+    bra     do_ccr_menu_ostc2
+
+    MENU_BEGIN  tCCRSetup, .5          ; OSTC3 menu
         MENU_OPTION     tCCRMode,    oCCRMode,    0
         MENU_CALL       tCCRSensor,             do_ccr_sensor
         MENU_CALL       tDiluentSetup,          do_diluent_setup
@@ -81,7 +84,7 @@
         MENU_CALL       tExit,                  do_continue_main_menu
     MENU_END
 
-do_ccr_menu_c3:                         ; including "Calibrate"
+do_ccr_menu_cR:                         ; cR menu
     MENU_BEGIN  tCCRSetup, .6
         MENU_OPTION     tCCRMode,    oCCRMode,    0
         MENU_CALL       tCCRSensor,             do_ccr_sensor
@@ -91,6 +94,14 @@
         MENU_CALL       tExit,                  do_continue_main_menu
     MENU_END
 
+do_ccr_menu_ostc2:
+    MENU_BEGIN  tCCRSetup, .3           ; ostc2 menu
+        MENU_CALL       tDiluentSetup,          do_diluent_setup
+        MENU_CALL       tFixedSetpoints,        do_fixed_setpoints
+        MENU_CALL       tExit,                  do_continue_main_menu
+    MENU_END
+
+
 do_calibrate_menu:
     call    enable_ir_s8                ; Enable IR/S8-Port
     bsf     menu_show_sensors2          ; Set flag