Mercurial > public > hwos_code
diff src/divemode.asm @ 113:f3062a611eef
Merge
author | heinrichsweikamp |
---|---|
date | Mon, 23 Jun 2014 16:14:33 +0200 |
parents | c61b7a4e317c |
children | 35b9da423de6 |
line wrap: on
line diff
--- a/src/divemode.asm Tue Jun 17 12:10:33 2014 +0200 +++ b/src/divemode.asm Mon Jun 23 16:14:33 2014 +0200 @@ -23,6 +23,7 @@ #include "adc_lightsensor.inc" #include "ghostwriter.inc" #include "i2c.inc" +#include "calibrate.inc" gui CODE @@ -101,6 +102,8 @@ ; btfsc FLAG_ccr_mode ; In CCR mode ; call TFT_active_gas_divemode ; Update Setpoint every second + call compute_ppo2 ; compute mv_sensorX and ppo2_sensorX arrays + bcf onesecupdate ; one seconds update done diveloop_loop3: @@ -248,7 +251,7 @@ set_actual_ppo2_dive: SAFE_2BYTE_COPY amb_pressure, xA ; P_amb in millibar (1000 = 1.00 bar). set_actual_ppo2_common: - movlw d'10' + movlw d'10' movwf xB+0 clrf xB+1 call div16x16 ; xC=p_amb/10 (100 = 1.00 bar). @@ -367,7 +370,7 @@ clrf xB+1 clrf xA+0 clrf xA+1 - btfss hud_status_byte,3 ; Sensor1 active? + btfss sensor1_active ; Sensor1 active? bra divemode_setup_sensor_values2 ; No movf o2_ppo2_sensor1,W addwf xA+0 @@ -375,7 +378,7 @@ addwfc xA+1 ; Add into xA:2 incf xB+0,F ; Add a sensor divemode_setup_sensor_values2: - btfss hud_status_byte,4 ; Sensor2 active? + btfss sensor2_active ; Sensor2 active? bra divemode_setup_sensor_values3 ; No movf o2_ppo2_sensor2,W addwf xA+0 @@ -383,7 +386,7 @@ addwfc xA+1 ; Add into xA:2 incf xB+0,F ; Add a sensor divemode_setup_sensor_values3: - btfss hud_status_byte,5 ; Sensor3 active? + btfss sensor3_active ; Sensor3 active? bra divemode_setup_sensor_values4 ; No movf o2_ppo2_sensor3,W addwf xA+0