Mercurial > public > hwos_code
comparison src/start.asm @ 281:eb758a5b44eb
BUGFIX: Fix download issue for dives made with 1.80 firmware
author | heinrichsweikamp |
---|---|
date | Tue, 26 May 2015 17:40:13 +0200 |
parents | e4cb495aed3d |
children | cf929551d31c |
comparison
equal
deleted
inserted
replaced
280:c39aff8576f4 | 281:eb758a5b44eb |
---|---|
149 power_on_return: | 149 power_on_return: |
150 bsf RCON,POR ; Set bit for next detection | 150 bsf RCON,POR ; Set bit for next detection |
151 | 151 |
152 ; check firmware and reset Custom Functions after an update | 152 ; check firmware and reset Custom Functions after an update |
153 movlw d'1' | 153 movlw d'1' |
154 movwf EEADR | 154 movwf EEADR ; =1 |
155 movlw d'1' | 155 movwf EEADRH ; =1 |
156 movwf EEADRH | |
157 call read_eeprom ; read current version x | 156 call read_eeprom ; read current version x |
158 movff EEDATA,temp1 | 157 movff EEDATA,temp1 |
159 incf EEADR,F ; set to 0x102 | 158 incf EEADR,F ; set to 0x102 |
160 call read_eeprom ; read current version y | 159 call read_eeprom ; read current version y |
161 movff EEDATA,temp2 | 160 movff EEDATA,temp2 |
206 lfsr FSR0,oPressureAdjust | 205 lfsr FSR0,oPressureAdjust |
207 call option_reset ; Reset FSR0 option to factory default. | 206 call option_reset ; Reset FSR0 option to factory default. |
208 lfsr FSR0,oPressureAdjust | 207 lfsr FSR0,oPressureAdjust |
209 call option_save ; Save in EEPROM | 208 call option_save ; Save in EEPROM |
210 | 209 |
210 call fix_180_dives ; fix dives made with the 1.80 | |
211 | |
211 movlw d'1' ; store current version in EEPROM | 212 movlw d'1' ; store current version in EEPROM |
212 movwf EEADR | 213 movwf EEADR ; =1 |
213 movlw d'1' | 214 movwf EEADRH ; =1 |
214 movwf EEADRH | |
215 movlw softwareversion_x | 215 movlw softwareversion_x |
216 movwf EEDATA | 216 movwf EEDATA |
217 call write_eeprom ; write version x | 217 call write_eeprom ; write version x |
218 incf EEADR,F ; set to 0x102 | 218 incf EEADR,F ; set to 0x102 |
219 movlw softwareversion_y | 219 movlw softwareversion_y |