Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 640:8c1f1f334275
3.13 release
author | heinrichsweikamp |
---|---|
date | Thu, 29 Oct 2020 09:29:15 +0100 |
parents | 2737ddc643bb |
children | 7d8a4c60ec1a 5b7fe7777425 |
comparison
equal
deleted
inserted
replaced
639:0ff82370991d | 640:8c1f1f334275 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File tft_outputs.asm * combined next generation V3.09.5 | 3 ; File tft_outputs.asm * combined next generation V3.12.3 |
4 ; | 4 ; |
5 ; high-level Display Outputs | 5 ; high-level Display Outputs |
6 ; | 6 ; |
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. |
8 ;============================================================================= | 8 ;============================================================================= |
69 pallet_table CODE_PACK 0x09800 ; must be at 0x***00 | 69 pallet_table CODE_PACK 0x09800 ; must be at 0x***00 |
70 ;============================================================================= | 70 ;============================================================================= |
71 | 71 |
72 | 72 |
73 pallet_table: | 73 pallet_table: |
74 ; mask disabled memo advice attention warning ; pallet | 74 ; mask disabled memo advice attention warning ; pallet |
75 ; ------------ ----------------- ---------------- --------------- ------------- --------- ---------- | 75 ; --------------- ------------------- --------------- --------------- --------------- --------------- -------- |
76 DB color_green, color_lightblue, color_white, color_green, color_yellow, color_red ; standard | 76 DB color_green, color_lightblue, color_white, color_green, color_yellow, color_red ; standard |
77 DB color_red, color_dark_red, color_orange, color_greenish, color_pink, color_red ; reddish | 77 DB color_red, color_dark_red, color_orange, color_greenish, color_pink, color_red ; reddish |
78 DB color_cyan, color_dark_green, color_green, color_green, color_cyan, color_red ; greenish | 78 DB color_cyan, color_dark_green, color_green, color_green, color_cyan, color_red ; greenish |
79 DB color_blue, color_deepblue, color_lightblue, color_greenish, color_orange, color_red ; blueish | 79 DB color_blue, color_deepblue, color_lightblue,color_greenish, color_orange, color_red ; blueish |
80 | 80 |
81 | 81 |
82 ;============================================================================= | 82 ;============================================================================= |
83 tft_out1 CODE | 83 tft_out1 CODE |
84 ;============================================================================= | 84 ;============================================================================= |
925 return ; done | 925 return ; done |
926 | 926 |
927 | 927 |
928 ; Helper Function - set font color | 928 ; Helper Function - set font color |
929 TFT_surfmode_startgas_helper: | 929 TFT_surfmode_startgas_helper: |
930 movf pallet_color_disabled,W | 930 movf pallet_color_disabled,W ; set default color |
931 tstfsz hi ; gas not disabled? | 931 tstfsz hi ; gas not disabled? |
932 movf pallet_color_memo,W ; YES - change to memo color | 932 movf pallet_color_memo,W ; YES - change to memo color |
933 movwf font_color ; set font color | 933 movwf font_color ; set font color |
934 return | 934 return |
935 | 935 |
2015 FONT_COLOR_MEMO ; select memo color | 2015 FONT_COLOR_MEMO ; select memo color |
2016 STRCAT "bar" ; print "bar" | 2016 STRCAT "bar" ; print "bar" |
2017 | 2017 |
2018 IFDEF _external_sensor | 2018 IFDEF _external_sensor |
2019 | 2019 |
2020 movff opt_ccr_mode,WREG ; get setpoint mode =0: Fixed SP, =1: Sensor, =2: Auto SP | 2020 movf dive_ccr_mode,W ; get setpoint mode =0: Fixed SP, =1: Sensor, =2: Auto SP |
2021 sublw .1 ; opt_ccr_mode = 1 (Sensor) ? | 2021 sublw .1 ; dive_ccr_mode = 1 (Sensor) ? |
2022 bnz TFT_active_sp_label_2 ; NO - skip | 2022 bnz TFT_active_sp_label_2 ; NO - skip |
2023 btfsc alt_layout_active ; YES - in alternative layout? | 2023 btfsc alt_layout_active ; YES - in alternative layout? |
2024 bra TFT_active_sp_label_2 ; YES - no space available for the "*" | 2024 bra TFT_active_sp_label_2 ; YES - no space available for the "*" |
2025 PUTC "*" ; NO - append "*" | 2025 PUTC "*" ; NO - append "*" |
2026 | 2026 |
2947 bra TFT_display_ftts_7 ; YES - take shortcut | 2947 bra TFT_display_ftts_7 ; YES - take shortcut |
2948 ENDIF | 2948 ENDIF |
2949 movff int_O_TST_alt+1,WREG ; get high byte of the alternative total stops time | 2949 movff int_O_TST_alt+1,WREG ; get high byte of the alternative total stops time |
2950 btfsc WREG,int_is_zero ; total stops time = zero ? | 2950 btfsc WREG,int_is_zero ; total stops time = zero ? |
2951 bra TFT_display_ftts_9 ; YES - show "NDL" | 2951 bra TFT_display_ftts_9 ; YES - show "NDL" |
2952 movff char_O_deco_info,WREG ; NO - get deco info vector | 2952 movff char_O_deco_info,WREG ; NO - get deco info vector |
2953 btfsc WREG,deco_zone ; - fTTS <= TTS ? | 2953 btfsc WREG,deco_zone ; - fTTS <= TTS ? |
2954 FONT_COLOR_ADVICE ; YES - set to advice color (green) | 2954 FONT_COLOR_ADVICE ; YES - set to advice color (green) |
2955 TFT_display_ftts_7: | 2955 TFT_display_ftts_7: |
2956 bsf leftbind ; print left-aligned | 2956 bsf leftbind ; print left-aligned |
2957 output_999 ; print ascent time (0-999) | 2957 output_999 ; print ascent time (0-999) |
2958 PUTC "'" ; print minutes symbol | 2958 PUTC "'" ; print minutes symbol |
2959 bra TFT_message_close ; finalize message output | 2959 bra TFT_message_close ; finalize message output |
4714 mullw .82 ; multiply with 82 | 4714 mullw .82 ; multiply with 82 |
4715 movf PRODH,W ; divide by 256 -> resulting scale factor is 82/256 = 0.3203125 | 4715 movf PRODH,W ; divide by 256 -> resulting scale factor is 82/256 = 0.3203125 |
4716 addwf win_leftx2,F ; add to base position | 4716 addwf win_leftx2,F ; add to base position |
4717 movlw color_yellow ; color for GF high line | 4717 movlw color_yellow ; color for GF high line |
4718 BOX_COLOR ; draw line | 4718 BOX_COLOR ; draw line |
4719 bra TFT_dive_tissues_4 ; continue with number of leading tissue | 4719 bra TFT_dive_tissues_4 ; continue with number of leading tissue |
4720 | 4720 |
4721 IFDEF _helium | 4721 IFDEF _helium |
4722 TFT_dive_tissues_3: | 4722 TFT_dive_tissues_3: |
4723 ; draw He tissues pressures | 4723 ; draw He tissues pressures |
4724 lfsr FSR2,char_O_tissue_pres_He ; load base address of He pressures | 4724 lfsr FSR2,char_O_tissue_pres_He ; load base address of He pressures |
6038 | 6038 |
6039 return ; do nothing | 6039 return ; do nothing |
6040 | 6040 |
6041 ELSE | 6041 ELSE |
6042 | 6042 |
6043 btfsc alt_layout_active ; alternative layout active? | 6043 ; btfsc alt_layout_active ; alternative layout active? |
6044 return ; YES - abort | 6044 ; return ; YES - abort |
6045 | 6045 |
6046 WIN_TINY .100,.30 ; surface mode: fits under the textual logo in the upper right corner | 6046 WIN_TINY .100,.30 ; surface mode: fits under the textual logo in the upper right corner |
6047 ; WIN_TINY .35, .0 ; dive mode: fits to the right side of the depth label | 6047 ; WIN_TINY .35, .0 ; dive mode: fits to the right side of the depth label |
6048 ; WIN_TINY .0, . 0 ; dive mode: overwrites depth label | 6048 ; WIN_TINY .0, . 0 ; dive mode: overwrites depth label |
6049 FONT_COLOR_MEMO ; set color | 6049 FONT_COLOR_MEMO ; set color |
6050 | 6050 |
6051 movff analog_sw1,mpr | 6051 movff max_CCPR1L,lo |
6052 output_256 | 6052 output_256 |
6053 PUTC ',' | 6053 PUTC "," |
6054 movff analog_sw2,mpr | 6054 movff analog_sw2,lo; left |
6055 output_256 | 6055 output_256 |
6056 | 6056 PUTC "," |
6057 movff analog_sw1,lo; right | |
6058 output_256 | |
6059 | |
6060 ; ; deco engine scheduling performance | |
6061 ; MOVII int_O_profiling_overrun,mpr ; runtime +/- versus target | |
6062 ; btfss mpr+1,7 ; overrun? | |
6063 ; bra TFT_debug_output_1 ; YES | |
6064 ; bcf mpr+1,7 ; NO - clear flag | |
6065 ; PUTC "-" ; - print a minus | |
6066 ; bra TFT_debug_output_2 ; - continue | |
6067 ;TFT_debug_output_1: | |
6068 ; PUTC " " ; print a space instead of the minus | |
6069 ;TFT_debug_output_2: | |
6070 ; output_999 ; print time (0-999) | |
6071 ; PUTC "." ; print a dot as separator | |
6072 ; MOVII int_O_profiling_overrun_max,mpr ; get max runtime so far | |
6073 ; output_999 ; print (0-999) | |
6074 ; PUTC "." ; print a dot as separator | |
6075 ; movff char_O_profiling_overrun_phase,WREG ; get calculation phase causing the max runtime | |
6076 ; output_hex ; print a hex | |
6077 ; PUTC "." ; print a dot as separator | |
6078 ; movff char_O_profiling_runs_norm,mpr ; get runs/cycle normal plan | |
6079 ; output_99 ; print (0-99) | |
6080 ; PUTC "." ; print a dot as separator | |
6081 ; movff char_O_profiling_runs_alt,mpr ; get runs/cycle alternative plan | |
6082 ; output_99 ; print (0-99) | |
6057 PRINT ; dump to screen | 6083 PRINT ; dump to screen |
6058 return ; done | 6084 return ; done |
6059 | 6085 |
6060 ENDIF ; _debug_output | 6086 ENDIF ; _debug_output |
6061 | 6087 |