Files
ESP32Marauder/esp32_marauder/BatteryInterface.h
Just Call Me Koko 2f0d05a538 Develop (#121)
* Adding new library, changing way of displaying texts (#118)

* Adding custom icon for language button

* Adding new library, changing way of displaying texts

Added new library to make incoming translation possible to exists at the same time.

* Prepare for flipper integration

* More flipper wifi dev board work

* Add command parse

* Add set channel

* Create bins for release v0.9.6

Co-authored-by: mlodawy <105587112+mlodawy@users.noreply.github.com>
2022-05-28 09:06:59 -04:00

33 lines
503 B
C++

#ifndef BatteryInterface_h
#define BatteryInterface_h
#include <Arduino.h>
#include "configs.h"
#ifndef MARAUDER_FLIPPER
#include <Wire.h>
#endif
#define I2C_SDA 33
#define I2C_SCL 22
#define IP5306_ADDR 0x75
class BatteryInterface {
private:
uint32_t initTime = 0;
public:
int8_t battery_level = 0;
int8_t old_level = 0;
bool i2c_supported = false;
BatteryInterface();
void RunSetup();
void main(uint32_t currentTime);
int8_t getBatteryLevel();
};
#endif