comparison src/customview.asm @ 657:c2e97f94c55f default tip

bump to 10.93 / 3.32
author heinrichsweikamp
date Tue, 27 Jan 2026 11:01:04 +0100
parents 8af5aefbcdaf
children
comparison
equal deleted inserted replaced
656:8af5aefbcdaf 657:c2e97f94c55f
125 surf_customview_toggle: 125 surf_customview_toggle:
126 bcf switch_right ; clear button event 126 bcf switch_right ; clear button event
127 incf active_customview,F ; set number of the next custom view to show 127 incf active_customview,F ; set number of the next custom view to show
128 128
129 IFDEF _compass 129 IFDEF _compass
130 movlw .6 ; load index of surface custom view compass 130 ; movlw .6 ; load index of surface custom view compass
131 cpfseq active_customview ; will the compass be shown in custom view? 131 ; cpfseq active_customview ; will the compass be shown in custom view?
132 call I2C_sleep_compass ; NO - can stop the compass to save on energy 132 ; call I2C_sleep_compass ; NO - can stop the compass to save on energy
133 ENDIF 133 ENDIF
134 134
135 movlw num_surface_cv ; load number of custom views available 135 movlw num_surface_cv ; load number of custom views available
136 cpfsgt active_customview ; beyond last view? 136 cpfsgt active_customview ; beyond last view?
137 bra surf_customview_mask ; NO - show view 137 bra surf_customview_mask ; NO - show view
256 256
257 ; ---- view 6: compass 257 ; ---- view 6: compass
258 ; 258 ;
259 surf_customview_init_view6: 259 surf_customview_init_view6:
260 IFDEF _compass 260 IFDEF _compass
261 call I2C_init_compass ; start compass 261 ; call I2C_init_compass ; start compass
262 btfss compass_present 262 btfss compass_present
263 bra surf_customview_toggle ; not available without compass compiled in, goto next view 263 bra surf_customview_toggle ; not available without compass compiled in, goto next view
264 call TFT_surface_compass_mask ; show compass mask 264 call TFT_surface_compass_mask ; show compass mask
265 bra surf_cv_toggle_exit ; done 265 bra surf_cv_toggle_exit ; done
266 ELSE 266 ELSE
600 ;----------------------------------------------------------------------------- 600 ;-----------------------------------------------------------------------------
601 ; Show current Dive Mode Custom View 601 ; Show current Dive Mode Custom View
602 ; 602 ;
603 global dive_customview_callup 603 global dive_customview_callup
604 dive_customview_callup: 604 dive_customview_callup:
605 movlw index_compass_dm ; get index of compass custom view 605 ; movlw index_compass_dm ; get index of compass custom view
606 cpfseq active_customview ; will compass be shown? 606 ; cpfseq active_customview ; will compass be shown?
607 call I2C_sleep_compass ; NO - stop compass to save on energy 607 ; call I2C_sleep_compass ; NO - stop compass to save on energy
608 608
609 ; clear custom view area in dive mode 609 ; clear custom view area in dive mode
610 WIN_BOX_BLACK dm_customview_row, dm_customview_bot-.2, dm_customview_column, dm_customview_rgt ; top, bottom, left, right 610 WIN_BOX_BLACK dm_customview_row, dm_customview_bot-.2, dm_customview_column, dm_customview_rgt ; top, bottom, left, right
611 611
612 ; jump table 612 ; jump table
613 movf active_customview,W ; get custom view to show 613 movf active_customview,W ; get custom view to show
614 dcfsnz WREG,F ; 614 dcfsnz WREG,F ;
615 bra init_avr_stopwatch ; 1: average depth and stopwatch 615 bra init_avr_stopwatch ; 1: average depth and stopwatch
616 dcfsnz WREG,F ; 616 dcfsnz WREG,F ;
617 bra init_TFT_dive_compass ; 2: compass 617 bra init_TFT_dive_compass ; 2: compass
618 dcfsnz WREG,F ; 618 dcfsnz WREG,F ;
619 bra init_ppo2_sensors ; 3: ppO2 sensors 619 bra init_ppo2_sensors ; 3: ppO2 sensors
620 dcfsnz WREG,F ; 620 dcfsnz WREG,F ;
621 bra init_sensor_check ; 4: sensor check 621 bra init_sensor_check ; 4: sensor check
622 dcfsnz WREG,F ; 622 dcfsnz WREG,F ;
623 bra init_pscr_info ; 5: pSCR data 623 bra init_pscr_info ; 5: pSCR data
624 dcfsnz WREG,F ; 624 dcfsnz WREG,F ;
625 bra init_pressures_SAC ; 6: tank pressure and SAC rate 625 bra init_pressures_SAC ; 6: tank pressure and SAC rate
626 dcfsnz WREG,F ; 626 dcfsnz WREG,F ;
627 bra init_gas_needs_ascent ; 7: gas needs for ascent / cave return 627 bra init_gas_needs_ascent ; 7: gas needs for ascent / cave return
628 dcfsnz WREG,F ; 628 dcfsnz WREG,F ;
629 bra init_cave_tts ; 8: cave mode TTS 629 bra init_cave_tts ; 8: cave mode TTS
630 dcfsnz WREG,F ; 630 dcfsnz WREG,F ;
631 bra init_decoplan ; 9: deco plan (next stops) 631 bra init_decoplan ; 9: deco plan (next stops)
632 dcfsnz WREG,F ; 632 dcfsnz WREG,F ;
633 bra init_ceiling_GF_tissue ; 10: ceiling, current GF and tissues 633 bra init_ceiling_GF_tissue ; 10: ceiling, current GF and tissues
634 dcfsnz WREG,F ; 634 dcfsnz WREG,F ;
635 bra init_ceiling_GF_surfGF ; 11: ceiling, current GF and surfGF 635 bra init_ceiling_GF_surfGF ; 11: ceiling, current GF and surfGF
636 dcfsnz WREG,F ; 636 dcfsnz WREG,F ;
637 bra init_CNS ; 12: CNS values 637 bra init_CNS ; 12: CNS values
638 dcfsnz WREG,F ; 638 dcfsnz WREG,F ;
639 bra init_ppo2_ead_end_cns ; 13: ppO2, END/EAD and CNS/gas density 639 bra init_ppo2_ead_end_cns ; 13: ppO2, END/EAD and CNS/gas density
640 dcfsnz WREG,F ; 640 dcfsnz WREG,F ;
641 bra init_clock_batt_surfpress ; 14: clock, battery and surface pressure 641 bra init_clock_batt_surfpress ; 14: clock, battery and surface pressure
642 dcfsnz WREG,F ; 642 dcfsnz WREG,F ;
643 bra init_gf_factors ; 15: GF factors 643 bra init_gf_factors ; 15: GF factors
644 dcfsnz WREG,F ; 644 dcfsnz WREG,F ;
645 bra init_cave_waypoints ; 16: cave waypoints 645 bra init_cave_waypoints ; 16: cave waypoints
646 ;bra dive_cv_toggle_exit ; 0: no view (blank screen in custom view area) 646 ;bra dive_cv_toggle_exit ; 0: no view (blank screen in custom view area)
662 662
663 ; ---- view 2: compass ---- 663 ; ---- view 2: compass ----
664 ; 664 ;
665 init_TFT_dive_compass: 665 init_TFT_dive_compass:
666 IFDEF _compass 666 IFDEF _compass
667 call I2C_init_compass ; start compass 667 ; call I2C_init_compass ; start compass
668 btfss compass_present 668 btfss compass_present
669 bra dive_customview_toggle ; not available without compass compiled in, goto next view 669 bra dive_customview_toggle ; not available without compass compiled in, goto next view
670 call TFT_dive_compass_mask ; mask for compass 670 call TFT_dive_compass_mask ; mask for compass
671 bra dive_cv_toggle_exit ; done 671 bra dive_cv_toggle_exit ; done
672 ELSE 672 ELSE
851 851
852 ; ---- view 16: cave waypoints ---- 852 ; ---- view 16: cave waypoints ----
853 ; 853 ;
854 init_cave_waypoints: 854 init_cave_waypoints:
855 IFDEF _cave_mode 855 IFDEF _cave_mode
856 btfss cave_mode ; cave mode switched on?
857 bra dive_customview_toggle ; NO - goto next view
856 call TFT_cave_waypoints ; show waypoint graphics 858 call TFT_cave_waypoints ; show waypoint graphics
857 bra dive_cv_toggle_exit ; done 859 bra dive_cv_toggle_exit ; done
858 ELSE 860 ELSE
859 bra dive_customview_toggle ; not available without cave mode, goto next view 861 bra dive_customview_toggle ; not available without cave mode, goto next view
860 ENDIF 862 ENDIF