OOP firmware for CUD

no ext display function yet
This commit is contained in:
Siwat Sirichai 2024-01-10 20:35:53 +07:00
parent dbfb1f5a0f
commit 40f8799a05
5 changed files with 133 additions and 1 deletions

View file

@ -1,9 +1,23 @@
#include <main.h>
#include <main.hpp>
#include <cud_display.hpp>
ESPMegaPRO espmega = ESPMegaPRO();
CUDDisplay external_display = CUDDisplay();
const char *mode_names[] = {"off", "fan_only", "cool"};
const char *fan_speed_names[] = {"auto", "high", "medium", "low"};
AirConditioner ac = {
.max_temperature = 30,
.min_temperature = 15,
.modes = 3,
.mode_names = mode_names,
.fan_speeds = 4,
.fan_speed_names = fan_speed_names,
.getInfraredCode = &getInfraredCode
};
void setup() {
espmega.begin();
espmega.enableIotModule();