Mercurial > public > hwos_code
comparison src/surfmode.asm @ 476:7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
author | heinrichsweikamp |
---|---|
date | Mon, 16 Jan 2017 11:05:02 +0100 |
parents | 6f3530eb48f9 |
children | ad8acade5567 |
comparison
equal
deleted
inserted
replaced
475:237afdfb4918 | 476:7c10557c248e |
---|---|
214 call TFT_update_surf_press ; display surface pressure | 214 call TFT_update_surf_press ; display surface pressure |
215 bcf pressure_refresh ; until new pressure is available | 215 bcf pressure_refresh ; until new pressure is available |
216 | 216 |
217 ; Updates every 1/4 second | 217 ; Updates every 1/4 second |
218 btfss quarter_second_update | 218 btfss quarter_second_update |
219 bra surfloop_loop2a | 219 bra surfloop_loop2b |
220 | 220 |
221 bcf quarter_second_update | 221 bcf quarter_second_update |
222 | |
222 ; Update Sensors | 223 ; Update Sensors |
223 | |
224 call compute_ppo2 ; compute mv_sensorX and ppo2_sensorX arrays | 224 call compute_ppo2 ; compute mv_sensorX and ppo2_sensorX arrays |
225 call check_sensors ; Set enable/disable flags | 225 call check_sensors ; Set enable/disable flags |
226 btfsc FLAG_ccr_mode ; In CCR mode... | 226 btfss FLAG_ccr_mode ; In CCR mode? |
227 bra surfloop_loop2a ; No, skip | |
228 | |
229 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP | |
230 sublw .1 ; opt_ccr_mode = 1 (Sensor)? | |
231 bnz surfloop_loop2a ; No, skip | |
232 | |
227 call TFT_surface_sensor ; ...update sensor data in surface mode | 233 call TFT_surface_sensor ; ...update sensor data in surface mode |
228 | 234 |
235 surfloop_loop2a: | |
229 movlw .6 | 236 movlw .6 |
230 cpfseq menupos3 ; in compass view? | 237 cpfseq menupos3 ; in compass view? |
231 bra surfloop_loop2a ; No | 238 bra surfloop_loop2b ; No |
232 extern TFT_surface_compass_heading | 239 extern TFT_surface_compass_heading |
233 call TFT_surface_compass_heading ; Yes, update compass heading value | 240 call TFT_surface_compass_heading ; Yes, update compass heading value |
234 | 241 |
235 surfloop_loop2a: | 242 surfloop_loop2b: |
236 btfsc toggle_customview ; Next view? | 243 btfsc toggle_customview ; Next view? |
237 call surf_customview_toggle ; Yes, show next customview (and delete this flag) | 244 call surf_customview_toggle ; Yes, show next customview (and delete this flag) |
238 | 245 |
239 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump) | 246 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump) |
240 bra surfloop_loop3 | 247 bra surfloop_loop3 |