Mercurial > public > hwos_code
comparison src/options.asm @ 133:939f1e83c4c2
BUGFIX: Surface interval was not displayed correctly in some cases
NEW: Store tissue load, date and time, surface interval, desat. time and nofly time every hour and reload them after battery change
author | heinrichsweikamp |
---|---|
date | Mon, 14 Jul 2014 15:17:07 +0200 |
parents | f3062a611eef |
children | e0b758865e91 |
comparison
equal
deleted
inserted
replaced
132:ec0b1e829399 | 133:939f1e83c4c2 |
---|---|
237 option_save_all: | 237 option_save_all: |
238 ;---- Save option serial into EEPROM to detect reset and new version | 238 ;---- Save option serial into EEPROM to detect reset and new version |
239 movlw LOW(eeprom_serial_save) | 239 movlw LOW(eeprom_serial_save) |
240 movwf EEADR | 240 movwf EEADR |
241 movlw HIGH(eeprom_serial_save) | 241 movlw HIGH(eeprom_serial_save) |
242 movf EEADRH | 242 movwf EEADRH |
243 movlw LOW(eeprom_opt_serial) | 243 movlw LOW(eeprom_opt_serial) |
244 movwf EEDATA | 244 movwf EEDATA |
245 call write_eeprom | 245 call write_eeprom |
246 incf EEADR,F | 246 incf EEADR,F |
247 movlw HIGH(eeprom_opt_serial) | 247 movlw HIGH(eeprom_opt_serial) |
280 xorlw 2 | 280 xorlw 2 |
281 bz option_save_string | 281 bz option_save_string |
282 | 282 |
283 ; One byte to save to eeprom | 283 ; One byte to save to eeprom |
284 movff INDF1,EEDATA | 284 movff INDF1,EEDATA |
285 goto write_eeprom | 285 btfss EEADRH,1 ; EEADR:EEADRH < 512? |
286 call write_eeprom ; Yes, write | |
287 return | |
286 | 288 |
287 option_save_string: | 289 option_save_string: |
288 movff POSTINC1,EEDATA ; Write one byte | 290 movff POSTINC1,EEDATA ; Write one byte |
289 call write_eeprom | 291 btfss EEADRH,1 ; EEADR:EEADRH < 512? |
292 call write_eeprom ; Yes, write | |
290 infsnz EEADR,F | 293 infsnz EEADR,F |
291 incf EEADRH,F | 294 incf EEADRH,F |
292 | 295 |
293 decfsz opt_max ; Decrement string length | 296 decfsz opt_max ; Decrement string length |
294 bra option_save_string ; And loop while not finished | 297 bra option_save_string ; And loop while not finished |