comparison src/divemode.asm @ 39:e4e91fe8b09d

remember last customview in dive and surface mode
author mh@mh-THINK.fritz.box
date Thu, 15 Aug 2013 13:55:55 +0200
parents 64976f1e0a1c
children 448ba265fdae
comparison
equal deleted inserted replaced
38:64976f1e0a1c 39:e4e91fe8b09d
34 34
35 ; Startup Tasks for all modes 35 ; Startup Tasks for all modes
36 call TFT_ClearScreen ; clean up TFT 36 call TFT_ClearScreen ; clean up TFT
37 call TFT_divemode_mask ; Display mask 37 call TFT_divemode_mask ; Display mask
38 call TFT_temp_divemode ; Displays temperature 38 call TFT_temp_divemode ; Displays temperature
39 movff customview_divemode,menupos3 ; Reload last customview
40 call customview_mask ; Redraw last custom view
39 41
40 btfsc FLAG_apnoe_mode 42 btfsc FLAG_apnoe_mode
41 bsf realdive ; Set Realdive flag in Apnoe mode 43 bsf realdive ; Set Realdive flag in Apnoe mode
42 44
43 btfsc FLAG_apnoe_mode ; Done for Apnoe or Gauge mode 45 btfsc FLAG_apnoe_mode ; Done for Apnoe or Gauge mode
1080 movwf apnoe_max_pressure+0 1082 movwf apnoe_max_pressure+0
1081 clrf apnoe_max_pressure+1 1083 clrf apnoe_max_pressure+1
1082 clrf apnoe_surface_mins 1084 clrf apnoe_surface_mins
1083 clrf apnoe_surface_secs 1085 clrf apnoe_surface_secs
1084 clrf apnoe_mins 1086 clrf apnoe_mins
1085 movlw .2
1086 movwf apnoe_secs
1087 clrf divemins+0 1087 clrf divemins+0
1088 clrf divemins+1 1088 clrf divemins+1
1089 bcf no_more_divesecs ; =1: Do no longer show seconds in divemode 1089 bcf no_more_divesecs ; =1: Do no longer show seconds in divemode
1090 bcf divemode_menu_active 1090 bcf divemode_menu_active
1091 clrf menupos 1091 clrf menupos
1092 clrf menupos3 ; Reset to zero (Zero=no custom view)
1093 clrf menupos2 ; Reset to zero (Zero=no premenu or simulator task) 1092 clrf menupos2 ; Reset to zero (Zero=no premenu or simulator task)
1094 1093
1095 bcf is_bailout ; =1: Bailout 1094 bcf is_bailout ; =1: Bailout
1096 btfss FLAG_ccr_mode 1095 btfss FLAG_ccr_mode
1097 rcall dive_boot_oc 1096 rcall dive_boot_oc
1163 bcf realdive 1162 bcf realdive
1164 btfss simulatormode_active ; do not disable in simulator mode! 1163 btfss simulatormode_active ; do not disable in simulator mode!
1165 call disable_rs232 ; Disable RS232 1164 call disable_rs232 ; Disable RS232
1166 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump) 1165 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump)
1167 call enable_rs232 ; Also sets to speed_normal ... 1166 call enable_rs232 ; Also sets to speed_normal ...
1168 movlw .2 1167 ; Reset divetime seconds
1168 movlw .2 ; Start at 2seconds
1169 movwf total_divetime_seconds+0 1169 movwf total_divetime_seconds+0
1170 movwf divesecs ; Start at 2seconds 1170 movwf divesecs
1171 movwf apnoe_secs
1171 bsf divemode2 ; displayed divetime is running (Divetime starts HERE) 1172 bsf divemode2 ; displayed divetime is running (Divetime starts HERE)
1172 1173
1173 movff int_O_CNS_fraction+0,CNS_start+0 1174 movff int_O_CNS_fraction+0,CNS_start+0
1174 movff int_O_CNS_fraction+1,CNS_start+1 ; Save CNS value at beginning of dive 1175 movff int_O_CNS_fraction+1,CNS_start+1 ; Save CNS value at beginning of dive
1175 movff char_O_relative_gradient_GF,GF_start ; Save GF value at beginning of dive 1176 movff char_O_relative_gradient_GF,GF_start ; Save GF value at beginning of dive