Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 386:deced1cacff7 64kByte Logbook
Added velocity in divemode, BIG stopwatch in Gauge mode
author | heinrichsweikamp |
---|---|
date | Sat, 18 Jun 2011 20:17:39 +0200 |
parents | f2d5d93b4ca3 |
children | 0386c7e1374a |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm Sat Jun 18 17:52:52 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm Sat Jun 18 20:17:39 2011 +0200 @@ -1564,7 +1564,7 @@ movlw .039 cpfslt hi - bra depth_greater_99_84mtr + bra depth_greater_99_84mtr btfsc depth_greater_100m ; Was depth>100m during last call call PLED_clear_depth ; Yes, clear depth area @@ -1580,7 +1580,7 @@ movff lo,sub_b+0 incf sub_b+0,F movlw d'0' - addwfc sub_b+1,F ; Add 1mBar offset + addwfc sub_b+1,F ; Add 1mBar offset call sub16 ; sub_c = sub_a - sub_b btfss neg_flag ; Depth lower then 10m? rcall depth_less_10mtr ; Yes, add extra space @@ -1603,7 +1603,7 @@ bsf leftbind bsf ignore_digit4 - output_16 ; Full meters in Big font + output_16 ; Full meters in Big font bcf leftbind bra pled_depth3 @@ -1624,14 +1624,14 @@ STRCPY "." - movlw HIGH d'9' + movlw HIGH d'20' ; Display 0.0m if lower then 20cm movwf sub_a+1 - movlw LOW d'9' + movlw LOW d'20' movwf sub_a+0 movff hi,sub_b+1 movff lo,sub_b+0 call sub16 ; sub_c = sub_a - sub_b - btfss neg_flag ; Depth lower then 0.1m? + btfss neg_flag ; Depth lower then 0.3m? bra pled_depth4 ; Yes, display manual Zero movlw d'4' @@ -2222,6 +2222,57 @@ STRCAT_PRINT "m" return +PLED_stopwatch_show_gauge: + btfsc menubit ; Divemode menu active? + return ; Yes, return + ; BIG Stopwatch + call PLED_divemask_color ; Set Color for Divemode mask + DISPLAYTEXTH d'310' ; Stopwatch + DISPLAYTEXTH d'309' ; Average + call PLED_standard_color + ostc_debug 'V' ; Sends debug-information to screen if debugmode active + WIN_TOP .80 + WIN_LEFT .90 + WIN_FONT FT_MEDIUM + call PLED_standard_color + + lfsr FSR2,letter + movff average_divesecs+0,lo ; Stopwatch + movff average_divesecs+1,hi ; Stopwatch + movlw d'2' + subwf lo,F + movlw d'0' + subwfb hi,F ; Subtract 2 seconds + call convert_time ; converts hi:lo in seconds to mins (hi) and secs (lo) + movff lo,wait_temp + movff hi,lo + clrf hi + movlw d'0' + bcf leftbind + bsf show_last3 + output_16_3 ;Displays only 0...999 + PUTC ':' + movff wait_temp,lo + output_99x + call word_processor + + ostc_debug 'U' ; Sends debug-information to screen if debugmode active + WIN_TOP .136 + WIN_LEFT .90 + WIN_FONT FT_MEDIUM + call PLED_standard_color + lfsr FSR2,letter + movff avr_rel_pressure+0,lo + movff avr_rel_pressure+1,hi + call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar] + bsf ignore_digit5 ; do not display 1cm depth + output_16dp d'3' + bcf leftbind + STRCAT_PRINT "m" + WIN_FONT FT_SMALL ; Reset... + return + + PLED_total_average_show: ; Non-Resettable Average call PLED_divemask_color ; Set Color for Divemode mask @@ -3088,8 +3139,7 @@ return PLED_const_ppO2_too_hi: - movlw '>' - movwf POSTINC2 ; Put ">" from WREG into buffer + PUTC '>' setf lo ; show ">2.55" clrf hi ; clear hi call PLED_warnings_color ; Set Warning color