kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
fixing cppcheck
rodzic
0ba2a0d074
commit
b0b20ea496
|
@ -96,9 +96,9 @@ double AXP192::getBatteryVoltage() {
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
double AXP192::getBatteryChargeDischargeCurrent() {
|
double AXP192::getBatteryChargeDischargeCurrent() {
|
||||||
if (isCharging()) {
|
if (isCharging()) {
|
||||||
return ((XPowersAXP192 *)_pmu)->getBatteryChargeCurrent();
|
return static_cast<XPowersAXP192 *>(_pmu)->getBatteryChargeCurrent();
|
||||||
}
|
}
|
||||||
return -1.0 * ((XPowersAXP192 *)_pmu)->getBattDischargeCurrent();
|
return -1.0 * static_cast<XPowersAXP192 *>(_pmu)->getBattDischargeCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AXP192::isBatteryConnect() {
|
bool AXP192::isBatteryConnect() {
|
||||||
|
|
|
@ -38,56 +38,50 @@ class AXP192 : public PowerManagement {
|
||||||
public:
|
public:
|
||||||
AXP192();
|
AXP192();
|
||||||
|
|
||||||
bool begin(TwoWire &port);
|
bool begin(TwoWire &port) override;
|
||||||
|
|
||||||
void activateLoRa();
|
void activateLoRa() override;
|
||||||
void deactivateLoRa();
|
void deactivateLoRa() override;
|
||||||
|
|
||||||
void activateGPS();
|
void activateGPS() override;
|
||||||
void deactivateGPS();
|
void deactivateGPS() override;
|
||||||
|
|
||||||
void activateOLED();
|
void activateOLED() override;
|
||||||
void deactivateOLED();
|
void deactivateOLED() override;
|
||||||
|
|
||||||
void enableChgLed();
|
void activateMeasurement() override;
|
||||||
void disableChgLed();
|
void deactivateMeasurement() override;
|
||||||
|
|
||||||
void activateMeasurement();
|
double getBatteryVoltage() override;
|
||||||
void deactivateMeasurement();
|
double getBatteryChargeDischargeCurrent() override;
|
||||||
|
|
||||||
double getBatteryVoltage();
|
bool isBatteryConnect() override;
|
||||||
double getBatteryChargeDischargeCurrent();
|
bool isCharging() override;
|
||||||
|
|
||||||
bool isBatteryConnect();
|
|
||||||
bool isCharging();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AXP2101 : public PowerManagement {
|
class AXP2101 : public PowerManagement {
|
||||||
public:
|
public:
|
||||||
AXP2101();
|
AXP2101();
|
||||||
|
|
||||||
bool begin(TwoWire &port);
|
bool begin(TwoWire &port) override;
|
||||||
|
|
||||||
void activateLoRa();
|
void activateLoRa() override;
|
||||||
void deactivateLoRa();
|
void deactivateLoRa() override;
|
||||||
|
|
||||||
void activateGPS();
|
void activateGPS() override;
|
||||||
void deactivateGPS();
|
void deactivateGPS() override;
|
||||||
|
|
||||||
void activateOLED();
|
void activateOLED() override;
|
||||||
void deactivateOLED();
|
void deactivateOLED() override;
|
||||||
|
|
||||||
void enableChgLed();
|
void activateMeasurement() override;
|
||||||
void disableChgLed();
|
void deactivateMeasurement() override;
|
||||||
|
|
||||||
void activateMeasurement();
|
double getBatteryVoltage() override;
|
||||||
void deactivateMeasurement();
|
double getBatteryChargeDischargeCurrent() override;
|
||||||
|
|
||||||
double getBatteryVoltage();
|
bool isBatteryConnect() override;
|
||||||
double getBatteryChargeDischargeCurrent();
|
bool isCharging() override;
|
||||||
|
|
||||||
bool isBatteryConnect();
|
|
||||||
bool isCharging();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,7 +31,7 @@ private:
|
||||||
static uint _instances;
|
static uint _instances;
|
||||||
static OneButton _userButton;
|
static OneButton _userButton;
|
||||||
static bool _send_update;
|
static bool _send_update;
|
||||||
static void pushButton();
|
static void pushButton(); // cppcheck-suppress unusedPrivateFunction
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Ładowanie…
Reference in New Issue