comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 21:73014f788032

1.60 stable rc1
author heinrichsweikamp
date Wed, 21 Apr 2010 17:37:30 +0200
parents 01510acaeb11
children 70215309143d 99512945c7a1
comparison
equal deleted inserted replaced
20:8824446f7241 21:73014f788032
232 movff max_pressure+0,apnoe_max_pressure+0 232 movff max_pressure+0,apnoe_max_pressure+0
233 movff max_pressure+1,apnoe_max_pressure+1 233 movff max_pressure+1,apnoe_max_pressure+1
234 return 234 return
235 235
236 set_leds_divemode: 236 set_leds_divemode:
237 call clear_LEDy ; LEDy OFF 237 bcf LED_red ; LEDy OFF
238 movff char_O_gradient_factor,lo ; gradient factor absolute 238 movff char_O_gradient_factor,lo ; gradient factor absolute
239 239
240 GETCUSTOM8 d'14' ; threshold for LED warning 240 GETCUSTOM8 d'14' ; threshold for LED warning
241 cpfslt lo ; 241 cpfslt lo ;
242 call warn_gf1 ; show warning, set flags 242 call warn_gf1 ; show warning, set flags
243 243
244 btfsc ppO2_warn_value ; warn because of too high ppO2? 244 btfsc ppO2_warn_value ; warn because of too high ppO2?
245 call set_LEDy ; Yes 245 bsf LED_red ; Yes
246 246
247 movff char_I_deco_model,lo 247 movff char_I_deco_model,lo
248 decfsz lo,W ; jump over return if char_I_deco_model == 1 248 decfsz lo,W ; jump over return if char_I_deco_model == 1
249 return 249 return
250 250
253 GETCUSTOM8 d'14' ; threshold for LED warning 253 GETCUSTOM8 d'14' ; threshold for LED warning
254 cpfslt lo ; 254 cpfslt lo ;
255 call warn_gf1 ; show warning, set flags 255 call warn_gf1 ; show warning, set flags
256 256
257 btfsc ppO2_warn_value ; warn because of too high ppO2? 257 btfsc ppO2_warn_value ; warn because of too high ppO2?
258 call set_LEDy ; Yes 258 bsf LED_red ; Yes
259 259
260 return 260 return
261 261
262 warn_gf1: 262 warn_gf1:
263 call set_LEDy ; LED Yellow on 263 bsf LED_red ; LED Yellow on
264 movlw d'2' ; Type of Alarm 264 movlw d'2' ; Type of Alarm
265 movwf AlarmType ; Copy to Alarm Register 265 movwf AlarmType ; Copy to Alarm Register
266 bsf event_occured ; Set Event Flag 266 bsf event_occured ; Set Event Flag
267 return 267 return
268 268
515 515
516 store_dive_data: ; CF20 seconds gone 516 store_dive_data: ; CF20 seconds gone
517 bcf store_sample ; update only any CF20 seconds 517 bcf store_sample ; update only any CF20 seconds
518 bsf update_divetime ; update divemins every CF20 seconds 518 bsf update_divetime ; update divemins every CF20 seconds
519 519
520 call clear_LEDg ; LEDg off 520 bcf LED_red ; LEDr off (Marker)
521 521
522 btfsc header_stored ; Header already stored? 522 btfsc header_stored ; Header already stored?
523 bra store_dive_data2 ; Yes, store only profile data 523 bra store_dive_data2 ; Yes, store only profile data
524 bsf header_stored ; Store header 524 bsf header_stored ; Store header
525 525
1293 movff hi,EEDATA 1293 movff hi,EEDATA
1294 call write_eeprom ; Highbyte 1294 call write_eeprom ; Highbyte
1295 1295
1296 change_logbook_offset2: 1296 change_logbook_offset2:
1297 bcf simulatormode_active ; if we were in simulator mode 1297 bcf simulatormode_active ; if we were in simulator mode
1298 call clear_LEDusb 1298 bcf LED_blue
1299 1299
1300 end_dive_common: 1300 end_dive_common:
1301 btfsc restore_deco_data ; Restore decodata? 1301 btfsc restore_deco_data ; Restore decodata?
1302 call simulator_restore_tissue_data ; Yes! 1302 call simulator_restore_tissue_data ; Yes!
1303 1303
1625 read_int_eeprom d'36' ; Read mix 1 ppO2 1625 read_int_eeprom d'36' ; Read mix 1 ppO2
1626 btfsc FLAG_const_ppO2_mode 1626 btfsc FLAG_const_ppO2_mode
1627 movff EEDATA,char_I_const_ppO2 ; Set ppO2 setpoint if in ppO2 mode 1627 movff EEDATA,char_I_const_ppO2 ; Set ppO2 setpoint if in ppO2 mode
1628 movff EEDATA, ppO2_setpoint_store ; Store also in this byte... 1628 movff EEDATA, ppO2_setpoint_store ; Store also in this byte...
1629 1629
1630 call clear_LEDnofly ; Clear flags 1630 bcf LED_blue
1631 bcf low_battery_state ; clear flag for battery warning mode 1631 bcf low_battery_state ; clear flag for battery warning mode
1632 bcf header_stored 1632 bcf header_stored
1633 bcf premenu 1633 bcf premenu
1634 bcf realdive 1634 bcf realdive
1635 bsf update_divetime ; set flag 1635 bsf update_divetime ; set flag