# HG changeset patch
# User heinrichsweikamp
# Date 1497193900 -7200
# Node ID 4542d03f748a90ff67dffb3c92d21ba6a55d5191
# Parent 0910c227018feca5fdbb807790ecaaa4f9cc3e90
NEW: Last Dive customviews in surface mode with divetime, depth and interval
diff -r 0910c227018f -r 4542d03f748a src/changelog.txt
--- a/src/changelog.txt Fri Jun 09 14:47:02 2017 +0200
+++ b/src/changelog.txt Sun Jun 11 17:11:40 2017 +0200
@@ -1,4 +1,4 @@
-[2.16]
+[2.17]
- Stable Version -
NEW: Third and fourth logbook page per dive showing Gaslist and Setpoints in standard font size
BUGFIX: several minor graphic issues in logbook fixed
@@ -6,6 +6,7 @@
BUGFIX: Compass sensitivity for newer models
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
NEW: More customviews in surface mode for PSCR mode
+NEW: Last Dive customviews in surface mode with divetime, depth and interval
[2.15]
- Stable Version -
diff -r 0910c227018f -r 4542d03f748a src/customview.asm
--- a/src/customview.asm Fri Jun 09 14:47:02 2017 +0200
+++ b/src/customview.asm Sun Jun 11 17:11:40 2017 +0200
@@ -119,7 +119,7 @@
surf_customview_toggle:
bcf switch_right
incf menupos3,F ; Number of customview to show
- movlw d'7' ; Max number of customsviews in surface mode
+ movlw d'8' ; Max number of customsviews in surface mode
cpfsgt menupos3 ; Max reached?
bra surf_customview_mask ; No, show
movlw .1
@@ -142,10 +142,12 @@
bra surf_customview_init_view4 ; Custom Text
dcfsnz WREG,F
bra surf_customview_init_view5 ; Tissue Diagram
- dcfsnz WREG,F
+ dcfsnz WREG,F
bra surf_customview_init_view6 ; Compass
- dcfsnz WREG,F
+ dcfsnz WREG,F
bra surf_customview_init_view7 ; Deco settings
+ dcfsnz WREG,F
+ bra surf_customview_init_view8 ; Last Dive info
call I2C_sleep_accelerometer ; Stop accelerometer
call I2C_sleep_compass ; Stop compass
@@ -220,8 +222,9 @@
extern TFT_surface_compass_mask
call TFT_surface_compass_mask ; Show compass
bra customview_toggle_exit ; Done.
+
surf_customview_init_view7:
- btfsc FLAG_gauge_mode
+ btfsc FLAG_gauge_mode ; View7: Deco settings
bra surf_customview_toggle
btfsc FLAG_apnoe_mode
bra surf_customview_toggle
@@ -230,6 +233,12 @@
call TFT_surface_decosettings ; Show all deco settings
bra customview_toggle_exit ; Done.
+surf_customview_init_view8: ; View8: Last dive info
+ call TFT_surface_lastdive ; Show last dive interval
+
+ bra customview_toggle_exit ; Done.
+
+
global menuview_toggle
menuview_toggle: ; Show Menu or the simulator tasks
movlw divemode_menuview_timeout
diff -r 0910c227018f -r 4542d03f748a src/ghostwriter.asm
--- a/src/ghostwriter.asm Fri Jun 09 14:47:02 2017 +0200
+++ b/src/ghostwriter.asm Sun Jun 11 17:11:40 2017 +0200
@@ -1020,6 +1020,11 @@
clrf lastdive_time+1
clrf lastdive_time+2
clrf lastdive_time+3
+ movff divemins+0,lastdive_duration+0
+ movff divemins+1,lastdive_duration+1
+ movff divesecs,lastdive_duration+2
+ movff max_pressure+0,lastdive_maxdepth+0
+ movff max_pressure+1,lastdive_maxdepth+1
banksel common
; Add more here...
diff -r 0910c227018f -r 4542d03f748a src/hwos.inc
--- a/src/hwos.inc Fri Jun 09 14:47:02 2017 +0200
+++ b/src/hwos.inc Sun Jun 11 17:11:40 2017 +0200
@@ -22,7 +22,7 @@
; Firmware definition
#DEFINE softwareversion_x d'2' ; Software version XX.YY
-#DEFINE softwareversion_y d'16' ; Software version XX.YY
+#DEFINE softwareversion_y d'17' ; Software version XX.YY
#DEFINE softwareversion_beta 0 ; (and 0 for release)
; Firmware version will appear in "Change Firmware" style
#DEFINE firmware_expire_year .18
@@ -571,6 +571,8 @@
battery_type res 1 ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah, =4: LiIon 3,7V/2.3Ah
uptime res 4 ; Uptime [s]
lastdive_time res 4 ; Time since last dive [s]
+lastdive_duration res 3 ; mins:2 and secs
+lastdive_maxdepth res 2 ; in mbar
battery_acumulated_charge res 2 ; Raw values in battery gauge IC
gauge_status_byte res 1 ; Gauge IC status byte
button_polarity res 1 ; 0xFF (Both normal), 0x00 (Both inverted), 0x01 (Left inverted only), 0x02 (Right inverted only)
diff -r 0910c227018f -r 4542d03f748a src/text_english.inc
--- a/src/text_english.inc Fri Jun 09 14:47:02 2017 +0200
+++ b/src/text_english.inc Sun Jun 11 17:11:40 2017 +0200
@@ -16,6 +16,7 @@
TCODE tMenu, "