Skip to content

'PRESENTSTATUS_CHARGING' was not declared in this scope #35

Description

@logicmim

Error trying to run threeBatteriesLPUPS, 'PRESENTSTATUS_CHARGING' was not declared in this scope. What is missing?

In file included from C:\Users\LattePanda\Documents\Arduino\libraries\DFRobot_LPUPS-master/DFRobot_LPUPS.h:15:0,
from C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:2:
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp: In function 'void flashReportedData()':
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:163:28: error: 'PRESENTSTATUS_CHARGING' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_CHARGING);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:165:30: error: 'PRESENTSTATUS_CHARGING' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_CHARGING);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:169:28: error: 'PRESENTSTATUS_ACPRESENT' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_ACPRESENT);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:171:30: error: 'PRESENTSTATUS_ACPRESENT' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_ACPRESENT);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:175:28: error: 'PRESENTSTATUS_FULLCHARGE' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_FULLCHARGE);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:177:30: error: 'PRESENTSTATUS_FULLCHARGE' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_FULLCHARGE);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:181:28: error: 'PRESENTSTATUS_DISCHARGING' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_DISCHARGING);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:186:30: error: 'PRESENTSTATUS_RTLEXPIRED' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_RTLEXPIRED);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:188:32: error: 'PRESENTSTATUS_RTLEXPIRED' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_RTLEXPIRED);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:191:30: error: 'PRESENTSTATUS_DISCHARGING' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_DISCHARGING);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:192:30: error: 'PRESENTSTATUS_RTLEXPIRED' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_RTLEXPIRED); // Clearing relevant flags during charging.
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:197:28: error: 'PRESENTSTATUS_SHUTDOWNREQ' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_SHUTDOWNREQ);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:200:30: error: 'PRESENTSTATUS_SHUTDOWNREQ' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_SHUTDOWNREQ);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:203:31: error: 'PRESENTSTATUS_SHUTDOWNREQ' was not declared in this scope
if ((iPresentStatus & (1 << PRESENTSTATUS_SHUTDOWNREQ)) ||
^~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\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\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:2:
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:205:28: error: 'PRESENTSTATUS_SHUTDOWNIMNT' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_SHUTDOWNIMNT); // - Shutdown imminent.
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:208:30: error: 'PRESENTSTATUS_SHUTDOWNIMNT' was not declared in this scope
bitClear(iPresentStatus, PRESENTSTATUS_SHUTDOWNIMNT);
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:113:52: note: in definition of macro 'bitClear'
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
^~~
C:\Users\LattePanda\AppData\Local\Temp.arduinoIDE-unsaved20241131-5012-1gap0rs.30axi\threeBatteriesLPUPS\fun.cpp:210:26: error: 'PRESENTSTATUS_BATTPRESENT' was not declared in this scope
bitSet(iPresentStatus, PRESENTSTATUS_BATTPRESENT); // - Power BATT
^
C:\Users\LattePanda\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
^~~

exit status 1

Compilation error: 'PRESENTSTATUS_CHARGING' was not declared in this scope

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions