comparison src/customview.asm @ 485:18e047102e49

3.14 BETA release
author heinrichsweikamp
date Mon, 20 Feb 2017 15:49:38 +0100
parents c0ee33f1f399
children 0910c227018f
comparison
equal deleted inserted replaced
484:ff2994528e02 485:18e047102e49
342 bra menuview_exit ; Done. 342 bra menuview_exit ; Done.
343 343
344 344
345 ;============================================================================= 345 ;=============================================================================
346 ; Show next customview (and delete this flag) 346 ; Show next customview (and delete this flag)
347 global customview_toggle
348 customview_toggle:
349 bcf switch_right
350 incf menupos3,F ; Number of customview to show
351 movlw d'12' ; Max number of customsviews in divemode
352 cpfsgt menupos3 ; Max reached?
353 bra customview_mask ; No, show
354 customview_toggle_reset: ; Timeout occured 347 customview_toggle_reset: ; Timeout occured
355 clrf menupos3 ; Reset to zero (Zero=no custom view) 348 clrf menupos3 ; Reset to zero (Zero=no custom view)
356 global customview_mask 349 global customview_mask
357 customview_mask: 350 customview_mask:
358 ; Clear custom view area in divemode 351 ; Clear custom view area in divemode
389 call I2C_sleep_accelerometer ; Stop accelerometer 382 call I2C_sleep_accelerometer ; Stop accelerometer
390 call I2C_sleep_compass ; Stop compass 383 call I2C_sleep_compass ; Stop compass
391 bra customview_toggle_exit 384 bra customview_toggle_exit
392 385
393 customview_init_view1: 386 customview_init_view1:
394 btfsc FLAG_apnoe_mode ; In Apnoe mode? 387 btfsc FLAG_apnoe_mode ; In Apnoe mode?
395 bra customview_toggle ; yes, Call next view... 388 bra customview_toggle ; yes, Call next view...
396 btfss FLAG_ccr_mode ; In CC mode? 389 btfsc FLAG_pscr_mode ; In PSCR mode?
397 bra customview_toggle ; no, Call next view... 390 bra customview_init_view1a ; Yes
391 btfss FLAG_ccr_mode ; In CC mode?
392 bra customview_toggle ; no, Call next view...
393
394 customview_init_view1a:
398 movf hardware_flag,W 395 movf hardware_flag,W
399 sublw 0x11 ; 2 with BLE 396 sublw 0x11 ; 2 with BLE
400 btfsc STATUS,Z 397 btfsc STATUS,Z
401 bra customview_toggle ; no, Call next view... 398 bra customview_toggle ; no, Call next view...
402 movf hardware_flag,W 399 movf hardware_flag,W
407 bsf dive_hud1_displayed ; Set display flag 404 bsf dive_hud1_displayed ; Set display flag
408 bsf dive_hud2_displayed ; Set display flag 405 bsf dive_hud2_displayed ; Set display flag
409 bsf dive_hud3_displayed ; Set display flag 406 bsf dive_hud3_displayed ; Set display flag
410 call TFT_hud_mask ; Setup HUD mask 407 call TFT_hud_mask ; Setup HUD mask
411 call TFT_update_ppo2_sensors ; Update Sensor data 408 call TFT_update_ppo2_sensors ; Update Sensor data
412 bra customview_toggle_exit 409 bra customview_toggle_exit
413 410
414 customview_init_view2: 411 customview_init_view2:
415 btfsc FLAG_apnoe_mode ; In Apnoe mode? 412 btfsc FLAG_apnoe_mode ; In Apnoe mode?
416 bra customview_toggle ; Yes, Call next view... 413 bra customview_toggle ; Yes, Call next view...
417 call TFT_mask_avr_stopwatch ; Show mask for average depth and stopwatch 414 call TFT_mask_avr_stopwatch ; Show mask for average depth and stopwatch
463 customview_init_view8: ; Sensor millivolts 460 customview_init_view8: ; Sensor millivolts
464 btfsc FLAG_gauge_mode ; In Gauge mode? 461 btfsc FLAG_gauge_mode ; In Gauge mode?
465 bra customview_toggle ; Yes, Call next view... 462 bra customview_toggle ; Yes, Call next view...
466 btfsc FLAG_apnoe_mode ; In Apnoe mode? 463 btfsc FLAG_apnoe_mode ; In Apnoe mode?
467 bra customview_toggle ; yes, Call next view... 464 bra customview_toggle ; yes, Call next view...
465 btfsc FLAG_pscr_mode ; In PSCR mode?
466 bra customview_init_view8a ; Yes
468 btfss FLAG_ccr_mode ; In CC mode? 467 btfss FLAG_ccr_mode ; In CC mode?
469 bra customview_toggle ; no, Call next view... 468 bra customview_toggle ; no, Call next view...
470 469 customview_init_view8a:
471 movf hardware_flag,W 470 movf hardware_flag,W
472 sublw 0x13 ; + 471 sublw 0x13 ; +
473 btfsc STATUS,Z 472 btfsc STATUS,Z
474 bra customview_toggle ; no, Call next view... 473 bra customview_toggle ; no, Call next view...
475 474
476 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP 475 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP
477 sublw .1 ; opt_ccr_mode = 1 (Sensor)? 476 sublw .1 ; opt_ccr_mode = 1 (Sensor)?
478 bnz customview_toggle ; no, Call next view... 477 bnz customview_toggle ; no, Call next view...
479 call TFT_hud_mask ; Setup HUD mask 478 call TFT_hud_mask ; Setup HUD mask
480 call TFT_hud_voltages ; Show HUD details 479 call TFT_hud_voltages ; Show HUD details
481 bra customview_toggle_exit 480 goto customview_toggle_exit
482 481
483 customview_init_view9: ; ppO2, Ceiling and current GF 482 customview_init_view9: ; ppO2, Ceiling and current GF
484 btfsc FLAG_apnoe_mode ; In Apnoe mode? 483 btfsc FLAG_apnoe_mode ; In Apnoe mode?
485 bra customview_toggle ; yes, Call next view... 484 bra customview_toggle ; yes, Call next view...
486 btfsc FLAG_gauge_mode ; In Gauge mode? 485 btfsc FLAG_gauge_mode ; In Gauge mode?
487 bra customview_toggle ; Yes, Call next view... 486 bra customview_toggle ; Yes, Call next view...
488 call TFT_ceiling_mask ; Setup mask 487 call TFT_ceiling_mask ; Setup mask
489 call TFT_ceiling ; Show Ceiling 488 call TFT_ceiling ; Show Ceiling
490 489
491 ; ppO2 value 490 ; ppO2 value
492 call TFT_mask_ppo2 491 call TFT_mask_ppo2
498 bra customview_toggle_exit ; No GF info for non-GF modes 497 bra customview_toggle_exit ; No GF info for non-GF modes
499 call TFT_gf_mask_cGF ; Setup Mask - current GF only 498 call TFT_gf_mask_cGF ; Setup Mask - current GF only
500 call TFT_gf_info ; Show GF informations 499 call TFT_gf_info ; Show GF informations
501 bra customview_toggle_exit 500 bra customview_toggle_exit
502 501
502 ;=============================================================================
503 ; Show next customview (and delete this flag)
504 global customview_toggle
505 customview_toggle:
506 bcf switch_right
507 incf menupos3,F ; Number of customview to show
508 movlw d'12' ; Max number of customsviews in divemode
509 cpfsgt menupos3 ; Max reached?
510 goto customview_mask ; No, show
511 goto customview_toggle_reset
512
513
503 customview_init_view10: ; Sensor check 514 customview_init_view10: ; Sensor check
504 btfsc FLAG_apnoe_mode ; In Apnoe mode? 515 btfsc FLAG_apnoe_mode ; In Apnoe mode?
505 bra customview_toggle ; yes, Call next view... 516 bra customview_toggle ; yes, Call next view...
506 btfsc FLAG_gauge_mode ; In Gauge mode? 517 btfsc FLAG_gauge_mode ; In Gauge mode?
507 bra customview_toggle ; Yes, Call next view... 518 bra customview_toggle ; Yes, Call next view...
518 btfsc FLAG_gauge_mode ; In Gauge mode? 529 btfsc FLAG_gauge_mode ; In Gauge mode?
519 bra customview_toggle ; Yes, Call next view... 530 bra customview_toggle ; Yes, Call next view...
520 531
521 call TFT_ppo2_ead_end_cns_mask ; Show ppO2, END/EAD and CNS mask 532 call TFT_ppo2_ead_end_cns_mask ; Show ppO2, END/EAD and CNS mask
522 call TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS 533 call TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS
523 bra customview_toggle_exit 534 goto customview_toggle_exit
524 535
525 customview_init_view12: ; PSCR Info 536 customview_init_view12: ; PSCR Info
526 btfss FLAG_pscr_mode ; In PSCR mode? 537 btfss FLAG_pscr_mode ; In PSCR mode?
527 bra customview_toggle ; No, Call next view... 538 bra customview_toggle ; No, Call next view...
528 539