Mercurial > public > mk2
changeset 121:e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
author | JeanDo |
---|---|
date | Sun, 26 Dec 2010 23:49:11 +0100 (2010-12-26) |
parents | f24137eb85de |
children | 3003a8040b78 |
files | code_part1/OSTC_code_asm_part1/dive_icons.asm code_part1/OSTC_code_asm_part1/dive_nitrox.inc code_part1/OSTC_code_asm_part1/dive_trimix.inc code_part1/OSTC_code_asm_part1/menu_gassetup.asm code_part1/OSTC_code_asm_part1/menu_reset.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_asm_part1/text_table.asm |
diffstat | 7 files changed, 256 insertions(+), 176 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/dive_icons.asm Sun Dec 26 18:34:28 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/dive_icons.asm Sun Dec 26 23:49:11 2010 +0100 @@ -21,16 +21,29 @@ ;============================================================================= ; HISTORY ; 2010-12-21 : [jDG] Creation +; 2011-01-03 : [jDG] Force first gas to be active from depth=0. ; ; RATIONALS: Enabled gazes are used to predict TTS in divemode, hence they ; are a critical aspect that should be double-checked before dive. ; +; Known bug: ;============================================================================= ; Display either Air, Nitrox, or Trimix icon (in surface mode). ; Inputs: None: explore the gaz list. ; Ouputs: None. ; Trashed: hi:lo, PROD, and registers trashed by color_processor.asm dive_type_icons: + ;---- Don't display when not in the right deco mode -------------- + btfsc FLAG_apnoe_mode ; Apnoe selected ? + return ; YES: just return. + btfsc gauge_mode ; gauge mode ? + return ; YES: also return. + + ;---- Don't display CF#41 is false ------------------------------- + GETCUSTOM8 d'41' ; Read CF#41 + btfss WREG,0 ; Set ? + return ; NO: return + ;---- Common setup ----------------------------------------------- movlw .170 movff WREG, img_top @@ -39,26 +52,48 @@ movlw UPPER(dive_air_block) movwf TBLPTRU - ;---- Explore gazlist -------------------------------------------- - ; EEADR+0 = O2% - ; EEADR+1 = He% - ; EEADR+4 = next gaz O2% + ;---- Explore gas list ------------------------------------------- + ; EEADR <-- gas# + 6 + ; EEADR-2 = default O2% + ; EEADR-1 = default He% + ; EEADR+0 = current O2% + ; EEADR+1 = current He% + ; EEADR+4 = next gaz current O2% read_int_eeprom d'27' ; read gas flag register --> hi movff EEDATA,hi - movlw 5 ; Number of gas to check --> lo - movwf lo - movlw 6-4 ; Gas list start in eeprom. - movwf EEADR + rrcf hi ; Dummy shift first... why does it works ? + setf lo ; Start with gas# -1 clrf PRODL ; =0 : no nitrox found yet. dive_type_loop: - movlw 4 ; Advance to next gas data in EEPROM. - addwf EEADR,F + incf lo,F ; Next gaz number. + + movlw .33 ; Read first gas #. + movwf EEADR + call read_eeprom + incf lo,W ; Current gas# 1..5 + subwf EEDATA,W ; == first ? + bz dive_type_loop_2 ; YES: analyse that gas ! + rrcf hi ; Check next enabled flag ? bnc dive_type_loop_9 ; Disabled. - + + movlw .28 ; Switch depth is at gas#+28 + addwf lo,W + movwf EEADR ; address in EEPROM. + call read_eeprom ; Read depth + clrf WREG + cpfsgt EEDATA ; is depth > 0 ? + bra dive_type_loop_9 ; NO: disabled too. + +dive_type_loop_2: + rlncf lo,W ; Gas# times 4 + rlncf WREG + addlw 4+2 ; 6 + 4 * gas# + movwf EEADR ; address in EEPROM for current O2. call read_eeprom ; Read O2 % + movlw .21 cpfseq EEDATA ; O2 == 21% ? setf PRODL ; NO: not simple air ! @@ -71,8 +106,9 @@ bra dive_trimix_icon ; No: go for the Tx icon, now. dive_type_loop_9: - decfsz lo ; More gas ? - bra dive_type_loop ; YES: loop... + movlw 4 ; Already done all gas ? (index 0..4) + cpfseq lo ; gas# == 4 ? + bra dive_type_loop ; NO: loop... btfsc PRODL,0 ; Did we find a nitrox gaz ? bra dive_nitrox_icon ; YES: display nitrox icon.;.
--- a/code_part1/OSTC_code_asm_part1/dive_nitrox.inc Sun Dec 26 18:34:28 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/dive_nitrox.inc Sun Dec 26 23:49:11 2010 +0100 @@ -2,57 +2,73 @@ dive_nitrox_height equ .26 dive_nitrox_block: db .39, .26 - db .4, 0 + db .9, 0 dw 0x0000 ; rgb=(0,0,0) - dw 0x04c0 ; rgb=(0,154,0) - dw 0x07e0 ; rgb=(0,254,0) - dw 0x01e0 ; rgb=(0,62,0) + dw 0x10c0 ; rgb=(19,25,6) + dw 0x4303 ; rgb=(71,96,24) + dw 0x74c4 ; rgb=(115,154,38) + dw 0x8dc5 ; rgb=(138,185,46) + dw 0x9e66 ; rgb=(153,204,51) + dw 0x2181 ; rgb=(37,49,12) + dw 0x5bc3 ; rgb=(90,120,29) + dw 0x0860 ; rgb=(9,12,3) ; - db 0xf0, 0x07, 0x29, 0x0f, 0x29, 0x0f, 0x29, 0x0f - db 0x29, 0x0e, 0x30, 0x29, 0x30, 0x0b, 0x30, 0x2d - db 0x30, 0x08, 0x30, 0x2f, 0x10, 0x06, 0x10, 0xf1 - db 0x21, 0x10, 0x04, 0x30, 0x22, 0x1c, 0x23, 0x30 - db 0x03, 0x22, 0x10, 0x0c, 0x10, 0x23, 0x02, 0x10 - db 0x22, 0x10, 0x04, 0x37, 0x10, 0x23, 0x10, 0x01 - db 0x23, 0x10, 0x04, 0x30, 0x10, 0x2b, 0x00, 0x10 - db 0x25, 0x10, 0x04, 0x30, 0x10, 0x29, 0x11, 0x27 - db 0x10, 0x04, 0x30, 0x28, 0x10, 0x2a, 0x30, 0x04 - db 0x30, 0xf1, 0x24, 0x30, 0x04, 0x10, 0x2a, 0x10 - db 0x0c, 0x10, 0x2a, 0x10, 0x0c, 0x10, 0xf4, 0x22 - db 0x11, 0xf1, 0x27, 0x30, 0x00, 0x10, 0xf1, 0x26 - db 0x30, 0x00, 0x10, 0xf1, 0x26, 0x30, 0x00, 0x10 - db 0xf1, 0x21, 0x10, 0x01, 0x10, 0x20, 0x30, 0x08 - db 0x10, 0x29, 0x10, 0x01, 0x10, 0x20, 0x30, 0x08 - db 0x10, 0x29, 0x10, 0x01, 0x10, 0x20, 0x30, 0x08 - db 0x10, 0xf7, 0x26, 0x10, 0x00, 0x10, 0xf1, 0x26 - db 0x10, 0x00, 0x10, 0xf1, 0x23, 0x10, 0x09, 0x30 - db 0x10, 0x2c, 0x10, 0x0b, 0x10, 0x2b, 0x10, 0x0b - db 0x30, 0x2e, 0x10, 0x00, 0x10, 0x24, 0x30, 0x00 - db 0x30, 0x2e, 0x10, 0x00, 0x10, 0x24, 0x10, 0x00 - db 0x30, 0x2e, 0x10, 0x00, 0x10, 0x24, 0x30, 0x00 - db 0x30, 0x2e, 0x12, 0x24, 0x31, 0x10, 0xf4, 0x23 - db 0x18, 0x2f, 0x30, 0x08, 0x10, 0x2e, 0x30, 0x08 - db 0x10, 0x2e, 0x10, 0x30, 0x01, 0x30, 0x15, 0x2e - db 0x10, 0x01, 0x30, 0xf1, 0x25, 0x30, 0x01, 0xf1 - db 0x26, 0x01, 0x30, 0xf1, 0x26, 0x02, 0x30, 0xf1 - db 0x25, 0x02, 0x30, 0xf3, 0x21, 0x11, 0x32, 0x10 - db 0xf1, 0x22, 0x10, 0x06, 0x10, 0x2f, 0x10, 0x08 - db 0x2f, 0x30, 0x01, 0x13, 0x30, 0x01, 0x10, 0x2e - db 0x01, 0x10, 0x24, 0x10, 0x00, 0x30, 0x2e, 0x01 - db 0x25, 0x10, 0x00, 0x30, 0x2e, 0x01, 0x10, 0x24 - db 0x30, 0x00, 0x30, 0x2e, 0x30, 0x02, 0x30, 0x10 - db 0x30, 0x02, 0x10, 0x2f, 0x07, 0x30, 0xf1, 0x21 - db 0x05, 0x30, 0xf1, 0x23, 0x13, 0xf1, 0x22, 0x10 - db 0x27, 0x11, 0x2e, 0x30, 0x00, 0x10, 0x24, 0x30 - db 0x00, 0x10, 0x2e, 0x30, 0x01, 0x10, 0x22, 0x30 - db 0x01, 0x10, 0x2e, 0x30, 0x03, 0x10, 0x02, 0x10 - db 0x26, 0x10, 0x28, 0x30, 0x05, 0x27, 0x11, 0x29 - db 0x10, 0x04, 0x10, 0x26, 0x10, 0x30, 0x28, 0x10 - db 0x06, 0x10, 0x25, 0x30, 0x00, 0x10, 0x26, 0x10 - db 0x02, 0x11, 0x03, 0x10, 0x23, 0x10, 0x01, 0x30 - db 0x26, 0x30, 0x00, 0x30, 0x23, 0x30, 0x01, 0x10 - db 0x23, 0x30, 0x02, 0x10, 0x25, 0x30, 0x10, 0x25 - db 0x10, 0x00, 0x10, 0x22, 0x10, 0x04, 0x2f, 0x10 - db 0x22, 0x06, 0xf1, 0x21, 0x08, 0x10, 0x2d, 0x10 - db 0x0a, 0x30, 0x2b, 0x30, 0x0d, 0x30, 0x11, 0x23 - db 0x11, 0x30, 0x07 + db 0xf0, 0x07, 0x59, 0x0f, 0x59, 0x0f, 0x59, 0x0f + db 0x59, 0x0e, 0x20, 0x59, 0x20, 0x0b, 0x60, 0x30 + db 0x5b, 0x30, 0x60, 0x08, 0x20, 0x5f, 0x20, 0x06 + db 0x70, 0xf1, 0x51, 0x70, 0x04, 0x20, 0x52, 0x40 + db 0x3c, 0x40, 0x51, 0x20, 0x02, 0x10, 0x40, 0x52 + db 0x20, 0x0c, 0x20, 0x51, 0x40, 0x10, 0x01, 0x70 + db 0x53, 0x20, 0x04, 0x67, 0x70, 0x52, 0x70, 0x00 + db 0x10, 0x54, 0x30, 0x10, 0x03, 0x60, 0x30, 0x5a + db 0x10, 0x20, 0x56, 0x70, 0x80, 0x03, 0x60, 0x30 + db 0x58, 0x20, 0x30, 0x57, 0x40, 0x20, 0x80, 0x03 + db 0x20, 0x40, 0x56, 0x30, 0x40, 0x59, 0x40, 0x20 + db 0x04, 0x20, 0x40, 0x54, 0x40, 0x5c, 0x40, 0x20 + db 0x03, 0x80, 0x30, 0x5a, 0x20, 0x0c, 0x20, 0x5a + db 0x20, 0x0c, 0x20, 0xf4, 0x52, 0x70, 0x20, 0x40 + db 0xf1, 0x56, 0x60, 0x00, 0x30, 0xf1, 0x56, 0x60 + db 0x00, 0x30, 0xf1, 0x56, 0x60, 0x00, 0x30, 0xf1 + db 0x51, 0x20, 0x01, 0x20, 0x50, 0x60, 0x08, 0x20 + db 0x59, 0x20, 0x01, 0x20, 0x50, 0x60, 0x08, 0x20 + db 0x59, 0x20, 0x01, 0x20, 0x50, 0x60, 0x08, 0x20 + db 0xf7, 0x56, 0x20, 0x00, 0x20, 0xf1, 0x56, 0x20 + db 0x00, 0x20, 0xf1, 0x53, 0x20, 0x08, 0x80, 0x60 + db 0x30, 0x5c, 0x20, 0x0b, 0x30, 0x5b, 0x20, 0x0b + db 0x60, 0x5e, 0x20, 0x00, 0x20, 0x53, 0x40, 0x60 + db 0x00, 0x60, 0x5e, 0x20, 0x00, 0x20, 0x54, 0x20 + db 0x00, 0x60, 0x5e, 0x20, 0x00, 0x20, 0x54, 0x20 + db 0x00, 0x60, 0x5e, 0x30, 0x20, 0x30, 0x54, 0x61 + db 0x70, 0xf4, 0x52, 0x39, 0x40, 0x5e, 0x60, 0x08 + db 0x20, 0x5e, 0x60, 0x08, 0x20, 0x5e, 0x70, 0x60 + db 0x01, 0x60, 0x24, 0x30, 0x5e, 0x30, 0x01, 0x20 + db 0xf1, 0x55, 0x60, 0x00, 0x10, 0xf1, 0x56, 0x01 + db 0x60, 0xf1, 0x56, 0x02, 0x60, 0xf1, 0x55, 0x80 + db 0x01, 0x60, 0xf3, 0x51, 0x30, 0x20, 0x62, 0x20 + db 0x40, 0xf1, 0x51, 0x20, 0x05, 0x80, 0x70, 0x5f + db 0x30, 0x07, 0x80, 0x40, 0x5e, 0x60, 0x00, 0x80 + db 0x20, 0x32, 0x20, 0x01, 0x20, 0x5e, 0x01, 0x30 + db 0x54, 0x20, 0x00, 0x60, 0x5e, 0x01, 0x40, 0x54 + db 0x30, 0x00, 0x60, 0x5e, 0x01, 0x20, 0x53, 0x40 + db 0x60, 0x00, 0x60, 0x5e, 0x60, 0x01, 0x10, 0x60 + db 0x20, 0x60, 0x80, 0x01, 0x70, 0x5e, 0x30, 0x80 + db 0x06, 0x60, 0x40, 0x5f, 0x30, 0x10, 0x04, 0x60 + db 0x40, 0xf1, 0x52, 0x30, 0x70, 0x20, 0x70, 0x30 + db 0xf1, 0x51, 0x70, 0x40, 0x56, 0x71, 0x5e, 0x60 + db 0x10, 0x30, 0x53, 0x40, 0x20, 0x00, 0x20, 0x5e + db 0x60, 0x01, 0x20, 0x40, 0x50, 0x30, 0x60, 0x01 + db 0x70, 0x54, 0x40, 0x58, 0x60, 0x02, 0x10, 0x20 + db 0x80, 0x01, 0x70, 0x54, 0x40, 0x30, 0x58, 0x40 + db 0x60, 0x04, 0x10, 0x30, 0x55, 0x30, 0x20, 0x5a + db 0x20, 0x03, 0x10, 0x30, 0x55, 0x20, 0x60, 0x59 + db 0x30, 0x80, 0x05, 0x20, 0x40, 0x53, 0x60, 0x00 + db 0x30, 0x57, 0x70, 0x01, 0x80, 0x30, 0x70, 0x80 + db 0x02, 0x20, 0x52, 0x30, 0x01, 0x60, 0x57, 0x60 + db 0x00, 0x60, 0x40, 0x51, 0x40, 0x60, 0x01, 0x20 + db 0x52, 0x60, 0x02, 0x70, 0x56, 0x60, 0x20, 0x55 + db 0x70, 0x80, 0x20, 0x51, 0x70, 0x03, 0x80, 0x30 + db 0x55, 0x40, 0x57, 0x40, 0x30, 0x50, 0x30, 0x80 + db 0x04, 0x80, 0x30, 0x5f, 0x30, 0x80, 0x06, 0x80 + db 0x30, 0x5d, 0x30, 0x80, 0x09, 0x60, 0x30, 0x59 + db 0x30, 0x60, 0x0d, 0x60, 0x70, 0x30, 0x53, 0x30 + db 0x70, 0x60, 0x07
--- a/code_part1/OSTC_code_asm_part1/dive_trimix.inc Sun Dec 26 18:34:28 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/dive_trimix.inc Sun Dec 26 23:49:11 2010 +0100 @@ -2,67 +2,91 @@ dive_trimix_height equ .26 dive_trimix_block: db .39, .26 - db .10, 0 + db .12, 0 dw 0x0000 ; rgb=(0,0,0) - dw 0x2800 ; rgb=(47,0,0) - dw 0x8000 ; rgb=(129,0,0) - dw 0xc000 ; rgb=(199,0,0) - dw 0xf800 ; rgb=(255,0,0) - dw 0xf8e3 ; rgb=(255,31,31) - dw 0xfbef ; rgb=(255,127,127) - dw 0xf9e7 ; rgb=(255,62,62) + dw 0x1881 ; rgb=(26,17,8) + dw 0x3942 ; rgb=(63,41,19) + dw 0x59e3 ; rgb=(95,60,26) + dw 0x6a23 ; rgb=(107,68,30) + dw 0x7264 ; rgb=(117,76,36) + dw 0x61c2 ; rgb=(96,56,19) + dw 0xb4f1 ; rgb=(176,157,139) + dw 0x8349 ; rgb=(134,104,76) dw 0xffff ; rgb=(255,255,255) - dw 0xfe18 ; rgb=(255,195,195) + dw 0xde98 ; rgb=(217,208,199) + dw 0xa44e ; rgb=(160,137,115) ; - db 0xf0, 0x07, 0x49, 0x0f, 0x49, 0x0f, 0x49, 0x0f - db 0x49, 0x0e, 0x20, 0x49, 0x20, 0x0b, 0x10, 0x30 - db 0x4b, 0x30, 0x10, 0x08, 0x20, 0x4f, 0x20, 0x06 - db 0x20, 0x40, 0x50, 0x70, 0x50, 0x4d, 0x20, 0x04 - db 0x20, 0x41, 0x60, 0x80, 0x60, 0x4e, 0x20, 0x02 - db 0x10, 0x42, 0x60, 0x80, 0x60, 0x4f, 0x10, 0x01 - db 0x20, 0x42, 0x60, 0x80, 0x60, 0x4f, 0x20, 0x00 - db 0x10, 0x43, 0x60, 0x80, 0x90, 0x6a, 0x70, 0x44 - db 0x10, 0x20, 0x43, 0x60, 0x8c, 0x60, 0x44, 0x20 - db 0x30, 0x43, 0x60, 0x8c, 0x60, 0x44, 0x31, 0x43 - db 0x60, 0x80, 0x90, 0x6a, 0x70, 0x4a, 0x60, 0x80 - db 0x60, 0xf1, 0x46, 0x60, 0x80, 0x60, 0xf1, 0x46 - db 0x60, 0x80, 0x60, 0xf1, 0x46, 0x70, 0x60, 0x70 - db 0xf3, 0x44, 0x69, 0x70, 0x4e, 0x90, 0x88, 0x60 - db 0x4e, 0x90, 0x88, 0x60, 0x4e, 0x70, 0x90, 0x81 - db 0x60, 0x74, 0x50, 0x4e, 0x60, 0x81, 0x70, 0xf1 - db 0x45, 0x90, 0x80, 0x90, 0xf1, 0x46, 0x81, 0x90 - db 0x70, 0xf1, 0x45, 0x82, 0x90, 0xf1, 0x45, 0x92 - db 0x60, 0xf4, 0x49, 0x60, 0x90, 0x70, 0xf1, 0x46 - db 0x90, 0x80, 0x70, 0xf1, 0x46, 0x90, 0x80, 0x70 - db 0xf1, 0x41, 0x50, 0x71, 0x50, 0x40, 0x90, 0x80 - db 0x60, 0x76, 0x50, 0x49, 0x60, 0x81, 0x60, 0x40 - db 0x90, 0x88, 0x60, 0x49, 0x60, 0x81, 0x60, 0x40 - db 0x90, 0x88, 0x60, 0x49, 0x70, 0x61, 0x70, 0x40 - db 0x69, 0x70, 0xf5, 0x4c, 0x60, 0x98, 0x60, 0x4e - db 0x90, 0x88, 0x60, 0x4e, 0x60, 0x90, 0x80, 0x90 - db 0x65, 0x70, 0x4e, 0x60, 0x81, 0x76, 0x50, 0x4e - db 0x89, 0x60, 0x4e, 0x90, 0x88, 0x60, 0x4e, 0x70 - db 0x90, 0x80, 0x60, 0x75, 0x50, 0x4e, 0x82, 0x66 - db 0x70, 0x4e, 0x89, 0x60, 0x4e, 0x70, 0x98, 0x60 - db 0xf4, 0x42, 0x60, 0x90, 0x70, 0xf1, 0x46, 0x90 - db 0x80, 0x70, 0xf1, 0x46, 0x90, 0x80, 0x70, 0xf1 - db 0x41, 0x50, 0x71, 0x50, 0x40, 0x90, 0x80, 0x60 - db 0x76, 0x50, 0x49, 0x60, 0x81, 0x60, 0x40, 0x90 - db 0x88, 0x60, 0x49, 0x60, 0x81, 0x60, 0x40, 0x90 - db 0x88, 0x60, 0x49, 0x70, 0x61, 0x70, 0x40, 0x69 - db 0x70, 0xf4, 0x4c, 0x50, 0x4e, 0x60, 0x70, 0x46 - db 0x90, 0x60, 0x4e, 0x90, 0x80, 0x60, 0x43, 0x70 - db 0x90, 0x80, 0x60, 0x4e, 0x90, 0x81, 0x90, 0x70 - db 0x40, 0x60, 0x82, 0x70, 0x4e, 0x60, 0x83, 0x90 - db 0x81, 0x90, 0x70, 0x46, 0x30, 0x48, 0x60, 0x84 - db 0x90, 0x47, 0x30, 0x20, 0x49, 0x60, 0x84, 0x60 - db 0x46, 0x20, 0x10, 0x48, 0x60, 0x86, 0x90, 0x70 - db 0x44, 0x10, 0x00, 0x30, 0x46, 0x90, 0x81, 0x90 - db 0x40, 0x50, 0x90, 0x82, 0x60, 0x43, 0x30, 0x01 - db 0x10, 0x46, 0x90, 0x80, 0x60, 0x43, 0x60, 0x81 - db 0x60, 0x43, 0x10, 0x02, 0x20, 0x45, 0x60, 0x70 - db 0x45, 0x50, 0x90, 0x60, 0x42, 0x20, 0x04, 0x30 - db 0x4e, 0x50, 0x41, 0x30, 0x06, 0x30, 0x4f, 0x30 - db 0x08, 0x20, 0x4d, 0x30, 0x0a, 0x10, 0x30, 0x49 - db 0x30, 0x10, 0x0d, 0x10, 0x20, 0x30, 0x43, 0x30 - db 0x20, 0x10, 0x07 + db 0xf0, 0x07, 0x59, 0x0f, 0x59, 0x0f, 0x51, 0x65 + db 0x51, 0x0f, 0x51, 0x65, 0x51, 0x0e, 0x10, 0x51 + db 0x65, 0x51, 0x10, 0x0b, 0x10, 0x30, 0x52, 0x65 + db 0x52, 0x30, 0x10, 0x08, 0x20, 0x52, 0x40, 0x67 + db 0x40, 0x52, 0x20, 0x06, 0x20, 0x51, 0x81, 0x50 + db 0x69, 0x40, 0x51, 0x20, 0x04, 0x10, 0x51, 0x40 + db 0x70, 0x90, 0x70, 0x6a, 0x40, 0x51, 0x10, 0x02 + db 0x10, 0x40, 0x50, 0x40, 0x60, 0x70, 0x90, 0x70 + db 0x6b, 0x40, 0x50, 0x40, 0x10, 0x01, 0x20, 0x50 + db 0x40, 0x61, 0x70, 0x90, 0x70, 0x6c, 0x40, 0x50 + db 0x20, 0x00, 0x10, 0x51, 0x62, 0x70, 0x90, 0xa0 + db 0x7a, 0x80, 0x61, 0x51, 0x10, 0x20, 0x50, 0x40 + db 0x62, 0x70, 0x9c, 0x70, 0x61, 0x40, 0x50, 0x20 + db 0x30, 0x50, 0x40, 0x62, 0x70, 0x9c, 0x70, 0x61 + db 0x40, 0x50, 0x30, 0x40, 0x50, 0x63, 0x70, 0x90 + db 0xa0, 0x7a, 0x80, 0x62, 0x50, 0x40, 0x51, 0x63 + db 0x70, 0x90, 0x70, 0x6e, 0x53, 0x63, 0x70, 0x90 + db 0x70, 0x6e, 0x53, 0x63, 0x70, 0x90, 0x70, 0x6e + db 0x53, 0x63, 0x80, 0x70, 0x80, 0x6e, 0x53, 0xf1 + db 0x65, 0x53, 0x67, 0xb0, 0x78, 0x80, 0x62, 0x53 + db 0x67, 0xa0, 0x98, 0x70, 0x62, 0x53, 0x67, 0xa0 + db 0x98, 0x70, 0x62, 0x53, 0x67, 0x80, 0xa0, 0x91 + db 0xb0, 0x84, 0x50, 0x62, 0x53, 0x67, 0x70, 0x91 + db 0x80, 0x69, 0x53, 0x67, 0xa0, 0x90, 0xa0, 0x6a + db 0x53, 0x67, 0x91, 0xa0, 0x80, 0x69, 0x53, 0x67 + db 0x92, 0xa0, 0x69, 0x53, 0x67, 0xa2, 0x70, 0x69 + db 0x53, 0xf1, 0x65, 0x53, 0xf1, 0x65, 0x53, 0x67 + db 0x70, 0xa0, 0x80, 0x6a, 0x53, 0x67, 0xa0, 0x90 + db 0x80, 0x6a, 0x53, 0x67, 0xa0, 0x90, 0x80, 0x6a + db 0x53, 0x62, 0x50, 0x81, 0x50, 0x60, 0xa0, 0x90 + db 0xb0, 0x86, 0x50, 0x62, 0x53, 0x62, 0x70, 0x91 + db 0x70, 0x60, 0xa0, 0x98, 0x70, 0x62, 0x53, 0x62 + db 0x70, 0x91, 0x70, 0x60, 0xa0, 0x98, 0x70, 0x62 + db 0x53, 0x62, 0x80, 0x71, 0x80, 0x60, 0xb0, 0x78 + db 0x80, 0x62, 0x53, 0xf1, 0x65, 0x53, 0xf1, 0x65 + db 0x53, 0xf1, 0x65, 0x53, 0x67, 0x70, 0xa8, 0xb0 + db 0x62, 0x53, 0x67, 0xa0, 0x98, 0x70, 0x62, 0x53 + db 0x67, 0xb0, 0xa0, 0x90, 0xa0, 0x75, 0x80, 0x62 + db 0x53, 0x67, 0x70, 0x91, 0x86, 0x50, 0x62, 0x53 + db 0x67, 0x99, 0x70, 0x62, 0x53, 0x67, 0xa0, 0x98 + db 0x70, 0x62, 0x53, 0x67, 0x80, 0xa0, 0x90, 0x70 + db 0x85, 0x50, 0x62, 0x53, 0x67, 0x92, 0x76, 0x80 + db 0x62, 0x53, 0x67, 0x99, 0x70, 0x62, 0x53, 0x67 + db 0x80, 0xa8, 0xb0, 0x62, 0x53, 0xf1, 0x65, 0x53 + db 0xf1, 0x65, 0x53, 0x67, 0x70, 0xa0, 0x80, 0x6a + db 0x53, 0x67, 0xa0, 0x90, 0x80, 0x6a, 0x53, 0x67 + db 0xa0, 0x90, 0x80, 0x6a, 0x53, 0x62, 0x50, 0x81 + db 0x50, 0x60, 0xa0, 0x90, 0xb0, 0x86, 0x50, 0x62 + db 0x53, 0x62, 0x70, 0x91, 0x70, 0x60, 0xa0, 0x98 + db 0x70, 0x62, 0x53, 0x62, 0x70, 0x91, 0x70, 0x60 + db 0xa0, 0x98, 0x70, 0x62, 0x53, 0x62, 0x80, 0x71 + db 0x80, 0x60, 0xb0, 0x78, 0x80, 0x62, 0x53, 0xf1 + db 0x65, 0x53, 0xf1, 0x65, 0x53, 0xf1, 0x61, 0x50 + db 0x62, 0x53, 0x67, 0x70, 0x80, 0x65, 0x40, 0xa0 + db 0x70, 0x62, 0x53, 0x67, 0xa0, 0x90, 0x70, 0x40 + db 0x62, 0x80, 0xa0, 0x90, 0x70, 0x62, 0x53, 0x67 + db 0xa0, 0x91, 0xa0, 0x80, 0x60, 0x70, 0x92, 0x80 + db 0x62, 0x51, 0x40, 0x50, 0x67, 0x70, 0x93, 0xa0 + db 0x91, 0xa0, 0x80, 0x63, 0x50, 0x40, 0x30, 0x50 + db 0x30, 0x67, 0xb0, 0x94, 0xa0, 0x40, 0x63, 0x30 + db 0x50, 0x30, 0x20, 0x50, 0x40, 0x68, 0xb0, 0x94 + db 0x70, 0x40, 0x62, 0x40, 0x50, 0x20, 0x10, 0x51 + db 0x67, 0x70, 0x96, 0xa0, 0x80, 0x61, 0x51, 0x10 + db 0x00, 0x30, 0x50, 0x40, 0x65, 0xa0, 0x91, 0xa0 + db 0x40, 0x50, 0xa0, 0x92, 0x70, 0x60, 0x40, 0x50 + db 0x30, 0x01, 0x10, 0x51, 0x30, 0x64, 0xa0, 0x90 + db 0x70, 0x63, 0xb0, 0x91, 0x70, 0x30, 0x51, 0x10 + db 0x02, 0x20, 0x51, 0x64, 0x70, 0x80, 0x65, 0x50 + db 0xa0, 0x70, 0x51, 0x20, 0x04, 0x30, 0x51, 0x30 + db 0x6b, 0x30, 0x80, 0x50, 0x30, 0x06, 0x30, 0x51 + db 0x40, 0x69, 0x40, 0x51, 0x30, 0x08, 0x20, 0x52 + db 0x40, 0x30, 0x63, 0x30, 0x40, 0x52, 0x30, 0x0a + db 0x10, 0x30, 0x59, 0x30, 0x10, 0x0d, 0x10, 0x20 + db 0x30, 0x53, 0x30, 0x20, 0x10, 0x07
--- a/code_part1/OSTC_code_asm_part1/menu_gassetup.asm Sun Dec 26 18:34:28 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/menu_gassetup.asm Sun Dec 26 23:49:11 2010 +0100 @@ -64,7 +64,8 @@ movlw ':' movwf POSTINC2 - call menu_gassetup_grey_inactive ; Sets Greyvalue for inactive gases + movf decodata+0,W + call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases call word_processor WIN_LEFT .40 movf waitms_temp,W ; Load row into WREG @@ -82,7 +83,8 @@ ; New v1.44se menu_gassetup_Tx: - call menu_gassetup_grey_inactive ; Sets Greyvalue for inactive gases + movf decodata+0,W + call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases call word_processor WIN_LEFT .48 @@ -172,7 +174,8 @@ ; Changed v1.44se menu_gassetup_list0: - call menu_gassetup_grey_inactive ; Sets Greyvalue for inactive gases + movf decodata+0,W + call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases call word_processor WIN_LEFT .105 @@ -196,7 +199,8 @@ output_8 movlw 'm' movwf POSTINC2 - call menu_gassetup_grey_inactive ; Sets Greyvalue for inactive gases + movf decodata+0,W + call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases call word_processor call PLED_standard_color @@ -1125,29 +1129,6 @@ movwf POSTINC2 return -; New v1.44se -menu_gassetup_grey_inactive: -; Set Greyvalue to lower value when gas is inactive - read_int_eeprom d'27' ; read flag register - movff decodata+0,lo ; copy gas number 0-4 - incf lo,F ; 1-5 -menu_gassetup_list1: - rrcf EEDATA ; roll flags into carry - decfsz lo,F ; max. 5 times... - bra menu_gassetup_list1 - - btfss STATUS,C ; test carry - bra menu_gassetup_list1_grey - - GETCUSTOM8 d'35' ;movlw color_white - call PLED_set_color ; grey out inactive gases! - return - -menu_gassetup_list1_grey: - movlw color_grey - call PLED_set_color ; grey out inactive gases! - return - gassetup_show_ppO2: movf divemins+0,W addlw 0x06
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm Sun Dec 26 18:34:28 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm Sun Dec 26 23:49:11 2010 +0100 @@ -154,7 +154,7 @@ CF_DEFAULT CF_BOOL, d'0', 0, 0 ; show_seconds_divemode =1 Show the seconds in Divemode CF_DEFAULT CF_INT15, 0, 0, 0 ; UNUSED CF_DEFAULT CF_BOOL, d'1', 0, 0 ; warn_ceiling_divemode =1 Warn ceiling violation in divemode - CF_DEFAULT CF_INT15, 0, 0, 0 ; UNUSED + CF_DEFAULT CF_BOOL, d'1', 0, 0 ; Show mix type is surfmode CF_DEFAULT CF_BOOL, d'0', 0, 0 ; blink_gas_divemode =1 blink better gas CF_DEFAULT CF_INT15, d'13000', 0, d'13000' ; color_warn_depth_mBar Warn depths
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm Sun Dec 26 18:34:28 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm Sun Dec 26 23:49:11 2010 +0100 @@ -1295,6 +1295,46 @@ call word_processor return +;----------------------------------------------------------------------------- +; Set color to grey when gas is inactive +; Inputs: WREG : gas# (0..4) +; Trashes: lo +; New v1.44se +PLED_grey_inactive_gas: + movwf lo ; copy gas number 0-4 + incf lo,F ; 1-5 + + read_int_eeprom d'33' ; Get First gas (1-5) + movf EEDATA,W + subwf lo,W ; Compare with current + bz PLED_white_gas ; First is always on. + + movlw .28-1 ; Depth for gas# is at idx+28 + addwf lo,W + movwf EEADR ; address in EEPROM. + call read_eeprom ; Read depth + clrf WREG + cpfsgt EEDATA ; is depth > 0 ? + bra PLED_grey_gas + + read_int_eeprom d'27' ; read flag register +PLED_grey_inactive_gas1: + rrcf EEDATA ; roll flags into carry + decfsz lo,F ; max. 5 times... + bra PLED_grey_inactive_gas1 + + bnc PLED_grey_gas ; test carry + +PLED_white_gas: + GETCUSTOM8 d'35' ;movlw color_white + goto PLED_set_color ; grey out inactive gases! + +PLED_grey_gas: + movlw color_grey + goto PLED_set_color ; grey out inactive gases! + +;----------------------------------------------------------------------------- + PLED_pre_dive_screen: ;Display Pre-Dive Screen ; movlw .0 ; movff WREG,box_temp+0 ; Data @@ -1350,25 +1390,10 @@ call read_eeprom ; get byte (stored in EEDATA) movff EEDATA,lo ; copy to lo output_8 ; outputs into Postinc2! - - read_int_eeprom d'27' ; read flag register - movff hi,lo ; copy gas number -PLED_pre_dive_screen2_loop1: - rrcf EEDATA ; roll flags into carry - decfsz lo,F ; max. 5 times... - bra PLED_pre_dive_screen2_loop1 - - btfsc STATUS,C ; test carry - bra PLED_pre_dive_white - - movlw color_grey - call PLED_set_color ; grey out inactive gases! - bra PLED_pre_dive_color_done - -PLED_pre_dive_white: - call PLED_standard_color - -PLED_pre_dive_color_done: + + decf hi,W ; Gas # in 0..4 + call PLED_grey_inactive_gas + read_int_eeprom d'33' ; Read start gas (1-5) movf EEDATA,W cpfseq hi ; Current Gas the active gas? @@ -1383,8 +1408,6 @@ call word_processor ; No, display gas PLED_pre_dive_screen2b: - call PLED_standard_color - movlw d'5' ; list all four (remaining) gases cpfseq hi ; All gases shown? bra PLED_pre_dive_screen2_loop ; No
--- a/code_part1/OSTC_code_asm_part1/text_table.asm Sun Dec 26 18:34:28 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/text_table.asm Sun Dec 26 23:49:11 2010 +0100 @@ -576,7 +576,7 @@ DA "Divemode secs. }" ;160 DA "not used }" ;161 DA "Warn Ceiling }" ;162 - DA "not used }" ;163 + DA "Mix type icons }" ;163 DA "Blink BetterGas}" ;164 DA "DepthWarn[mBar]}" ;165 DA "CNS warning [%]}" ;166