comparison src/divemode.asm @ 307:14719662fb95 new_screen_layout

Merged Screen layout work #4 into VSItextv2
author Janos Kovacs <kovjanos@gmail.com>
date Tue, 02 Jun 2015 23:38:21 +0100
parents 24daa6523218
children 453a3d13570f
comparison
equal deleted inserted replaced
306:e9d058f20097 307:14719662fb95
445 movff xC+0,sensor_setpoint ; Copy result 445 movff xC+0,sensor_setpoint ; Copy result
446 return 446 return
447 447
448 calc_velocity: ; called every two seconds 448 calc_velocity: ; called every two seconds
449 btfss divemode 449 btfss divemode
450 bra do_not_display_velocity ; display velocity only in divemode (Not at the surface after dive) 450 return ; display velocity only in divemode (Not at the surface after dive)
451 451
452 calc_velocity2: 452 calc_velocity2:
453 SAFE_2BYTE_COPY amb_pressure, sub_a 453 SAFE_2BYTE_COPY amb_pressure, sub_a
454 movff last_pressure_velocity+0,sub_b+0 454 movff last_pressure_velocity+0,sub_b+0
455 movff last_pressure_velocity+1,sub_b+1 455 movff last_pressure_velocity+1,sub_b+1
474 cpfsgt divA+0 ; limit to 99m/min 474 cpfsgt divA+0 ; limit to 99m/min
475 bra calc_velocity3 475 bra calc_velocity3
476 movwf divA+0 ; divA=99 476 movwf divA+0 ; divA=99
477 477
478 calc_velocity3: 478 calc_velocity3:
479 movlw velocity_warning_level_1 ; lowest threshold for display vertical velocity
480 subwf divA+0,W ;
481 btfss STATUS,C
482 bra do_not_display_velocity
483
484 bsf display_velocity
485 call TFT_display_velocity ; With divA+0 = m/min... 479 call TFT_display_velocity ; With divA+0 = m/min...
486 return 480 return
487 481
488 do_not_display_velocity:
489 btfss display_velocity ; Velocity was not displayed, do not delete
490 return
491 bcf display_velocity ; Velocity was displayed, delete velocity now
492 call TFT_display_velocity_clear
493 return
494 482
495 ;============================================================================= 483 ;=============================================================================
496 484
497 set_reset_safety_stop: ; Set flags for safety stop and/or reset safety stop 485 set_reset_safety_stop: ; Set flags for safety stop and/or reset safety stop
498 TSTOSS opt_enable_safetystop ; =1: A safety stop is shown 486 TSTOSS opt_enable_safetystop ; =1: A safety stop is shown