Mercurial > public > mk2
changeset 137:e6aa4a74c3c2
Fix: Customviews for Apnoe and Gauge mode
author | mh <> |
---|---|
date | Wed, 05 Jan 2011 20:44:10 +0100 |
parents | 20b2c77a6cd2 |
children | dd4b899c56c1 |
files | code_part1/OSTC_code_asm_part1/customview.asm code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/start.asm |
diffstat | 3 files changed, 27 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/customview.asm Wed Jan 05 17:28:23 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/customview.asm Wed Jan 05 20:44:10 2011 +0100 @@ -128,7 +128,7 @@ customview_minute_marker: ; Do nothing extra customview_minute_stopwatch: ; Do nothing extra -customview_minute_average: ; Do nothing extra +customview_minute_average: ; Do nothing extra return ;============================================================================= @@ -136,8 +136,12 @@ customview_toggle: ostc_debug 'X' ; Sends debug-information to screen if debugmode active + + btfsc FLAG_apnoe_mode ; In Apnoe mode? + bra customview_toggle_exit ; Yes, ignore custom view in divemode completely + incf menupos3,F ; Number of customview to show - movlw d'6' ; Max number + movlw d'6' ; Max number cpfsgt menupos3 ; Max reached? bra customview_mask ; No, show clrf menupos3 ; Reset to zero (Zero=no custom view) @@ -190,6 +194,9 @@ decfsz WREG,F ; WREG=1? bra customview_toggle ; No, use next Customview + btfsc no_deco_customviews ; no-deco-mode-flag = 1 + bra customview_toggle ; Yes, use next Customview! + call PLED_show_leading_tissue bra customview_toggle_exit @@ -198,6 +205,9 @@ decfsz WREG,F ; WREG=1? bra customview_toggle ; No, use next Customview + btfsc no_deco_customviews ; no-deco-mode-flag = 1 + bra customview_toggle ; Yes, use next Customview! + call deco_calc_desaturation_time ; calculate desaturation time movlb b'00000001' ; select ram bank 1 call PLED_tissue_saturation_graph @@ -232,10 +242,16 @@ bra surfcustomview_toggle_exit surfcustomview_init_graphs: + btfsc no_deco_customviews ; no-deco-mode-flag = 1 + bra surfcustomview_toggle ; Yes, use next Customview! + call PLED_tissue_saturation_graph; Draw the graphs bra surfcustomview_toggle_exit surfcustomview_init_gaslist: + btfsc no_deco_customviews ; no-deco-mode-flag = 1 + bra surfcustomview_toggle ; Yes, use next Customview! + call PLED_pre_dive_screen ; Show the Gaslist/Setpoint list bra surfcustomview_toggle_exit @@ -286,8 +302,8 @@ ; return ;surfcustomview_1sec_cfview: ; Do nothing extra ;surfcustomview_1sec_graphs: ; Do nothing extra -;surfcustomview_1sec_gaslist: ; Do nothing extra -;surfcustomview_1sec_interval: ; Do nothing extra +;surfcustomview_1sec_gaslist: ; Do nothing extra +;surfcustomview_1sec_interval: ; Do nothing extra return ;============================================================================= @@ -301,7 +317,7 @@ dcfsnz WREG,F bra surfcustomview_minute_interval ; Update the Interval display dcfsnz WREG,F - bra surfcustomview_minute_cfview ; Update the critical cf view + bra surfcustomview_minute_cfview ; Update the critical cf view ; Menupos3=0, do nothing return
--- a/code_part1/OSTC_code_asm_part1/definitions.asm Wed Jan 05 17:28:23 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Wed Jan 05 20:44:10 2011 +0100 @@ -25,7 +25,7 @@ #DEFINE softwareversion_x d'1' ; Software version XX.YY #DEFINE softwareversion_y d'75' ; Software version XX.YY -#DEFINE max_custom_number d'48' ; Number of last used custom function +#DEFINE max_custom_number d'53' ; Number of last used custom function #DEFINE logbook_profile_version 0x20 ; Do not touch! @@ -610,7 +610,7 @@ #DEFINE reset_average_depth flag15,2 ;=1: Average Depth will be resetted #DEFINE blinking_better_gas flag15,3 ;=1: Gas is currently blinking #DEFINE menu3_active flag15,4 ;=1: menu entry three in divemode menu is active -;unused flag15,5 ;=1: +#DEFINE no_deco_customviews flag15,5 ;=1: Selected mode is Apnoe or Gauge #DEFINE maxdepth_greater_100m flag15,6 ;=1: Max Depth greater>100m ;unused flag15,7 ;=1:
--- a/code_part1/OSTC_code_asm_part1/start.asm Wed Jan 05 17:28:23 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/start.asm Wed Jan 05 20:44:10 2011 +0100 @@ -198,6 +198,7 @@ bcf FLAG_apnoe_mode ; Pre-load modes for OC, GF 90/90 and no Aponoe or Gauge. + bcf no_deco_customviews ; Clear no-deco-mode-flag movlw d'0' movwf wait_temp movff wait_temp,char_I_deco_model ; Clear Flagbyte @@ -212,6 +213,7 @@ cpfseq EEDATA bra restart_3_test_ppO2_mode; check for ppO2 mode bsf gauge_mode ; Set flag for gauge mode + bsf no_deco_customviews ; Set no-deco-mode-flag return ; start in Surfacemode restart_3_test_ppO2_mode: movlw d'2' ; const ppO2 mode @@ -224,6 +226,7 @@ cpfseq EEDATA bra restart_4_test_gf_mode ; check for GF OC mode bsf FLAG_apnoe_mode ; Set flag for Apnoe Mode + bsf no_deco_customviews ; Set no-deco-mode-flag return ; start in Surfacemode restart_4_test_gf_mode: movlw d'4' ; GF OC mode @@ -246,7 +249,7 @@ movlw d'1' movwf wait_temp movff wait_temp,char_I_deco_model ; Set Flagbyte for GF method -; Load GF values into RAM + ; Load GF values into RAM GETCUSTOM8 d'32' ; GF low movff EEDATA,char_I_GF_Lo_percentage GETCUSTOM8 d'33' ; GF high