UPS Latte Panda Delta PRESENTSTATUS_CHARGING' was not declared in this scope

Hello, I am using UPS hat for Latte Panda 3 Delta. When I upload LPUPS I get and error, PRESENTSTATUS_CHARGING' was not declared in this scope.
Is the a setting for Presentstatus? Thank you.
Arduino: 1.8.16 (Windows 10), Board: "LattePanda Leonardo"
In file included from C:\Users\LattePanda\Documents\Arduino\libraries\DFRobot_LPUPS-master/DFRobot_LPUPS.h:15:0,
from C:\Users\LattePanda\Documents\Arduino\threeBatteriesLPUPS\fun.cpp:2:
C:\Users\LattePanda\Documents\Arduino\threeBatteriesLPUPS\fun.cpp: In function 'void flashReportedData()':
fun.cpp:163:28: error: 'PRESENTSTATUS_CHARGING' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_CHARGING);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
fun.cpp:165:30: error: 'PRESENTSTATUS_CHARGING' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_CHARGING);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:169:28: error: 'PRESENTSTATUS_ACPRESENT' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_ACPRESENT);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
fun.cpp:171:30: error: 'PRESENTSTATUS_ACPRESENT' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_ACPRESENT);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:175:28: error: 'PRESENTSTATUS_FULLCHARGE' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_FULLCHARGE);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
fun.cpp:177:30: error: 'PRESENTSTATUS_FULLCHARGE' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_FULLCHARGE);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:181:28: error: 'PRESENTSTATUS_DISCHARGING' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_DISCHARGING);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
fun.cpp:186:30: error: 'PRESENTSTATUS_RTLEXPIRED' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_RTLEXPIRED);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
fun.cpp:188:32: error: 'PRESENTSTATUS_RTLEXPIRED' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_RTLEXPIRED);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:191:30: error: 'PRESENTSTATUS_DISCHARGING' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_DISCHARGING);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:192:30: error: 'PRESENTSTATUS_RTLEXPIRED' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_RTLEXPIRED); // Clearing relevant flags during charging.
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:197:28: error: 'PRESENTSTATUS_SHUTDOWNREQ' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_SHUTDOWNREQ);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
fun.cpp:200:30: error: 'PRESENTSTATUS_SHUTDOWNREQ' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_SHUTDOWNREQ);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:203:31: error: 'PRESENTSTATUS_SHUTDOWNREQ' was not declared in this scope
if ((iPresentStatus & (1 << PRESENTSTATUS_SHUTDOWNREQ)) ||
^~~~~~~~~~~~~~~~~~~~~~~~~
fun.cpp:204:29: error: 'PRESENTSTATUS_RTLEXPIRED' was not declared in this scope
(iPresentStatus & (1 << PRESENTSTATUS_RTLEXPIRED))) {
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\LattePanda\Documents\Arduino\libraries\DFRobot_LPUPS-master/DFRobot_LPUPS.h:15:0,
from C:\Users\LattePanda\Documents\Arduino\threeBatteriesLPUPS\fun.cpp:2:
fun.cpp:205:28: error: 'PRESENTSTATUS_SHUTDOWNIMNT' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_SHUTDOWNIMNT); // - Shutdown imminent.
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
fun.cpp:208:30: error: 'PRESENTSTATUS_SHUTDOWNIMNT' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_SHUTDOWNIMNT);
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
fun.cpp:210:26: error: 'PRESENTSTATUS_BATTPRESENT' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_BATTPRESENT); // - Power BATT
^
C:\Program Files (x86)\Arduino\hardware\avr-0.0.3\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
exit status 1
'PRESENTSTATUS_CHARGING' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I found something missing, the fix was from Github, abratchik/HIDPowerDevice
Setup is very simple. Just clone this repository to Arduino libraries, then upload the sketch UPS.ino from the /examples folder. Once upload is completed successfully you will find HID Device Battery in your system.
