Files
waterlevel-software/src/global_data/global_data.h
2025-11-04 21:09:40 +01:00

50 lines
813 B
C

#include <Arduino.h>
#include <utils.h>
#pragma once
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;
float temperature;
};
struct ActiveErrors {
bool voltage_low;
bool voltage_high;
bool current_low;
bool current_high;
bool level_low;
bool level_high;
};
struct OTAStatus {
bool update_available;
Version current_version;
Version latest_version;
int update_progress;
String update_url;
};