# HG changeset patch # User JeanDo # Date 1313708187 -7200 # Node ID 05ec97e106dadb640d0b983c54ac5a2686604f68 # Parent f6f818edf33328b6e8e05e65d01ec4fe23c440d4 Minor changes: Tp? curve in orange. Ceilling stippled area. diff -r f6f818edf333 -r 05ec97e106da code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Thu Aug 18 23:33:24 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Fri Aug 19 00:56:27 2011 +0200 @@ -64,7 +64,7 @@ #DEFINE color_deepblue b'00000010' ; (0,0,2) #DEFINE color_grey b'01001010' ; (2,2,2) #DEFINE color_cyan b'11011111' ; (6,7,3) -#DEFINE color orange b'11111000' ; (7,6,0) +#DEFINE color_orange b'11111000' ; (7,6,0) #DEFINE color_pink b'11111010' ; (7,6,2) #DEFINE warn_depth d'1' diff -r f6f818edf333 -r 05ec97e106da code_part1/OSTC_code_asm_part1/menu_logbook.asm --- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm Thu Aug 18 23:33:24 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm Fri Aug 19 00:56:27 2011 +0200 @@ -484,7 +484,7 @@ movff SSPBUF,hi ; Read min. Temperature movff lo,logbook_min_tp+0 ; Backup min Tp° too. movff hi,logbook_min_tp+1 - movlw color_pink ; Use same color as tp° curve + movlw color_orange ; Use same color as tp° curve call PLED_set_color call PLED_convert_signed_temperature ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required @@ -650,7 +650,7 @@ ;---- Draw Ceiling curve, if any --------------------------------------------- movf divisor_deco,W bz profile_display_skip_deco - + movf logbook_ceiling,W ; Any deco ceiling ? bz profile_display_skip_deco @@ -671,12 +671,18 @@ movff sim_pressure+0,xB+0 ; devide pressure in mbar/quant for row offsett movff sim_pressure+1,xB+1 call div16x16 ; xA/xB=xC - + movlw d'76' ; Starts right after the top blue line. movff WREG,win_top movff timeout_counter3,win_leftx2 ; Left border (0-159) movff xC+0,win_height call half_vertical_line ; Inputs: win_top, win_leftx2, win_height, win_color1, win_color2 + +; Horizontal bar: jaggy line, so don't keep it. +; movlw d'75' +; addwf xC+0,F ; add 75 pixel offset to result +; PIXEL_WRITE timeout_counter3,xC+0 ; Set col(0..159) x row (0..239), put a current color pixel. + profile_display_skip_deco: ;---- Draw Tp° curve, if any --------------------------------------------- @@ -688,7 +694,7 @@ incf WREG bz profile_display_skip_temp ; No: just skip drawing. - movlw LOW((.153*.256)/.370) ; fixed tp° scale: (-2 .. +35°C * scaleé56 )/153pix + movlw LOW((.153*.256)/.370) ; fixed tp° scale: (-2 .. +35°C * scale256 )/153pix movwf xB+0 movlw HIGH((.153*.256)/.370) movwf xB+1 @@ -713,7 +719,7 @@ cpfsgt xC+0 movff xC+1,xC+0 - movlw color_pink + movlw color_orange call PLED_set_color movf logbook_last_tp,W ; do we have a valid previous value ? diff -r f6f818edf333 -r 05ec97e106da code_part1/OSTC_code_asm_part1/oled_samsung.asm --- a/code_part1/OSTC_code_asm_part1/oled_samsung.asm Thu Aug 18 23:33:24 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/oled_samsung.asm Fri Aug 19 00:56:27 2011 +0200 @@ -131,13 +131,16 @@ ; Inputs: win_leftx2, win_top, win_height, win_color:2 ; Trashed: WREG, PROD, TABLAT, TBLPTRL half_vertical_line: - movff win_leftx2,WREG ; Init X position. - mullw 2 - rcall pixel_write_col320 ; Start Address Vertical (.0 - .319) - clrf TABLAT ; Loop index. half_vertical_line_loop: + movff win_leftx2,WREG ; Init X position. + mullw 2 + movf TABLAT,W ; Get loop index + andlw 1 ; Just low bit + xorwf PRODL,F ; And use it to jitter current X position + rcall pixel_write_col320 ; Start Address Vertical (.0 - .319) + movff win_height,WREG ; Index reached height (Bank0 read) ? xorwf TABLAT,W btfsc STATUS,Z ; Equals ?