# HG changeset patch # User heinrichsweikamp # Date 1309982800 -7200 # Node ID 2534277be060adbb81c39c082cd33c910a6baa22 # Parent dd780d7b352b07d8520067fb1894d93c0966c6cd Bug #52 fixed (ppO2 blinking if setpoint is not physically possible) diff -r dd780d7b352b -r 2534277be060 code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Thu Jun 30 19:47:53 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Wed Jul 06 22:06:40 2011 +0200 @@ -85,8 +85,8 @@ ;============================================================================= -#include "../OSTC_code_c_part2/shared_definitions.h" -;#include "shared_definitions.h" +;#include "../OSTC_code_c_part2/shared_definitions.h" +#include "shared_definitions.h" ;============================================================================= ; Reserve space for C-code data space. Eg.when calling log. diff -r dd780d7b352b -r 2534277be060 code_part1/OSTC_code_asm_part1/divemode.asm --- a/code_part1/OSTC_code_asm_part1/divemode.asm Thu Jun 30 19:47:53 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Wed Jul 06 22:06:40 2011 +0200 @@ -120,8 +120,8 @@ diveloop_loop1z bcf update_divetime ; clear flag - btfsc FLAG_const_ppO2_mode ; only in const_ppO2_mode - call PLED_const_ppO2_value ; display const ppO2 setting in [bar] +; btfsc FLAG_const_ppO2_mode ; only in const_ppO2_mode +; call PLED_const_ppO2_value ; display const ppO2 setting in [bar] btfsc ppO2_show_value ; show ppO2? call check_ppO2 ; check ppO2 and displays warning if required diff -r dd780d7b352b -r 2534277be060 code_part1/OSTC_code_asm_part1/pled_outputs.asm --- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm Thu Jun 30 19:47:53 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm Wed Jul 06 22:06:40 2011 +0200 @@ -3107,6 +3107,7 @@ cpfslt xC+0 ; Setpoint value possible? bra PLED_const_ppO2_value1 ; Yes + clrf hi ; Reset hi movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value bra PLED_const_ppO2_value1a @@ -3136,19 +3137,19 @@ ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value! - movff xC+0,xA+0 + movff xC+0,xA+0 ; xC=p_amb/10 movff xC+1,xA+1 movlw d'100' movwf xB+0 clrf xB+1 - call div16x16 ;xA/xB=xC with xA as remainder - - movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value - movff xC+1,hi ; For test if ppO2>2,55bar + call div16x16 ;xA/xB=xC with xA as remainder + + movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value + movff xC+1,hi ; For test if ppO2>2,55bar - GETCUSTOM8 d'39' ; Adjust fixed SP? + GETCUSTOM8 d'39' ; Adjust fixed SP? dcfsnz WREG,F - bra PLED_const_ppO2_value1a ; Yes! + bra PLED_const_ppO2_value1a ; Yes! ; Do not adjust -> restore original SetPoint PLED_const_ppO2_value11: @@ -3156,7 +3157,6 @@ movff ppO2_setpoint_store,char_I_const_ppO2 ; Restore Setpoint clrf hi - PLED_const_ppO2_value1a: movff char_I_const_ppO2,lo @@ -3172,7 +3172,7 @@ bsf leftbind output_16dp d'3' bcf leftbind - STRCAT_PRINT " " ; Display Setpoint with training zero + STRCAT_PRINT " " ; Display Setpoint with trailing zero call PLED_standard_color ; Reset color return