Mercurial > public > hwos_code
comparison src/divemode.asm @ 339:692903c50788
minor: fix calc_deko_divemode_sensor
author | heinrichsweikamp |
---|---|
date | Fri, 03 Jul 2015 15:08:15 +0200 |
parents | 2811932b4e99 |
children | 5c6da9fa5cb0 |
comparison
equal
deleted
inserted
replaced
338:2811932b4e99 | 339:692903c50788 |
---|---|
371 | 371 |
372 movlw .2 ; Restart countdown. | 372 movlw .2 ; Restart countdown. |
373 movwf apnoe_mins | 373 movwf apnoe_mins |
374 return ; done. | 374 return ; done. |
375 | 375 |
376 calc_deko_divemode_sensor_done: | |
377 calc_deko_divemode_sensor: ; External sensor stuff | 376 calc_deko_divemode_sensor: ; External sensor stuff |
378 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP | 377 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP |
379 sublw .1 ; opt_ccr_mode = 1 (Sensor)? | 378 sublw .1 ; opt_ccr_mode = 1 (Sensor)? |
380 bnz calc_deko_divemode_sensor_done ; No, return | 379 bnz calc_deko_divemode_sensor_done ; No, return |
381 | 380 |
396 btfsc use_O2_sensor3 | 395 btfsc use_O2_sensor3 |
397 return ; At least one sensor is active, no fallback | 396 return ; At least one sensor is active, no fallback |
398 ; No sensor in use -> fallback | 397 ; No sensor in use -> fallback |
399 movff char_I_setpoint_cbar+0,char_I_const_ppO2 ; Setup fixed Setpoint (Always fallback to SP1), overwrite sensor result | 398 movff char_I_setpoint_cbar+0,char_I_const_ppO2 ; Setup fixed Setpoint (Always fallback to SP1), overwrite sensor result |
400 bsf setpoint_fallback ; =1: Fallback to SP1 due to external O2 sensor failure | 399 bsf setpoint_fallback ; =1: Fallback to SP1 due to external O2 sensor failure |
400 calc_deko_divemode_sensor_done: | |
401 return | 401 return |
402 | 402 |
403 ;----------------------------------------------------------------------------- | 403 ;----------------------------------------------------------------------------- |
404 | 404 |
405 divemodemode_togglegf: ; Toggle aGF/GF | 405 divemodemode_togglegf: ; Toggle aGF/GF |