# HG changeset patch # User heinrichsweikamp # Date 1336413821 -7200 # Node ID d14f72af4c076112b6ea128fb8dd309562e01f43 # Parent da400547220daf154e988929e761692170ab9414 Battery statistics reset when battery is fully charged diff -r da400547220d -r d14f72af4c07 code_part1/OSTC_code_asm_part1/adc_rtc.asm --- a/code_part1/OSTC_code_asm_part1/adc_rtc.asm Sun Apr 29 09:35:04 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/adc_rtc.asm Mon May 07 20:03:41 2012 +0200 @@ -237,11 +237,11 @@ movwf mins movlw .12 movwf hours - movlw .5 + movlw .7 movwf day movlw .5 movwf month - movlw .11 + movlw .12 movwf year bsf PIE1, TMR1IE return diff -r da400547220d -r d14f72af4c07 code_part1/OSTC_code_asm_part1/changelog.txt --- a/code_part1/OSTC_code_asm_part1/changelog.txt Sun Apr 29 09:35:04 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/changelog.txt Mon May 07 20:03:41 2012 +0200 @@ -4,6 +4,7 @@ BUGFIX: Missed deco stops issue BUGFIX: Timeout for 2nd page of Gas Setup BUGFIX: GasVolume checks for a gas-switch before the first stop +NEW: Battery statistics reset when battery is fully charged New in 2.21: BUGFIX: GF warning in logbook memory diff -r da400547220d -r d14f72af4c07 code_part1/OSTC_code_asm_part1/surfmode.asm --- a/code_part1/OSTC_code_asm_part1/surfmode.asm Sun Apr 29 09:35:04 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/surfmode.asm Mon May 07 20:03:41 2012 +0200 @@ -316,7 +316,7 @@ ; Yes, store all data for complete cycle bcf charge_started ; Clear flag bcf charge_done ; Clear flag - ; Store incomplete/total cycles + ; Store incomplete cycles read_int_eeprom d'50' ; Read byte (stored in EEDATA) movff EEDATA,temp1 ; Low byte read_int_eeprom d'51' ; Read byte (stored in EEDATA) @@ -353,6 +353,47 @@ movff year,EEDATA write_int_eeprom d'49' + ; Reset lowest battery seen + movlw LOW d'4200' ; reset to 4.2V + movwf EEDATA + write_int_eeprom d'40' + movlw HIGH d'4200' ; reset to 4.2V + movwf EEDATA + write_int_eeprom d'41' + movff month,EEDATA + write_int_eeprom d'42' + movff day,EEDATA + write_int_eeprom d'43' + movff year,EEDATA + write_int_eeprom d'44' + ; Reset temperature + SAFE_2BYTE_COPY temperature,lo + movff lo,EEDATA + write_int_eeprom d'45' + movff hi,EEDATA + write_int_eeprom d'46' + ; Reset temperature extremas + SAFE_2BYTE_COPY temperature,lo + movff lo,EEDATA ; Reset mimimum extrema + write_int_eeprom d'54' + movff hi,EEDATA + write_int_eeprom d'55' + movff month,EEDATA + write_int_eeprom d'56' + movff day,EEDATA + write_int_eeprom d'57' + movff year,EEDATA + write_int_eeprom d'58' + movff lo,EEDATA ; Reset maximum extrema + write_int_eeprom d'59' + movff hi,EEDATA + write_int_eeprom d'60' + movff month,EEDATA + write_int_eeprom d'61' + movff day,EEDATA + write_int_eeprom d'62' + movff year,EEDATA + write_int_eeprom d'63' return test_charger2: @@ -360,7 +401,7 @@ return ; No, quit! bcf charge_started ; Clear flag - ; Store incomplete/total cycles + ; Store incomplete cycles read_int_eeprom d'50' ; Read byte (stored in EEDATA) movff EEDATA,temp1 ; Low byte read_int_eeprom d'51' ; Read byte (stored in EEDATA)