comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 550:9e20de11fb78

GF warning in logbook memory
author heinrichsweikamp
date Thu, 02 Feb 2012 19:42:56 +0100
parents 3091628b2742
children 80a1d2d5a9ee
comparison
equal deleted inserted replaced
548:c35473dc6831 550:9e20de11fb78
247 movff max_pressure+0,apnoe_max_pressure+0 247 movff max_pressure+0,apnoe_max_pressure+0
248 movff max_pressure+1,apnoe_max_pressure+1 248 movff max_pressure+1,apnoe_max_pressure+1
249 return 249 return
250 250
251 set_leds_divemode: 251 set_leds_divemode:
252 movff char_O_gradient_factor,lo ; gradient factor absolute 252 movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model)
253 253 movff char_I_deco_model,hi
254 GETCUSTOM8 d'14' ; threshold for LED warning 254 decfsz hi,F ; jump over next line if char_I_deco_model == 1
255 cpfslt lo ;
256 call warn_gf1 ; show warning, set flags
257
258 movff char_I_deco_model,lo
259 decfsz lo,W ; jump over return if char_I_deco_model == 1
260 return
261
262 movff char_O_relative_gradient_GF,lo ; gradient factor relative (GF model) 255 movff char_O_relative_gradient_GF,lo ; gradient factor relative (GF model)
263 256
264 GETCUSTOM8 d'14' ; threshold for LED warning 257 GETCUSTOM8 d'14' ; threshold for LED warning into WREG
265 cpfslt lo ; 258 cpfslt lo ; Lower then actual warning?
266 call warn_gf1 ; show warning, set flags 259 rcall warn_gf1 ; No, show warning and set flags
267 260 return ; Yes, return
268 return
269 261
270 warn_gf1: 262 warn_gf1:
271 movlw d'2' ; Type of Alarm 263 movlw d'2' ; Type of Alarm
272 movwf AlarmType ; Copy to Alarm Register 264 movwf AlarmType ; Copy to Alarm Register
273 bsf event_occured ; Set Event Flag 265 bsf event_occured ; Set Event Flag