Mercurial > public > hwos_code
comparison src/divemode.asm @ 337:508d7fb98b34
cleanup menu, add "Auto SP" option (Not working yet), minor layout change in compass menu
author | heinrichsweikamp |
---|---|
date | Sun, 28 Jun 2015 13:58:00 +0200 |
parents | 3d43da7acfe1 |
children | 2811932b4e99 |
comparison
equal
deleted
inserted
replaced
336:1318c6cad41b | 337:508d7fb98b34 |
---|---|
368 | 368 |
369 movlw .2 ; Restart countdown. | 369 movlw .2 ; Restart countdown. |
370 movwf apnoe_mins | 370 movwf apnoe_mins |
371 return ; done. | 371 return ; done. |
372 | 372 |
373 calc_deko_divemode_sensor_done: | |
373 calc_deko_divemode_sensor: ; External sensor stuff | 374 calc_deko_divemode_sensor: ; External sensor stuff |
374 TSTOSS opt_ccr_mode ; =0: Fixed SP, =1: Sensor | 375 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP |
375 return | 376 sublw .1 ; opt_ccr_mode = 1 (Sensor)? |
377 bnz calc_deko_divemode_sensor_done ; No, return | |
378 | |
376 rcall divemode_setup_sensor_values ; Setup sensor values | 379 rcall divemode_setup_sensor_values ; Setup sensor values |
377 call check_sensors ; Check O2 sensor thresholds for fallback | 380 call check_sensors ; Check O2 sensor thresholds for fallback |
378 movff sensor_setpoint,char_I_const_ppO2; Copy sensor result | 381 movff sensor_setpoint,char_I_const_ppO2; Copy sensor result |
379 | 382 |
380 TSTOSS opt_sensor_fallback ; =1: Fallback to SP1 when sensor is lost | 383 TSTOSS opt_sensor_fallback ; =1: Fallback to SP1 when sensor is lost |