Mercurial > public > mk2
changeset 464:6ad9af3a5771 2.01stable
Fix reset gas from 2.0stable
author | heinrichsweikamp |
---|---|
date | Sun, 02 Oct 2011 17:52:16 +0200 |
parents | 32e1174fb89e |
children | 915e0d38edec 59ff7a1aa1cb |
files | code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/menu_reset.asm code_part1/OSTC_code_asm_part1/start.asm |
diffstat | 3 files changed, 37 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/definitions.asm Sun Sep 25 10:30:53 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Sun Oct 02 17:52:16 2011 +0200 @@ -24,7 +24,7 @@ #DEFINE softwareversion_x d'2' ; Software version XX.YY #DEFINE softwareversion_y d'1' ; Software version XX.YY -#DEFINE softwareversion_beta 1 ; (and 0 for release) +#DEFINE softwareversion_beta 0 ; (and 0 for release) #DEFINE max_custom_number d'58' ; Number of last used custom function
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm Sun Sep 25 10:30:53 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm Sun Oct 02 17:52:16 2011 +0200 @@ -324,23 +324,7 @@ bcf nofly_active ; Clear flag ; reset gases - clrf EEADRH ; EEPROM BANK 0 ! - - movlw d'3' ; address of first gas-1 - movwf EEADR - clrf hi ; He part (default for all gases: 0%) - movlw d'21' ; O2 part (21%) - rcall reset_gas ; saves default and current value for gas #1 - movlw d'21' ; O2 part (21%) - rcall reset_gas ; saves default and current value for gas #2 - movlw d'21' ; O2 part (21%) - rcall reset_gas ; saves default and current value for gas #3 - movlw d'21' ; O2 part (21%) - rcall reset_gas ; saves default and current value for gas #4 - movlw d'21' ; O2 part (21%) - rcall reset_gas ; saves default and current value for gas #5 - movlw d'21' ; O2 part (21%) - rcall reset_gas ; saves default and current value for gas #6 + rcall reset_gases reset_all_cf: movlw d'1' @@ -434,14 +418,44 @@ ;call reset_external_eeprom ; delete profile memory goto restart ; all reset, quit to surfmode +reset_gases: + clrf EEADRH ; EEPROM BANK 0 ! + + movlw d'3' ; address of first gas-1 + movwf EEADR + clrf hi ; He part (default for all gases: 0%) + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves current value for gas #1 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves default value for gas #1 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves current value for gas #2 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves default value for gas #2 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves current value for gas #3 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves default value for gas #3 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves current value for gas #4 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves default value for gas #4 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves current value for gas #5 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves default value for gas #5 + movlw d'21' ; O2 part (21%) + rcall reset_gas ; saves current value for gas #6 + return + ; Write WREG:lo twice, w/o any type clearing, pre-incrementing EEADR reset_gas: movwf lo incf EEADR,F - movff lo, EEDATA ; Lowbyte Default value + movff lo, EEDATA ; O2 Default value call write_eeprom incf EEADR,F - movff hi, EEDATA ; Highbyte default value + movff hi, EEDATA ; He default value call write_eeprom return
--- a/code_part1/OSTC_code_asm_part1/start.asm Sun Sep 25 10:30:53 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/start.asm Sun Oct 02 17:52:16 2011 +0200 @@ -142,6 +142,9 @@ write_int_eeprom d'193' write_int_eeprom d'194' ; Reset Default and Current Value to zero clrf EEADRH + +; reset gases (Bug in 2.0 stable) + call reset_gases ; goto reset_all_cf ; resets all custom functions bank0 and bank1 and jumps to "restart" restart: