# HG changeset patch # User heinrichsweikamp # Date 1438615625 -7200 # Node ID 2be48ccfa9de531189d54fbd2dd9958349f229c7 # Parent 366f8b31f2224e1049ec2af808729eb235d95ae7 make AUTO SP available on OSTC2 hardware diff -r 366f8b31f222 -r 2be48ccfa9de src/menu_tree.asm --- a/src/menu_tree.asm Mon Aug 03 12:18:18 2015 +0200 +++ b/src/menu_tree.asm Mon Aug 03 17:27:05 2015 +0200 @@ -96,7 +96,8 @@ MENU_END do_ccr_menu_ostc2: - MENU_BEGIN tCCRSetup, .3 ; ostc2 menu + MENU_BEGIN tCCRSetup, .4 ; ostc2 menu + MENU_OPTION tCCRMode, oCCRMode, 0 MENU_CALL tDiluentSetup, do_diluent_setup MENU_CALL tFixedSetpoints, do_fixed_setpoints MENU_CALL tExit, do_continue_main_menu diff -r 366f8b31f222 -r 2be48ccfa9de src/start.asm --- a/src/start.asm Mon Aug 03 12:18:18 2015 +0200 +++ b/src/start.asm Mon Aug 03 17:27:05 2015 +0200 @@ -351,6 +351,19 @@ decfsz lo,F bra restart_set_modes_and_flags3 ; CC Mode + btfsc analog_o2_input ; cR? + bra restart_set_modes_and_flags2b ; Yes, skip mode check + btfsc optical_input ; 3 + bra restart_set_modes_and_flags2b ; Yes, skip mode check + ; Make sure Sensor is not selected + ; opt_ccr_mode must be <> 1 (=0: Fixed SP, =1: Sensor, =2: Auto SP) + banksel opt_ccr_mode + movlw .1 + cpfseq opt_ccr_mode ; = Sensor? + bra restart_set_modes_and_flags2b ; No + clrf opt_ccr_mode ; Yes, reset to Fixed SP +restart_set_modes_and_flags2b: + banksel common bsf FLAG_ccr_mode ; =1: CCR mode (Fixed SP, Auto SP or Sensor) active call enable_ir_s8 ; Enable IR/S8-Port return