Implement new logger in batterymonitor.cpp

This commit is contained in:
TheDevMinerTV
2022-02-23 22:27:27 +01:00
parent 19a45a78a1
commit b438d3289c
2 changed files with 4 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ void BatteryMonitor::Setup()
}
if (address == 0)
{
Serial.println(F("[ERR] MCP3021 not found on I2C bus"));
m_Logger.error("MCP3021 not found on I2C bus");
}
#endif
}

View File

@@ -29,6 +29,7 @@
#include <i2cscan.h>
#include <I2Cdev.h>
#include "ledmgr.h"
#include "logging/Logger.h"
#if BATTERY_MONITOR == BAT_EXTERNAL
#ifndef PIN_BATTERY_LEVEL
@@ -59,6 +60,8 @@ private:
#endif
float voltage = -1;
float level = -1;
SlimeVR::Logging::Logger m_Logger = SlimeVR::Logging::Logger("BatteryMonitor");
};
#endif // SLIMEVR_BATTERYMONITOR_H_