Mercurial > public > mk2
changeset 277:46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
author | heinrichsweikamp |
---|---|
date | Mon, 18 Apr 2011 10:23:22 +0200 |
parents | 02303915c199 |
children | 17aab4ca0547 |
files | code_part1/OSTC_code_asm_part1/customview.asm code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/divemode_menu.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm |
diffstat | 4 files changed, 51 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/customview.asm Mon Apr 18 01:19:06 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/customview.asm Mon Apr 18 10:23:22 2011 +0200 @@ -28,7 +28,7 @@ ; Show the customview-dependent entry for the divemode menu ; customview_menu_entry3: - bcf menu3_active ;=1: menu entry three in divemode menu is active +; bcf menu3_active ;=1: menu entry three in divemode menu is active movff menupos3,WREG ; copy dcfsnz WREG,F @@ -43,12 +43,12 @@ return customview_menu3_stopwatch: - bsf menu3_active ; Set Flag +; bsf menu3_active ; Set Flag DISPLAYTEXT .33 ; ResetAvr return customview_menu3_marker: - bsf menu3_active ; Set Flag +; bsf menu3_active ; Set Flag DISPLAYTEXT .30 ; Set Marker return @@ -148,7 +148,8 @@ ;============================================================================= ; Yes, show next customview (and delete this flag) -customview_toggle: +customview_toggle: + bcf menu3_active ;=1: menu entry three in divemode menu is active ostc_debug 'X' ; Sends debug-information to screen if debugmode active btfsc FLAG_apnoe_mode ; In Apnoe mode? @@ -190,6 +191,7 @@ bra customview_toggle ; No, use next Customview call PLED_stopwatch_show ; Init Stopwatch display + bsf menu3_active ; Set Flag bra customview_toggle_exit customview_init_marker: ; Init Marker @@ -199,6 +201,7 @@ call PLED_standard_color DISPLAYTEXT d'151' ; Set Marker? + bsf menu3_active ; Set Flag bra customview_toggle_exit customview_init_clock: ; Init Clock
--- a/code_part1/OSTC_code_asm_part1/definitions.asm Mon Apr 18 01:19:06 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Mon Apr 18 10:23:22 2011 +0200 @@ -86,6 +86,7 @@ ;============================================================================= #include "../OSTC_code_c_part2/shared_definitions.h" +;#include "shared_definitions.h" ;============================================================================= ; Reserve space for C-code data space. Eg.when calling log.
--- a/code_part1/OSTC_code_asm_part1/divemode_menu.asm Mon Apr 18 01:19:06 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode_menu.asm Mon Apr 18 10:23:22 2011 +0200 @@ -34,6 +34,12 @@ bcf switch_right bcf select_bailoutgas ; Clear Flag for Bailout list + + btfsc premenu ; Pre-Menu? already shown? + bra test_switches_divemode0 ; Yes, check if we should jump to menu Entry3 + +test_switches_divemode_a: + bsf premenu ; Set Flag for premenu bcf menubit clrf timeout_counter3 ; timeout_divemenu @@ -41,12 +47,19 @@ btfsc FLAG_apnoe_mode ; In Apnoe mode? bra test_switches_divemode1 ; Yes! -test_switches_divemode0: WIN_INVERT .1 DISPLAYTEXT .4 ;Menu? WIN_INVERT .0 return +test_switches_divemode0: + btfss menu3_active ; Something to do at Menupos=3? + bra test_switches_divemode_a ; No +; Yes! So show menu and jump to this position + movlw d'3' + movwf menupos + bra test_switches_divemode2b ; Show menu with cursor at menupos=3 + test_switches_divemode1: DISPLAYTEXT .141 ;Quit? return @@ -76,13 +89,14 @@ return test_switches_divemode2a: + movlw d'1' + movwf menupos ; reset cursor in divemode menu +test_switches_divemode2b: bsf menubit ; Enter Divemode-Menu! bcf premenu ; clear premenu flag call PLED_clear_divemode_menu ; Clear dive mode menu area call PLED_divemode_menu_mask_first ; Write Divemode menu1 mask bcf display_set_simulator ; Clear Simulator-Menu flag - movlw d'1' - movwf menupos ; reset cursor in divemode menu call PLED_divemenu_cursor ; show cursor bcf switch_right bcf switch_left ; Left button pressed!
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm Mon Apr 18 01:19:06 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm Mon Apr 18 10:23:22 2011 +0200 @@ -401,6 +401,9 @@ return PLED_display_ndl_mask: + btfsc menubit ; Divemode menu active? + return ; Yes, return + ; Clear Dekostop and Dekosum rcall PLED_clear_decoarea @@ -438,12 +441,15 @@ return PLED_display_deko_mask: - rcall PLED_clear_decoarea - ; total deco time word - call PLED_divemask_color ; Set Color for Divemode mask - DISPLAYTEXT d'85' ; TTS - call PLED_standard_color - return + btfsc menubit ; Divemode menu active? + return ; Yes, return + + rcall PLED_clear_decoarea + ; total deco time word + call PLED_divemask_color ; Set Color for Divemode mask + DISPLAYTEXT d'85' ; TTS + call PLED_standard_color + return PLED_display_deko: btfsc menubit ; Divemode menu active? @@ -3051,8 +3057,17 @@ WIN_TOP .216 lfsr FSR2,letter STRCAT_PRINT "END:" + call PLED_standard_color + + btfss FLAG_const_ppO2_mode ; are we in ppO2 mode? + bra PLED_show_end_ead_divemode2 ; no, show OC EAD and END + +; We are in CCR mode... + btfss is_bailout ; In bailout mode? + bra PLED_show_end_ead_divemode3 ; No, show CC EAD and END + +PLED_show_end_ead_divemode2: ; Show OC EAD and END ; Show EAD: char_I_N2_ratio/0.79*rel_pressure:2*10 -> char_I_N2_ratio*rel_pressure:2/7900 -> EAD in m - call PLED_standard_color WIN_LEFT .125 WIN_TOP .192 movff char_I_N2_ratio,xA+0 @@ -3095,6 +3110,10 @@ STRCAT_PRINT "m" ; Display END return +PLED_show_end_ead_divemode3: ; Show CC EAD and END +; ToDo... + return + PLED_show_leading_tissue: call PLED_divemask_color ; Set Color for Divemode mask