comparison src/customview.asm @ 503:4542d03f748a

NEW: Last Dive customviews in surface mode with divetime, depth and interval
author heinrichsweikamp
date Sun, 11 Jun 2017 17:11:40 +0200
parents 0910c227018f
children d339c9e1175d
comparison
equal deleted inserted replaced
502:0910c227018f 503:4542d03f748a
117 117
118 global surf_customview_toggle 118 global surf_customview_toggle
119 surf_customview_toggle: 119 surf_customview_toggle:
120 bcf switch_right 120 bcf switch_right
121 incf menupos3,F ; Number of customview to show 121 incf menupos3,F ; Number of customview to show
122 movlw d'7' ; Max number of customsviews in surface mode 122 movlw d'8' ; Max number of customsviews in surface mode
123 cpfsgt menupos3 ; Max reached? 123 cpfsgt menupos3 ; Max reached?
124 bra surf_customview_mask ; No, show 124 bra surf_customview_mask ; No, show
125 movlw .1 125 movlw .1
126 movwf menupos3 ; Reset to one (Always one custom view visible) 126 movwf menupos3 ; Reset to one (Always one custom view visible)
127 127
140 bra surf_customview_init_view3 ; CC SP list 140 bra surf_customview_init_view3 ; CC SP list
141 dcfsnz WREG,F 141 dcfsnz WREG,F
142 bra surf_customview_init_view4 ; Custom Text 142 bra surf_customview_init_view4 ; Custom Text
143 dcfsnz WREG,F 143 dcfsnz WREG,F
144 bra surf_customview_init_view5 ; Tissue Diagram 144 bra surf_customview_init_view5 ; Tissue Diagram
145 dcfsnz WREG,F 145 dcfsnz WREG,F
146 bra surf_customview_init_view6 ; Compass 146 bra surf_customview_init_view6 ; Compass
147 dcfsnz WREG,F 147 dcfsnz WREG,F
148 bra surf_customview_init_view7 ; Deco settings 148 bra surf_customview_init_view7 ; Deco settings
149 dcfsnz WREG,F
150 bra surf_customview_init_view8 ; Last Dive info
149 151
150 call I2C_sleep_accelerometer ; Stop accelerometer 152 call I2C_sleep_accelerometer ; Stop accelerometer
151 call I2C_sleep_compass ; Stop compass 153 call I2C_sleep_compass ; Stop compass
152 154
153 movlw .1 155 movlw .1
218 call I2C_init_accelerometer ; Start accelerometer 220 call I2C_init_accelerometer ; Start accelerometer
219 call I2C_init_compass ; Start compass 221 call I2C_init_compass ; Start compass
220 extern TFT_surface_compass_mask 222 extern TFT_surface_compass_mask
221 call TFT_surface_compass_mask ; Show compass 223 call TFT_surface_compass_mask ; Show compass
222 bra customview_toggle_exit ; Done. 224 bra customview_toggle_exit ; Done.
225
223 surf_customview_init_view7: 226 surf_customview_init_view7:
224 btfsc FLAG_gauge_mode 227 btfsc FLAG_gauge_mode ; View7: Deco settings
225 bra surf_customview_toggle 228 bra surf_customview_toggle
226 btfsc FLAG_apnoe_mode 229 btfsc FLAG_apnoe_mode
227 bra surf_customview_toggle 230 bra surf_customview_toggle
228 extern deco_setup_dive 231 extern deco_setup_dive
229 call deco_setup_dive 232 call deco_setup_dive
230 call TFT_surface_decosettings ; Show all deco settings 233 call TFT_surface_decosettings ; Show all deco settings
231 bra customview_toggle_exit ; Done. 234 bra customview_toggle_exit ; Done.
232 235
236 surf_customview_init_view8: ; View8: Last dive info
237 call TFT_surface_lastdive ; Show last dive interval
238
239 bra customview_toggle_exit ; Done.
240
241
233 global menuview_toggle 242 global menuview_toggle
234 menuview_toggle: ; Show Menu or the simulator tasks 243 menuview_toggle: ; Show Menu or the simulator tasks
235 movlw divemode_menuview_timeout 244 movlw divemode_menuview_timeout
236 movwf timeout_counter3 245 movwf timeout_counter3
237 bsf menuview 246 bsf menuview