Mercurial > public > mk2
changeset 209:cdba979821ee
frame around logbook scale, some more speed improvements
new WIN_FRAME_COLOR macro
author | heinrichsweikamp |
---|---|
date | Sun, 20 Feb 2011 10:59:03 +0100 |
parents | 3b961f17aa3a |
children | f60acc323701 |
files | code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/menu_logbook.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_asm_part1/strings.asm code_part1/OSTC_code_asm_part1/strings.inc |
diffstat | 5 files changed, 26 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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!
--- 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
--- 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
--- 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
--- 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 +