# HG changeset patch # User heinrichsweikamp # Date 1298195943 -3600 # Node ID cdba979821ee152e9a86532384e84d4724e0d326 # Parent 3b961f17aa3a560b1941f9b13d983b2d4f66ddb1 frame around logbook scale, some more speed improvements new WIN_FRAME_COLOR macro diff -r 3b961f17aa3a -r cdba979821ee code_part1/OSTC_code_asm_part1/changelog.txt --- a/code_part1/OSTC_code_asm_part1/changelog.txt Sat Feb 19 18:44:22 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/changelog.txt Sun Feb 20 10:59:03 2011 +0100 @@ -1,6 +1,7 @@ New in 1.82 beta: BETA Version - Do NOT use for diving! CHANGE: Speed optimization in Logbook +NEW: Scale for Profile view in Logbook (10m,10min) New in 1.81 beta: BETA Version - Do NOT use for diving! diff -r 3b961f17aa3a -r cdba979821ee code_part1/OSTC_code_asm_part1/menu_logbook.asm --- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm Sat Feb 19 18:44:22 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm Sun Feb 20 10:59:03 2011 +0100 @@ -565,7 +565,9 @@ cpfsgt lo ; >159? bra display_profile2f ; No, draw another line - + movlw color_blue + WIN_FRAME_COLOR .75, .239, .4, .159 ;top, bottom, left, right with color in WREG + call I2CREAD2 ; skip 0xFB (Header-end) clrf timeout_counter2 ; here: used as counter for depth readings call I2CREAD2 ; skip 0xFB (Header-end) @@ -825,7 +827,7 @@ movff divenumber,lo output_99x ; # of dive PUTC ' ' - call I2CREAD2 + call I2CREAD2 ; logbook_profile_version (1st. byte of Header after the 0xFA, 0xFA) movff SSPBUF,lo movlw d'13' cpfsgt lo ; Skip if lo>13 @@ -843,8 +845,10 @@ call PLED_convert_date_short ; converts into "DD/MM" or "MM/DD" or "MM/DD" in s - call I2CREAD2 ; hours (Skip) - call I2CREAD2 ; minutes (skip) + incf_eeprom_address d'2' ; Skip Bytes in EEPROM (faster) +; call I2CREAD2 ; hours (Skip) +; call I2CREAD2 ; minutes (skip) + PUTC ' ' call I2CREAD2 ; Depth movff SSPBUF,lo @@ -855,10 +859,11 @@ output_16dp d'3' ; max. depth STRCAT "m " call I2CREAD2 - movff SSPBUF,lo + movff SSPBUF,lo ; read divetime in minutes call I2CREAD2 - movff SSPBUF,hi + movff SSPBUF,hi ; read divetime in minutes bsf leftbind output_16 ; Divetime minutes - STRCAT_PRINT "'" ; Display header-row in list + STRCAT_PRINT "'" ; Display header-row in list + incf_eeprom_address d'37' ; 12 Bytes read from header, skip 37 Bytes in EEPROM (Remaining Header) return diff -r 3b961f17aa3a -r cdba979821ee code_part1/OSTC_code_asm_part1/pled_outputs.asm --- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm Sat Feb 19 18:44:22 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm Sun Feb 20 10:59:03 2011 +0100 @@ -1459,8 +1459,7 @@ output_99 bcf leftbind call word_processor - bra PLED_active_gas_surfmode_exit - +; bra PLED_active_gas_surfmode_exit PLED_active_gas_surfmode_exit: ; WIN_FRAME_BLACK .122, .175, .82, .159 return diff -r 3b961f17aa3a -r cdba979821ee code_part1/OSTC_code_asm_part1/strings.asm --- a/code_part1/OSTC_code_asm_part1/strings.asm Sat Feb 19 18:44:22 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/strings.asm Sun Feb 20 10:59:03 2011 +0100 @@ -168,6 +168,8 @@ box_frame_std: call PLED_standard_color + +box_frame_common: VARARGS_BEGIN VARARGS_GET8 win_top VARARGS_GET8 win_height @@ -175,3 +177,7 @@ VARARGS_GET8 win_width VARARGS_END goto PLED_frame + +box_frame_color: + call PLED_set_color + bra box_frame_common diff -r 3b961f17aa3a -r cdba979821ee code_part1/OSTC_code_asm_part1/strings.inc --- a/code_part1/OSTC_code_asm_part1/strings.inc Sat Feb 19 18:44:22 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/strings.inc Sun Feb 20 10:59:03 2011 +0100 @@ -179,4 +179,10 @@ db top, (bottom)-(top)+1, left, (right)-(left)+1 endm +; Draw a frame with color from WREG (8bits rrrgggbb) +WIN_FRAME_COLOR macro top, bottom, left, right + call box_frame_color + db top, (bottom)-(top)+1, left, (right)-(left)+1 + endm +