changeset 303:9b1b0b32e7d5 new_screen_layout

Add configuration option to control depth warning blinking
author janos_kovacs <kovjanos@gmail.com>
date Mon, 01 Jun 2015 15:21:25 +0200
parents 4e803c136972
children a50edfada621 e9d058f20097
files src/comm.asm src/hwos.inc src/menu_tree.asm src/option_table.asm src/text_english.inc src/text_french.inc src/text_german.inc src/text_italian.inc src/tft_outputs.asm
diffstat 9 files changed, 31 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/comm.asm	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/comm.asm	Mon Jun 01 15:21:25 2015 +0200
@@ -955,6 +955,8 @@
     movff   char_I_bottom_usage, TXREG1     ; RCREG1=0x3C
     dcfsnz  WREG
     movff   char_I_deco_usage, TXREG1       ; RCREG1=0x3D
+    dcfsnz  WREG
+    movff   opt_depthblink, TXREG1       ; RCREG1=0x3E
 
 
 comm_read_abort:
@@ -1236,6 +1238,8 @@
     movff   RCREG1, char_I_bottom_usage     ; RCREG1=0x3C
     dcfsnz  WREG
     movff   RCREG1, char_I_deco_usage       ; RCREG1=0x3D
+    dcfsnz  WREG
+    movff   RCREG1, opt_depthblink          ; RCREG1=0x3E
 
 
 comm_write_abort:
--- a/src/hwos.inc	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/hwos.inc	Mon Jun 01 15:21:25 2015 +0200
@@ -569,6 +569,7 @@
 opt_flip_screen         res 1   ; =1: Flip the screen
 opt_cR_button_left      res 1   ; Left button sensitivity (cR hardware)
 opt_cR_button_right     res 1   ; Right button sensitivity (cR hardware)
+opt_depthblink          res 1   ; =1:do a red blinking warning, =0:default behaviour
 
 ;-----------------------------EEPROM DATA ------------------------------------
 ; Automatic reset of all options when this is changed:
--- a/src/menu_tree.asm	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/menu_tree.asm	Mon Jun 01 15:21:25 2015 +0200
@@ -614,11 +614,12 @@
     call    menu_processor_pop
 
 do_dispsets_menu:
-    MENU_BEGIN  tDispSets, .4
-        MENU_OPTION tBright,    oBrightness,    0
-        MENU_CALL   tColorScheme,               do_color_scheme
-        MENU_OPTION tFlip,     oFlipScreen,     0
-        MENU_CALL   tExit,                      do_return_settings
+    MENU_BEGIN  tDispSets, .5
+        MENU_OPTION tBright,       oBrightness,   0
+        MENU_CALL   tColorScheme,                 do_color_scheme
+        MENU_OPTION tFlip,         oFlipScreen,   0
+        MENU_OPTION tDepthBlink,   oDepthBlink,   0
+        MENU_CALL   tExit,                        do_return_settings
     MENU_END
 
 
--- a/src/option_table.asm	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/option_table.asm	Mon Jun 01 15:21:25 2015 +0200
@@ -199,6 +199,7 @@
         OPTION_UINT8p10 ocR_button_right,.20, .100,   .40,  tPercent, .153,    opt_cR_button_right              ; right button sensitivity
         OPTION_UINT8    obottom_usage,  .5,.50,   .20,tLitersMinute,  .154,    char_I_bottom_usage              ; l/min
         OPTION_UINT8    odeco_usage,    .5,.50,   .20,tLitersMinute,  .155,    char_I_deco_usage                ; l/min
+        OPTION_BOOL     oDepthBlink,    0,                            .156,    opt_depthblink                   ; =1: red depth blinking warning
 
 ;=============================================================================
 ; Set Time/Set Date (RAM only)
--- a/src/text_english.inc	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/text_english.inc	Mon Jun 01 15:21:25 2015 +0200
@@ -135,6 +135,7 @@
     TCODE   tHigh,      "High"
     TCODE   tDvSalinity,"Salinity:"             ; Salinity
     TCODE   tFlip,      "Rotate Screen:"        ; Rotate Screen
+    TCODE   tDepthBlink,"Depth warn blink:"
 
 ; Setup Menu
     TCODE   tSystSets,  "Settings"
--- a/src/text_french.inc	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/text_french.inc	Mon Jun 01 15:21:25 2015 +0200
@@ -135,6 +135,7 @@
     TCODE   tHigh,      "Haute"
     TCODE   tDvSalinity,"Salinité:"             ; Salinity
     TCODE   tFlip,      "Pivoter l'écran:"      ; Rotate Screen
+    TCODE   tDepthBlink,"Depth warn blink:"
 
 ; Setup Menu
     TCODE   tSystSets,  "Réglages"
--- a/src/text_german.inc	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/text_german.inc	Mon Jun 01 15:21:25 2015 +0200
@@ -135,6 +135,7 @@
     TCODE   tHigh,      "Hoch"
     TCODE   tDvSalinity,"Salinität:"             ; Salinity
     TCODE   tFlip,      "Anzeige drehen:"        ; Rotate Screen
+    TCODE   tDepthBlink,"Depth warn blink:"
 
 ; Setup Menu
     TCODE   tSystSets,  "Konfiguration"
--- a/src/text_italian.inc	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/text_italian.inc	Mon Jun 01 15:21:25 2015 +0200
@@ -135,6 +135,7 @@
     TCODE   tHigh,      "Alta"
     TCODE   tDvSalinity,"Salinita':"             ; Salinity
     TCODE   tFlip,      "Ruotare schermo:"       ; Rotate Screen
+    TCODE   tDepthBlink,"Depth warn blink:"
 
 ; Setup Menu
     TCODE   tSystSets,  "Impostazioni"
--- a/src/tft_outputs.asm	Mon Jun 01 11:48:05 2015 +0200
+++ b/src/tft_outputs.asm	Mon Jun 01 15:21:25 2015 +0200
@@ -239,10 +239,21 @@
 	movff	hi,sub_b+1
 	movff	hi_temp,hi
 	movff	lo_temp,lo			; Restore hi, lo
+
+    TSTOSS  opt_depthblink			; 0=standard, 1=blink
+	bra		TFT_color_code_depth_std
+;TFT_color_code_depth_blink:
 	call	subU16			;  sub_c = sub_a - sub_b
 	btfss	neg_flag
 	bra		TFT_color_code_depth_warn ; Set to warning color
     call    TFT_color_code_ppo2_depth  ; check depth against MOD
+    return
+
+TFT_color_code_depth_std:
+	call	subU16			   ; sub_c = sub_a - sub_b
+	btfss	neg_flag
+	bra		TFT_warnings_color ; Set to warning color
+    call    TFT_standard_color
 	return
 
 TFT_color_code_ppo2_depth:
@@ -1916,7 +1927,7 @@
     movlw   .3                      ; limit to three chars
     call    TFT_fillup_with_spaces  ; Fillup FSR2 with spaces (Total string length in #WREG)
 	STRCAT_PRINT ""					; Display feet
-    bcf     win_invert                  ; Reset invert flag
+    bcf     win_invert              ; Reset invert flag
     return
 
 depth_less_0.3mtr_feet:
@@ -2028,6 +2039,9 @@
 	return
 
 TFT_depth_blink:
+    TSTOSS  opt_depthblink			; 0=standard, 1=blink
+    return
+
     ; check if previous cycle had the blinking warning or not
     btfsc   blinking_depth_prev         ; did we have warning prev?
     bra     TFT_depth_blink_prevwarn    ; Yes