Added
All checks were successful
Test compiling project / test (push) Successful in 1m56s

This commit is contained in:
2023-10-28 19:17:00 +02:00
parent 496e7833f8
commit ce08e4c211
2 changed files with 3 additions and 3 deletions

View File

@@ -20,4 +20,4 @@ lib_deps =
ArduinoLog
upload_protocol = espota
upload_port = 192.168.4.18
upload_port = 10.0.3.50

View File

@@ -96,7 +96,7 @@ Preferences prefs;
AsyncWebServer server(80);
#define FORMAT_LITTLEFS_IF_FAILED true
void display_percentage(int percentage)
void display_percentage(float percentage)
{
digitalWrite(LED_RED, 0);
@@ -295,7 +295,7 @@ void read_sensor_task(void* parameter)
// Raw unrounded percentage in decimal
float percentage_raw = (shunt_current_over_zero / (max_water_level_mA_over_zero - min_water_level_mA_over_zero));
float percentage_rounded = round(percentage_raw*100*100)/100;
float percentage_rounded = round(percentage_raw*100);
// Tank volume in liters
float liters_raw = max_liters * percentage_raw;