# HG changeset patch # User heinrichsweikamp # Date 1409240716 -7200 # Node ID 53425d598585d06e11d418161033a6507c6587f8 # Parent 380a07e4fc15fb291d9e8c30bab4d61aad184254 NEW: Store useage timer in logbook header (Byte 54) diff -r 380a07e4fc15 -r 53425d598585 code_part1/OSTC_code_asm_part1/changelog.txt --- a/code_part1/OSTC_code_asm_part1/changelog.txt Thu Aug 28 16:34:55 2014 +0200 +++ b/code_part1/OSTC_code_asm_part1/changelog.txt Thu Aug 28 17:45:16 2014 +0200 @@ -2,6 +2,7 @@ BETA Version BUGFIX: False bailout flag in logbook NEW: On-Time counter for better battery information +NEW: Store useage timer in logbook header (Byte 54) New in 2.93: BETA Version diff -r 380a07e4fc15 -r 53425d598585 code_part1/OSTC_code_asm_part1/divemode.asm --- a/code_part1/OSTC_code_asm_part1/divemode.asm Thu Aug 28 16:34:55 2014 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Thu Aug 28 17:45:16 2014 +0200 @@ -1608,8 +1608,17 @@ movff gaslist_active,WREG ; "Gas active" flag register call write_external_eeprom ; write WREG into external memory - clrf WREG - call write_external_eeprom ; Spare1 + movff on_time_seconds+0,xC+0 + movff on_time_seconds+1,xC+1 + movff on_time_seconds+2,xC+2 + clrf xC+4 + movlw LOW .3600 + movwf xB+0 + movlw HIGH .3600 + movwf xB+1 + call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder + movf xC+0,W + call write_external_eeprom ; Full hours of on-time since last full charge movlw 0xFB ; Header stop call write_external_eeprom diff -r 380a07e4fc15 -r 53425d598585 code_part1/OSTC_code_asm_part1/menu_battery.asm --- a/code_part1/OSTC_code_asm_part1/menu_battery.asm Thu Aug 28 16:34:55 2014 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_battery.asm Thu Aug 28 17:45:16 2014 +0200 @@ -77,16 +77,34 @@ WIN_TOP .119 lfsr FSR2,letter - OUTPUTTEXT .119 ; Lowest Battery at: - read_int_eeprom d'42' ; Month - movff EEDATA,convert_value_temp+0 - read_int_eeprom d'43' ; Day - movff EEDATA,convert_value_temp+1 - read_int_eeprom d'44' ; Year - movff EEDATA,convert_value_temp+2 - call DISP_convert_date ; coverts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2 + + STRCPY "On-Time: " ; On-Time in minutes:seconds + movff on_time_seconds+0,xC+0 + movff on_time_seconds+1,xC+1 + movff on_time_seconds+2,xC+2 + clrf xC+4 + movlw .60 + movwf xB+0 + clrf xB+1 + call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder + movff xC+1,hi + movff xC+0,lo + bsf leftbind + output_16 ; full minutes + PUTC " " + OUTPUTTEXT .90 ; Minutes call word_processor +; OUTPUTTEXT .119 ; Lowest Battery at: +; read_int_eeprom d'42' ; Month +; movff EEDATA,convert_value_temp+0 +; read_int_eeprom d'43' ; Day +; movff EEDATA,convert_value_temp+1 +; read_int_eeprom d'44' ; Year +; movff EEDATA,convert_value_temp+2 +; call DISP_convert_date ; coverts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2 +; call word_processor + WIN_TOP .147 lfsr FSR2,letter OUTPUTTEXT .120 ; Temp min: diff -r 380a07e4fc15 -r 53425d598585 docu/ostc_interface_description.odt Binary file docu/ostc_interface_description.odt has changed