comparison src/tft_outputs.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
3311 3311
3312 FONT_COLOR_WARNING ; set warning color 3312 FONT_COLOR_WARNING ; set warning color
3313 STRCPY_TEXT tnoBOgas ; print "-B/O-Gas-" 3313 STRCPY_TEXT tnoBOgas ; print "-B/O-Gas-"
3314 bra TFT_message_close ; finalize message output 3314 bra TFT_message_close ; finalize message output
3315 3315
3316 IFDEF _ccr_pscr
3317 ;-----------------------------------------------------------------------------
3318 ; Dive Mode - Scrubber timer
3319 ;
3320 global TFT_message_scrubber
3321 TFT_message_scrubber:
3322 rcall TFT_message_open ; set row and column for the message
3323 tstfsz WREG ; is there room for the message?
3324 return ; NO - skip message in this cycle
3325
3326 FONT_COLOR_WARNING ; set warning color
3327 STRCPY_TEXT tScrubTmrWarn ; print "Scrubber!"
3328 bra TFT_message_close ; finalize message output
3329 ENDIF
3316 3330
3317 ;----------------------------------------------------------------------------- 3331 ;-----------------------------------------------------------------------------
3318 ; Message - open Message 3332 ; Message - open Message
3319 ; 3333 ;
3320 ; sets the row and column for the current message 3334 ; sets the row and column for the current message
3725 3739
3726 WIN_TINY surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3)+.5 3740 WIN_TINY surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3)+.5
3727 STRCAT_TEXT_PRINT tAvgDepth ; "Average" 3741 STRCAT_TEXT_PRINT tAvgDepth ; "Average"
3728 3742
3729 FONT_COLOR_MEMO ; set color 3743 FONT_COLOR_MEMO ; set color
3730 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row 3744 WIN_SMALL surf_gaslist_column+.53,surf_gaslist_row
3731 SMOVII int_O_desaturation_time,mpr ; ISR-safe copy of the desaturation time 3745 SMOVII int_O_desaturation_time,mpr ; ISR-safe copy of the desaturation time
3732 movf mpr+0,W ; get low byte into WREG 3746 movf mpr+0,W ; get low byte into WREG
3733 iorwf mpr+1,W ; inclusive-or with high byte, check if desaturation time is zero 3747 iorwf mpr+1,W ; inclusive-or with high byte, check if desaturation time is zero
3734 bz TFT_surface_lastdive_2 ; YES - show last dive time 3748 bz TFT_surface_lastdive_2 ; YES - show last dive time
3735 ;bra TFT_surface_lastdive_1 ; NO - show surface interval 3749 ;bra TFT_surface_lastdive_1 ; NO - show surface interval
3754 PRINT ; dump to screen 3768 PRINT ; dump to screen
3755 ;bra TFT_surface_lastdive_com ; continue 3769 ;bra TFT_surface_lastdive_com ; continue
3756 3770
3757 TFT_surface_lastdive_com: 3771 TFT_surface_lastdive_com:
3758 ; last dive duration 3772 ; last dive duration
3759 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.1) 3773 WIN_SMALL surf_gaslist_column+.53,surf_gaslist_row+(surf_gaslist_spacing*.1)
3760 MOVII lastdive_duration,mpr ; get duration of last dive, minutes 3774 MOVII lastdive_duration,mpr ; get duration of last dive, minutes
3761 output_999 ; print minutes 3775 output_999 ; print minutes
3762 PUTC ":" ; print ":" 3776 PUTC ":" ; print ":"
3763 movff lastdive_duration+2,lo ; get duration of last dive, seconds 3777 movff lastdive_duration+2,lo ; get duration of last dive, seconds
3764 output_99x ; print seconds 3778 output_99x ; print seconds
3765 PRINT ; dump to screen 3779 PRINT ; dump to screen
3766 3780
3767 ; last dive max depth 3781 ; last dive max depth
3768 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.2) 3782 WIN_SMALL surf_gaslist_column+.53,surf_gaslist_row+(surf_gaslist_spacing*.2)
3769 MOVII lastdive_maxdepth,mpr ; get max depth of last dive 3783 MOVII lastdive_maxdepth,mpr ; get max depth of last dive
3770 rcall TFT_surface_lastdive_depth ; print depth 3784 rcall TFT_surface_lastdive_depth ; print depth
3771 3785
3772 ; average depth 3786 ; average depth
3773 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.3) 3787 WIN_SMALL surf_gaslist_column+.53,surf_gaslist_row+(surf_gaslist_spacing*.3)
3774 MOVII lastdive_avgdepth,mpr ; get avg depth of last dive 3788 MOVII lastdive_avgdepth,mpr ; get avg depth of last dive
3775 ;bra TFT_surface_lastdive_depth ; print depth and return 3789 rcall TFT_surface_lastdive_depth ; print depth
3776 3790
3791 IFDEF _ccr_pscr
3792 TSTOSS opt_ScrubTmrEnable ; Scrubber Timer Enabled?
3793 return ; NO - Done.
3794
3795 FONT_COLOR color_green ; set menu title font color
3796 ; Scrubber timer
3797 WIN_TINY surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.4)+.5
3798 STRCAT_TEXT_PRINT tScrubTmrTime ; "Scubber Time:"
3799 FONT_COLOR_MEMO ; set color
3800 WIN_SMALL surf_gaslist_column+.65,surf_gaslist_row+(surf_gaslist_spacing*.4)
3801 MOVII opt_scrubber_timer_mins,mpr ; Get the minutes into lo:hi
3802 btfss hi,7 ; Negative timer?
3803 bra TFT_surface_lastdive_scrubber1 ; NO
3804 FONT_COLOR_WARNING ; YES - print in Red (If enabled)
3805 STRCAT "-" ; And add a -
3806 bra TFT_surface_lastdive_scrubber2 ; Skip Space
3807 TFT_surface_lastdive_scrubber1:
3808 STRCAT " " ; Add a Space when positive
3809 TFT_surface_lastdive_scrubber2:
3810 bcf hi,7 ; Clear sign bit
3811 ; bcf leftbind
3812 output_999
3813 STRCAT_TEXT_PRINT tMinutes
3814 ENDIF ; _ccr_pscr
3815
3816 return
3817
3777 ; Helper Function - print depth 3818 ; Helper Function - print depth
3778 TFT_surface_lastdive_depth: 3819 TFT_surface_lastdive_depth:
3779 TSTOSS opt_units ; 0=Meter, 1=Feet 3820 TSTOSS opt_units ; 0=Meter, 1=Feet
3780 bra TFT_surface_lastdive_m ; 0 - metric 3821 bra TFT_surface_lastdive_m ; 0 - metric
3781 ;bra TFT_surface_lastdive_ft ; 1 - imperial 3822 ;bra TFT_surface_lastdive_ft ; 1 - imperial
5014 bsf leftbind ; print left-aligned 5055 bsf leftbind ; print left-aligned
5015 output_65535 ; print (xxx.x-) 5056 output_65535 ; print (xxx.x-)
5016 bra TFT_ceiling_GF_tissue0 ; continue 5057 bra TFT_ceiling_GF_tissue0 ; continue
5017 5058
5018 TFT_ceiling_GF_tissue0: 5059 TFT_ceiling_GF_tissue0:
5019 PUTC_PRINT " " ; append a space and dump to screen 5060 PUTC " " ; append a space
5061 clrf WREG ; load string terminator
5062 movff WREG,buffer+.4 ; limit string length to 4
5063 PRINT
5020 return 5064 return
5021 5065
5022 ; Helper Function - draw a bargraph 5066 ; Helper Function - draw a bargraph
5023 TFT_dive_tissues_bargraph: 5067 TFT_dive_tissues_bargraph:
5024 addwf hi,W ; add row number to start position 5068 addwf hi,W ; add row number to start position