Mercurial > public > hwos_code
comparison src/ghostwriter.asm @ 472:4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
NEW: Show battery type in information menu (T0:1.5V AA, T1:3.6V AA, T2:3.6V/0.8A LiIon, T3:Internal 18650, T4:Internal 16650)
author | heinrichsweikamp |
---|---|
date | Sun, 18 Dec 2016 18:20:39 +0100 |
parents | b4417044a042 |
children | ad8acade5567 |
comparison
equal
deleted
inserted
replaced
471:9edb1359ce43 | 472:4fdf6886004b |
---|---|
632 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash | 632 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash |
633 movf hi,W | 633 movf hi,W |
634 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash | 634 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash |
635 | 635 |
636 ; Battery info at Byte 59 | 636 ; Battery info at Byte 59 |
637 movff battery_type,lo ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah | 637 movff battery_type,lo ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah, =4: LiIon 3,7V/2.3Ah |
638 swapf lo,F | 638 swapf lo,F |
639 movf batt_percent,W ; 0-100 | 639 movf batt_percent,W ; 0-100 |
640 addwf lo,W ; upper 4 bits: battery_type, lower 4 bits: batt_percent | 640 addwf lo,W ; upper 4 bits: battery_type, lower 4 bits: batt_percent |
641 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash | 641 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash |
642 ; Store 5 Setpoints | 642 ; Store 5 Setpoints |
1060 write_int_eeprom 0x0A | 1060 write_int_eeprom 0x0A |
1061 movff battery_gauge+4,EEDATA | 1061 movff battery_gauge+4,EEDATA |
1062 write_int_eeprom 0x0B | 1062 write_int_eeprom 0x0B |
1063 movff battery_gauge+5,EEDATA | 1063 movff battery_gauge+5,EEDATA |
1064 write_int_eeprom 0x0C | 1064 write_int_eeprom 0x0C |
1065 movff battery_type,EEDATA ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah | 1065 movff battery_type,EEDATA ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah, =4: LiIon 3,7V/2.3Ah |
1066 write_int_eeprom 0x0F | 1066 write_int_eeprom 0x0F |
1067 return | 1067 return |
1068 | 1068 |
1069 | 1069 |
1070 global vault_decodata_into_eeprom | 1070 global vault_decodata_into_eeprom |