Added gauge, fixed shit
Some checks failed
Test compiling project / test (push) Failing after 1m30s

This commit is contained in:
2024-10-24 22:54:54 +02:00
parent 57b1ce8db7
commit db567eeaa5
14 changed files with 413 additions and 223 deletions

View File

@@ -0,0 +1,9 @@
// Define keys to prevent typos
#define ssid_key "ssid"
#define wifi_password_key "wifi_password"
#define level_sensor_range_key "sensor_range"
#define water_level_min_key "water_level_min"
#define water_level_max_key "water_level_max"
#define water_volume_key "water_volume"
#define RESISTOR_VALUE 4

View File

@@ -0,0 +1,10 @@
#include "global_data.h"
NetworkData wifi_data;
NetworkData ethernet_data;
DeviceTelemetry telemetry;
SensorData shunt_data;
WaterData water_data;
ActiveErrors active_errors = { false, false, false, false, false, false };

View File

@@ -0,0 +1,38 @@
#include <Arduino.h>
struct SensorData {
float bus_voltage;
float shunt_voltage;
float shunt_current;
};
struct WaterData{
// Water level in cm
float level;
// Water volume in liters
float liters;
// Percentage
float percentage;
};
struct NetworkData {
String ip_address;
bool link;
float rssi;
String network_name;
};
struct DeviceTelemetry {
float heap_used_percent;
int uptime_seconds;
};
struct ActiveErrors {
bool voltage_low;
bool voltage_high;
bool current_low;
bool current_high;
bool level_low;
bool level_high;
};