mirror of
http://git.ua1zbe.ru/ua1zbe/LoRa_APRS_Beacon.git
synced 2026-08-14 04:30:31 +00:00
Initial commit: LoRa APRS Beacon для T-Beam V1.2
- Статический маяк с координатами 67.369281N, 32.497063E - Отправка каждые 10 минут + при включении - APRS символ L в чёрном ромбике, позывной UA1ZBE-TS - Дисплей SH1106 1.3 повёрнутый - Мониторинг напряжения батареи в сообщении - Кнопка для ручной отправки - Частота 433.775 MHz, SF12, BW125 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
59
src/power_management.h
Normal file
59
src/power_management.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef POWER_MANAGEMENT_H_
|
||||
#define POWER_MANAGEMENT_H_
|
||||
|
||||
#include <Wire.h>
|
||||
#include <XPowersLibInterface.hpp>
|
||||
|
||||
class PowerManagement {
|
||||
public:
|
||||
~PowerManagement() {
|
||||
}
|
||||
|
||||
virtual bool begin(TwoWire &port) = 0;
|
||||
|
||||
virtual void activateLoRa() = 0;
|
||||
virtual void deactivateLoRa() = 0;
|
||||
|
||||
virtual void activateGPS() = 0;
|
||||
virtual void deactivateGPS() = 0;
|
||||
|
||||
virtual void activateOLED() = 0;
|
||||
virtual void deactivateOLED() = 0;
|
||||
|
||||
virtual void activateMeasurement() = 0;
|
||||
virtual void deactivateMeasurement() = 0;
|
||||
|
||||
virtual double getBatteryVoltage() = 0;
|
||||
|
||||
virtual bool isBatteryConnect() = 0;
|
||||
virtual bool isCharging() = 0;
|
||||
|
||||
protected:
|
||||
XPowersLibInterface *_pmu = 0;
|
||||
};
|
||||
|
||||
class AXP2101 : public PowerManagement {
|
||||
public:
|
||||
AXP2101();
|
||||
|
||||
bool begin(TwoWire &port);
|
||||
|
||||
void activateLoRa();
|
||||
void deactivateLoRa();
|
||||
|
||||
void activateGPS();
|
||||
void deactivateGPS();
|
||||
|
||||
void activateOLED();
|
||||
void deactivateOLED();
|
||||
|
||||
void activateMeasurement();
|
||||
void deactivateMeasurement();
|
||||
|
||||
double getBatteryVoltage();
|
||||
|
||||
bool isBatteryConnect();
|
||||
bool isCharging();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user