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
|
||||
double AXP192::getBatteryChargeDischargeCurrent() {
|
||||
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() {
|
||||
|
|
|
@ -38,56 +38,50 @@ class AXP192 : public PowerManagement {
|
|||
public:
|
||||
AXP192();
|
||||
|
||||
bool begin(TwoWire &port);
|
||||
bool begin(TwoWire &port) override;
|
||||
|
||||
void activateLoRa();
|
||||
void deactivateLoRa();
|
||||
void activateLoRa() override;
|
||||
void deactivateLoRa() override;
|
||||
|
||||
void activateGPS();
|
||||
void deactivateGPS();
|
||||
void activateGPS() override;
|
||||
void deactivateGPS() override;
|
||||
|
||||
void activateOLED();
|
||||
void deactivateOLED();
|
||||
void activateOLED() override;
|
||||
void deactivateOLED() override;
|
||||
|
||||
void enableChgLed();
|
||||
void disableChgLed();
|
||||
void activateMeasurement() override;
|
||||
void deactivateMeasurement() override;
|
||||
|
||||
void activateMeasurement();
|
||||
void deactivateMeasurement();
|
||||
double getBatteryVoltage() override;
|
||||
double getBatteryChargeDischargeCurrent() override;
|
||||
|
||||
double getBatteryVoltage();
|
||||
double getBatteryChargeDischargeCurrent();
|
||||
|
||||
bool isBatteryConnect();
|
||||
bool isCharging();
|
||||
bool isBatteryConnect() override;
|
||||
bool isCharging() override;
|
||||
};
|
||||
|
||||
class AXP2101 : public PowerManagement {
|
||||
public:
|
||||
AXP2101();
|
||||
|
||||
bool begin(TwoWire &port);
|
||||
bool begin(TwoWire &port) override;
|
||||
|
||||
void activateLoRa();
|
||||
void deactivateLoRa();
|
||||
void activateLoRa() override;
|
||||
void deactivateLoRa() override;
|
||||
|
||||
void activateGPS();
|
||||
void deactivateGPS();
|
||||
void activateGPS() override;
|
||||
void deactivateGPS() override;
|
||||
|
||||
void activateOLED();
|
||||
void deactivateOLED();
|
||||
void activateOLED() override;
|
||||
void deactivateOLED() override;
|
||||
|
||||
void enableChgLed();
|
||||
void disableChgLed();
|
||||
void activateMeasurement() override;
|
||||
void deactivateMeasurement() override;
|
||||
|
||||
void activateMeasurement();
|
||||
void deactivateMeasurement();
|
||||
double getBatteryVoltage() override;
|
||||
double getBatteryChargeDischargeCurrent() override;
|
||||
|
||||
double getBatteryVoltage();
|
||||
double getBatteryChargeDischargeCurrent();
|
||||
|
||||
bool isBatteryConnect();
|
||||
bool isCharging();
|
||||
bool isBatteryConnect() override;
|
||||
bool isCharging() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,7 +31,7 @@ private:
|
|||
static uint _instances;
|
||||
static OneButton _userButton;
|
||||
static bool _send_update;
|
||||
static void pushButton();
|
||||
static void pushButton(); // cppcheck-suppress unusedPrivateFunction
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue