# HG changeset patch # User Janos Kovacs # Date 1435456508 -7200 # Node ID d07f7d07e5683bfc86c8d82c30b1315e911b6aee # Parent 8b9b03b70b144a7d002387798ddcd8839a89d40d# Parent 14b466f66a7f9e7e1fa852070fb84d86a4032fe3 Merged new_screen_layout into default diff -r 8b9b03b70b14 -r d07f7d07e568 src/comm.asm --- a/src/comm.asm Fri Jun 26 15:03:47 2015 +0200 +++ b/src/comm.asm Sun Jun 28 03:55:08 2015 +0200 @@ -961,6 +961,8 @@ movff opt_vsitextv2, TXREG1 ; RCREG1=0x3F dcfsnz WREG movff opt_vsigraph, TXREG1 ; RCREG1=0x40 + dcfsnz WREG + movff opt_extceiling, TXREG1 ; RCREG1=0x41 comm_read_abort: @@ -1248,6 +1250,8 @@ movff RCREG1, opt_vsitextv2 ; RCREG1=0x3F dcfsnz WREG movff RCREG1, opt_vsigraph ; RCREG1=0x40 + dcfsnz WREG + movff RCREG1, opt_extceiling ; RCREG1=0x41 comm_write_abort: diff -r 8b9b03b70b14 -r d07f7d07e568 src/customview.asm --- a/src/customview.asm Fri Jun 26 15:03:47 2015 +0200 +++ b/src/customview.asm Sun Jun 28 03:55:08 2015 +0200 @@ -77,6 +77,19 @@ return customview_1sec_view9: ; Ceiling call TFT_ceiling ; Show Ceiling + + TSTOSS opt_extceiling ; 0=skip, 1=draw + return + + ; ppO2 value + call TFT_display_ppo2_val + + ; current GF value + extern char_I_deco_model + TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF + return ; No GF info for non-GF modes + call TFT_gf_info ; Update GF informations + return @@ -478,6 +491,21 @@ bra customview_toggle ; Yes, Call next view... call TFT_ceiling_mask ; Setup mask call TFT_ceiling ; Show Ceiling + + TSTOSS opt_extceiling ; 0=skip, 1=draw + bra customview_toggle_exit + + ; ppO2 value + call TFT_mask_ppo2 + call TFT_display_ppo2_val + + ; current GF value + extern char_I_deco_model + TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF + bra customview_toggle_exit ; No GF info for non-GF modes + call TFT_gf_mask_cGF ; Setup Mask - current GF only + call TFT_gf_info ; Show GF informations + bra customview_toggle_exit diff -r 8b9b03b70b14 -r d07f7d07e568 src/divemode.inc --- a/src/divemode.inc Fri Jun 26 15:03:47 2015 +0200 +++ b/src/divemode.inc Sun Jun 28 03:55:08 2015 +0200 @@ -26,12 +26,13 @@ ; - header: has the titles (mask) ; - content: has the values ;******* Upper content / header row ******* -#DEFINE dm_mask_depth_row .0 -#DEFINE dm_mask_depth_column .12 -#DEFINE dm_mask_maxdepth_row .0 -#DEFINE dm_mask_maxdepth_column .73 -#DEFINE dm_mask_divetime_row .0 -#DEFINE dm_mask_divetime_column .122 +#DEFINE dm_mask_depth_row .0 +#DEFINE dm_mask_depth_column .12 +#DEFINE dm_mask_maxdepth_row .0 +#DEFINE dm_mask_maxdepth_column .73 +#DEFINE dm_mask_maxdepth_column_nvsi .63 +#DEFINE dm_mask_divetime_row .0 +#DEFINE dm_mask_divetime_column .122 ; The content row contains 3 columns: ; - depth and ascend rate warning @@ -61,14 +62,17 @@ #DEFINE dm_velobar_width .12 ;******* Upper content / content row / 2nd col ******* -#DEFINE dm_upcnt_2ndcol .74 ; 74 +#DEFINE dm_upcnt_2ndcol .74 ; 74 +#DEFINE dm_upcnt_2ndcol_nvsi .64 ; 64 ; Max depth -#DEFINE dm_max_depth_row dm_offset ; 14 -#DEFINE dm_max_depth_column dm_upcnt_2ndcol ; 74 -#DEFINE dm_max_depth_bot dm_max_depth_row+.34 ; 48 -#DEFINE dm_max_depth_rgt dm_max_depth_column+.36 ; 100 -#DEFINE dm_max_depth_dm_row dm_max_depth_row+.11 ; 25 -#DEFINE dm_max_depth_dm_column dm_max_depth_column+.23 ; 87 +#DEFINE dm_max_depth_row dm_offset ; 14 +#DEFINE dm_max_depth_column dm_upcnt_2ndcol ; 74 +#DEFINE dm_max_depth_column_nvsi dm_upcnt_2ndcol_nvsi ; 64 +#DEFINE dm_max_depth_bot dm_max_depth_row+.34 ; 48 +#DEFINE dm_max_depth_rgt dm_max_depth_column+.36 ; 100 +#DEFINE dm_max_depth_dm_row dm_max_depth_row+.11 ; 25 +#DEFINE dm_max_depth_dm_column dm_max_depth_column+.23 ; 87 +#DEFINE dm_max_depth_dm_column_nvsi dm_max_depth_column_nvsi+.23 ; 77 ; Warning area (combined) #DEFINE dm_warning_row dm_offset+.36 ; 50 #DEFINE dm_warning_column dm_upcnt_2ndcol ; 74 @@ -256,10 +260,12 @@ ;******* Custom content / #8 - Ceiling value for GF_hi ******* ; Title #DEFINE dm_custom_ceiling_text_row dm_customview_row+.1 ; 102 -#DEFINE dm_custom_ceiling_text_column .66 ; 66 +#DEFINE dm_custom_ceiling_text_column .68 ; 66 +#DEFINE dm_custom_ceiling_ppo2_column .8 ; 8 ; Value #DEFINE dm_custom_ceiling_value_row dm_customview_row+.18 ; 119 -#DEFINE dm_custom_ceiling_value_column .64 ; 64 +#DEFINE dm_custom_ceiling_value_column .66 ; 64 +#DEFINE dm_custom_ceiling_ppo2_val_col .2 ; 2 ; II. End of the custom conent row. (101-163) diff -r 8b9b03b70b14 -r d07f7d07e568 src/hwos.inc --- a/src/hwos.inc Fri Jun 26 15:03:47 2015 +0200 +++ b/src/hwos.inc Sun Jun 28 03:55:08 2015 +0200 @@ -575,6 +575,7 @@ opt_modwarning res 1 ; =1:do a red blinking warning, =0:default behaviour opt_vsitextv2 res 1 ; =1:use the depth dependent ascend rate limits opt_vsigraph res 1 ; =1:draw the graphical VSI bar +opt_extceiling res 1 ; =1:print ppO2 and currentGF on the Ceiling Custom View ;-----------------------------EEPROM DATA ------------------------------------ ; Automatic reset of all options when this is changed: diff -r 8b9b03b70b14 -r d07f7d07e568 src/menu_tree.asm --- a/src/menu_tree.asm Fri Jun 26 15:03:47 2015 +0200 +++ b/src/menu_tree.asm Sun Jun 28 03:55:08 2015 +0200 @@ -618,12 +618,13 @@ call menu_processor_pop do_dispsets_menu: - MENU_BEGIN tDispSets, .6 + MENU_BEGIN tDispSets, .7 MENU_OPTION tBright, oBrightness, 0 MENU_CALL tColorScheme, do_color_scheme MENU_OPTION tFlip, oFlipScreen, 0 MENU_OPTION tMODwarning, oMODwarning, 0 MENU_CALL tDispSetVSI, do_dispsets_VSI_menu + MENU_OPTION tExtCeiling, oExtCeiling, 0 MENU_CALL tExit, do_return_settings MENU_END diff -r 8b9b03b70b14 -r d07f7d07e568 src/option_table.asm --- a/src/option_table.asm Fri Jun 26 15:03:47 2015 +0200 +++ b/src/option_table.asm Sun Jun 28 03:55:08 2015 +0200 @@ -202,6 +202,7 @@ OPTION_BOOL oMODwarning, 0, .156, opt_modwarning ; =1: red depth blinking warning OPTION_BOOL oVSItextv2, 0, .157, opt_vsitextv2 ; =1: use the dynamic (depends on depth) ascend rate limits OPTION_BOOL oVSIgraph, 0, .158, opt_vsigraph ; =1: draw the graphical VSI bar + OPTION_BOOL oExtCeiling, 0, .159, opt_extceiling ; =1:print ppO2 and currentGF on the Ceiling Custom View ;============================================================================= ; Set Time/Set Date (RAM only) diff -r 8b9b03b70b14 -r d07f7d07e568 src/text_english.inc --- a/src/text_english.inc Fri Jun 26 15:03:47 2015 +0200 +++ b/src/text_english.inc Sun Jun 28 03:55:08 2015 +0200 @@ -137,6 +137,7 @@ TCODE tFlip, "Rotate Screen:" ; Rotate Screen TCODE tMODwarning,"MOD warning:" ; MOD warning TCODE tDispSetVSI,"VSI Settings..." ; VSI Settings... + TCODE tExtCeiling,"Ext. Ceiling CV:" ; Ext Ceiling CV ; VSI display Settings TCODE tDispSetVSItitle, "VSI Display Settings" ; VSI display Settings diff -r 8b9b03b70b14 -r d07f7d07e568 src/text_french.inc --- a/src/text_french.inc Fri Jun 26 15:03:47 2015 +0200 +++ b/src/text_french.inc Sun Jun 28 03:55:08 2015 +0200 @@ -137,6 +137,7 @@ TCODE tFlip, "Pivoter l'écran:" ; Rotate Screen TCODE tMODwarning,"MOD warning:" ; MOD warning TCODE tDispSetVSI,"VSI Settings..." ; VSI Settings... + TCODE tExtCeiling,"Ext. Ceiling CV:" ; Ext Ceiling CV ; VSI display Settings TCODE tDispSetVSItitle, "VSI Display Settings" ; VSI display Settings diff -r 8b9b03b70b14 -r d07f7d07e568 src/text_german.inc --- a/src/text_german.inc Fri Jun 26 15:03:47 2015 +0200 +++ b/src/text_german.inc Sun Jun 28 03:55:08 2015 +0200 @@ -137,6 +137,7 @@ TCODE tFlip, "Anzeige drehen:" ; Rotate Screen TCODE tMODwarning,"MOD Warnung:" ; MOD warning TCODE tDispSetVSI,"VSI Settings..." ; VSI Settings... + TCODE tExtCeiling,"Ext. Ceiling CV:" ; Ext Ceiling CV ; VSI display Settings TCODE tDispSetVSItitle, "VSI Display Settings" ; VSI display Settings diff -r 8b9b03b70b14 -r d07f7d07e568 src/text_italian.inc --- a/src/text_italian.inc Fri Jun 26 15:03:47 2015 +0200 +++ b/src/text_italian.inc Sun Jun 28 03:55:08 2015 +0200 @@ -137,6 +137,7 @@ TCODE tFlip, "Ruotare schermo:" ; Rotate Screen TCODE tMODwarning,"MOD warning:" ; MOD warning TCODE tDispSetVSI,"VSI Settings..." ; VSI Settings... + TCODE tExtCeiling,"Ext. Ceiling CV:" ; Ext Ceiling CV ; VSI display Settings TCODE tDispSetVSItitle, "VSI Display Settings" ; VSI display Settings diff -r 8b9b03b70b14 -r d07f7d07e568 src/tft_outputs.asm --- a/src/tft_outputs.asm Fri Jun 26 15:03:47 2015 +0200 +++ b/src/tft_outputs.asm Sun Jun 28 03:55:08 2015 +0200 @@ -532,6 +532,8 @@ WIN_TINY dm_mask_depth_column,dm_mask_depth_row STRCAT_TEXT_PRINT tDepth WIN_TINY dm_mask_maxdepth_column,dm_mask_maxdepth_row + TSTOSS opt_vsigraph ; 0=skip, 1=draw + WIN_TINY dm_mask_maxdepth_column_nvsi,dm_mask_maxdepth_row STRCAT_TEXT_PRINT tMaxDepth WIN_TINY dm_mask_divetime_column,dm_mask_divetime_row STRCAT_TEXT_PRINT tDivetime @@ -540,10 +542,15 @@ if dm_offset == 0 movlw color_dark_red call TFT_set_color + TSTOSS opt_vsigraph ; 0=skip, 1=draw + bra $+4 WIN_FRAME_COLOR16 dm_velobar_top, dm_velobar_bot, dm_velobar_lft, dm_velobar_rgt ;top, bottom, left, right WIN_FRAME_COLOR16 dm_sep_1_2_row, dm_sep_1_2_row, .0, .159 ;top, bottom, left, right WIN_FRAME_COLOR16 dm_sep_2_3_row, dm_sep_2_3_row, .0, .159 ;top, bottom, left, right WIN_FRAME_COLOR16 dm_warning_row-.1, dm_warning_row-.1, dm_warning_column, .159 ;top, bottom, left, right + TSTOSS opt_vsigraph ; 0=skip, 1=draw + bra $+4 + WIN_FRAME_COLOR16 dm_warning_row-.1, dm_warning_row-.1, dm_max_depth_column_nvsi, .159 ;top, bottom, left, right call TFT_draw_gassep_line endif @@ -997,14 +1004,14 @@ return TFT_velocity_VSIbar: + TSTOSS opt_vsigraph ; 0=skip, 1=draw + return + ; use another logic when descending btfss neg_flag_velocity bra TFT_velocity_VSIbar_desc call TFT_velocity_VSIbar_desc_clr - TSTOSS opt_vsigraph ; 0=skip, 1=draw - return - btfsc velocity_warn bra TFT_velocity_VSIbar_warn ; if all ok or attention, use attn's values @@ -1222,6 +1229,8 @@ return TFT_velocity_VSIbar_clr: ; clears the ascend part of the bar + TSTOSS opt_vsigraph ; 0=skip, 1=draw + return WIN_BOX_BLACK dm_velobar_top+.1,dm_velobar_top+.63,dm_velobar_lft+.1,dm_velobar_rgt-.1 if dm_offset == 0 movlw color_dark_red @@ -1230,6 +1239,8 @@ return TFT_velocity_VSIbar_desc_clr: ; clears the descend part of the bar + TSTOSS opt_vsigraph ; 0=skip, 1=draw + return WIN_BOX_BLACK dm_velobar_top+.61,dm_velobar_bot-.1,dm_velobar_lft+.1,dm_velobar_rgt-.1 if dm_offset == 0 movlw color_dark_red @@ -3062,13 +3073,17 @@ ;TFT_max_pressure2_imperial call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet WIN_MEDIUM dm_max_depth_column, dm_max_depth_row + TSTOSS opt_vsigraph ; 0=skip, 1=draw + WIN_MEDIUM dm_max_depth_column_nvsi, dm_max_depth_row call TFT_standard_color output_16_3 STRCAT_PRINT "" return TFT_max_pressure2_metric: - WIN_MEDIUM dm_max_depth_column, dm_max_depth_row + WIN_MEDIUM dm_max_depth_column, dm_max_depth_row + TSTOSS opt_vsigraph ; 0=skip, 1=draw + WIN_MEDIUM dm_max_depth_column_nvsi, dm_max_depth_row call TFT_standard_color movlw .039 @@ -3113,6 +3128,8 @@ tft_max_depth2: WIN_MEDIUM dm_max_depth_column, dm_max_depth_row + TSTOSS opt_vsigraph ; 0=skip, 1=draw + WIN_MEDIUM dm_max_depth_column_nvsi, dm_max_depth_row STRCAT "0" tft_max_depth3: @@ -3122,6 +3139,8 @@ ; .1m in SMALL font WIN_SMALL dm_max_depth_dm_column, dm_max_depth_dm_row + TSTOSS opt_vsigraph ; 0=skip, 1=draw + WIN_SMALL dm_max_depth_dm_column_nvsi, dm_max_depth_dm_row SAFE_2BYTE_COPY max_pressure, lo call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] @@ -3786,8 +3805,18 @@ bcf leftbind return + global TFT_gf_mask_cGF ; Setup Mask +TFT_gf_mask_cGF: + ; The mask + call TFT_divemask_color + WIN_TINY dm_custom_gf_title_col3, dm_custom_gf_title_row + STRCPY_TEXT_PRINT tGFInfo + call TFT_standard_color + return + global TFT_gf_info ; Show GF informations TFT_gf_info: + call TFT_standard_color ; Show current GF movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model) movff char_I_deco_model,hi @@ -4069,6 +4098,34 @@ call TFT_warning_set_window_end return + global TFT_mask_ppo2 +TFT_mask_ppo2: + call TFT_divemask_color + WIN_TINY dm_custom_ceiling_ppo2_column, dm_custom_ceiling_text_row + STRCPY_TEXT_PRINT tppO2 + call TFT_standard_color + return + + global TFT_display_ppo2_val +TFT_display_ppo2_val: + SAFE_2BYTE_COPY amb_pressure, xA + movlw d'10' + movwf xB+0 + clrf xB+1 + call div16x16 ; xC=p_amb/10 + movff xC+0,xA+0 + movff xC+1,xA+1 + movff char_I_O2_ratio,xB+0 ; =O2 ratio + clrf xB+1 + call mult16x16 ; char_I_O2_ratio * p_amb/10 + + call TFT_standard_color + TFT_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) + WIN_STD dm_custom_ceiling_ppo2_val_col, dm_custom_ceiling_value_row + ; hijacking neg_flag_velocity to know where the value is displayed + bsf neg_flag_velocity + bra TFT_display_ppo2_com + global TFT_display_ppo2 TFT_display_ppo2: ; Show ppO2 (ppO2 stored in xC, in mbar!) rcall TFT_warning_set_window ; Sets the row and column for the current warning @@ -4077,6 +4134,9 @@ call TFT_warning_set_window_com TFT_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) STRCPY_TEXT tppO2 ; ppO2: + ; hijacking neg_flag_velocity to know where the value is displayed + bcf neg_flag_velocity +TFT_display_ppo2_com: ; Check very high ppO2 manually tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? bra TFT_show_ppO2_3 ; Yes, display fixed Value! @@ -4086,6 +4146,9 @@ output_16dp d'1' TFT_show_ppO2_2: movlw dm_warning_length ; Divemode string length + ; neg_flag_velocity is hijacked, used to toggle the fillup lenght. + btfsc neg_flag_velocity + movlw .4 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) STRCAT_PRINT "" call TFT_standard_color diff -r 8b9b03b70b14 -r d07f7d07e568 src/tft_outputs.inc --- a/src/tft_outputs.inc Fri Jun 26 15:03:47 2015 +0200 +++ b/src/tft_outputs.inc Sun Jun 28 03:55:08 2015 +0200 @@ -69,9 +69,11 @@ extern TFT_divemode_warning_clear extern TFT_velocity_clear extern TFT_display_velocity - extern TFT_clear_customview_divemode + extern TFT_clear_customview_divemode extern TFT_display_deko + extern TFT_mask_ppo2 extern TFT_display_ppo2 + extern TFT_display_ppo2_val extern TFT_update_batt_percent_divemode extern TFT_display_apnoe_descent extern TFT_apnoe_clear_surface @@ -92,6 +94,7 @@ extern TFT_ead_end_tissues_clock_mask ; Setup Mask extern TFT_ead_end_tissues_clock ; Show EAD/END, Tissues and clock extern TFT_gf_mask ; Setup Mask + extern TFT_gf_mask_cGF ; Setup Mask - current GF only extern TFT_gf_info ; Show GF informations extern TFT_warning_agf ; Show a warning if aGF is selected ; extern TFT_dive_compass_mask ; Compass mask