# HG changeset patch # User heinrichsweikamp # Date 1355154918 -3600 # Node ID 3927bc5019c901027624f9422a7dda8c6c4ba11a # Parent 7e651625d4c028ec0f6748d161cf7190506ad323 show some feedback if marker was set diff -r 7e651625d4c0 -r 3927bc5019c9 code_part1/OSTC_code_asm_part1/customview.asm --- a/code_part1/OSTC_code_asm_part1/customview.asm Mon Dec 10 16:12:22 2012 +0100 +++ b/code_part1/OSTC_code_asm_part1/customview.asm Mon Dec 10 16:55:18 2012 +0100 @@ -279,6 +279,15 @@ call PLED_standard_color DISPLAYTEXT d'151' ; Set Marker? bsf menu3_active ; Set Flag + + btfss event_occured ; Is an event active? + bra customview_toggle_exit ; No + + movlw d'6' ; Type of Alarm (Manual Marker) + cpfseq AlarmType ; Marker recently set? + bra customview_toggle_exit ; No + + call PLED_marker_set ; Show some feedback bra customview_toggle_exit customview_init_clock: ; Init Clock diff -r 7e651625d4c0 -r 3927bc5019c9 code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Mon Dec 10 16:12:22 2012 +0100 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Mon Dec 10 16:55:18 2012 +0100 @@ -361,6 +361,9 @@ safety_stop_countdown res 1 ; counts seconds of safety stop better_gas_number res 1 ; number (1-5) of the "better gas" in divemode, =0: no better gas available +marker_depth res 2 ; rel. pressure [mbar] of last set marker +marker_time res 3 ; divetime mins:2 and sec of last marker + ASSERT_BANK1 MACRO tag Ifdef __DEBUG diff -r 7e651625d4c0 -r 3927bc5019c9 code_part1/OSTC_code_asm_part1/divemode_menu.asm --- a/code_part1/OSTC_code_asm_part1/divemode_menu.asm Mon Dec 10 16:12:22 2012 +0100 +++ b/code_part1/OSTC_code_asm_part1/divemode_menu.asm Mon Dec 10 16:55:18 2012 +0100 @@ -251,7 +251,13 @@ movlw d'6' ; Type of Alarm (Manual Marker) movwf AlarmType ; Copy to Alarm Register bsf event_occured ; Set Event Flag - bra timeout_divemenu2 ; quit menu! + + ; save snapshot of depth and time + SAFE_2BYTE_COPY rel_pressure,marker_depth + SAFE_2BYTE_COPY divemins,marker_time + movff divesecs,marker_time+2 + + bra timeout_divemenu2 ; quit menu! toggle_stopwatch: bsf reset_average_depth ; Average Depth will be resetted in divemode.asm @@ -808,7 +814,7 @@ btfss dekostop_active call PLED_display_ndl_mask ; Clear deco data, display nostop time - btfss decoplan_invalid ; The decoplan needs to updated + btfsc decoplan_invalid ; The decoplan needs to updated bra timeout_divemenu2a ; Yes, skip update btfsc dekostop_active diff -r 7e651625d4c0 -r 3927bc5019c9 code_part1/OSTC_code_asm_part1/pled_outputs.asm --- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm Mon Dec 10 16:12:22 2012 +0100 +++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm Mon Dec 10 16:55:18 2012 +0100 @@ -3805,6 +3805,38 @@ bcf leftbind return +PLED_marker_set: + WIN_LEFT .105 + WIN_TOP .170 + WIN_FONT FT_SMALL + WIN_INVERT .0 ; Init new Wordprocessor + call PLED_divemask_color ; Set Color for Divemode mask + SAFE_2BYTE_COPY marker_depth, lo + call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] + lfsr FSR2,letter + bsf leftbind + bsf ignore_digit5 ; do not display 1cm depth + output_16dp d'3' + PUTC TXT_METER_C + bcf show_last3 + call word_processor + + WIN_LEFT .105 + WIN_TOP .192 + WIN_INVERT .0 ; Init new Wordprocessor + movff marker_time+0,lo + movff marker_time+1,hi + bsf leftbind + lfsr FSR2,letter + output_16_3 ; displays only last three figures from a 16Bit value (0-999) + PUTC ':' + movff marker_time+2,lo + output_99x + call word_processor + bcf leftbind + call PLED_standard_color + return + PLED_topline_box_clear: ; Writes an empty box movlw .0 bra PLED_topline_box2