comparison src/ghostwriter.asm @ 455:85b533b7a18c

NEW: Store more battery info into logbook memory
author heinrichsweikamp
date Tue, 27 Sep 2016 16:40:14 +0200
parents b4f28ab23b87
children b4417044a042
comparison
equal deleted inserted replaced
454:0ef84436df32 455:85b533b7a18c
631 movf lo,W 631 movf lo,W
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 ; Spare at Byte 59 636 ; Battery info at Byte 59
637 movlw 0xFF 637 movff battery_type,lo ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah
638 swapf lo,F
639 movf batt_percent,W ; 0-100
640 addwf lo,W ; upper 4 bits: battery_type, lower 4 bits: batt_percent
638 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash 641 rcall ghostwrite_byte_header ; WREG -> Header in ext. flash
639 ; Store 5 Setpoints 642 ; Store 5 Setpoints
640 movff char_I_setpoint_cbar+0,WREG 643 movff char_I_setpoint_cbar+0,WREG
641 rcall ghostwrite_byte_header ; Setpoint in cbar 644 rcall ghostwrite_byte_header ; Setpoint in cbar
642 movff char_I_setpoint_change+0,WREG 645 movff char_I_setpoint_change+0,WREG