Compare commits

..

No commits in common. "e6a861185cca016bcb239417b932a813b682bd62" and "730f020f417f0bc63dd55415ba66efca1b481e3a" have entirely different histories.

7 changed files with 10 additions and 43 deletions

View File

@ -35,20 +35,6 @@
#define OTA_DELAY 50 // ticks -> 10ms / tick
#endif
#define LUBE_PULSE_LENGHT_MS 160
#define LUBE_PULSE_PAUSE_MS 340
// -> 2Hz PumpPulse
// -> 49,7cc / h @ 2Hz
// -> 49,7 ml / h @ 2Hz
// -> 828,4µl / min @ 2Hz
// -> 828,3µl / 60s
// -> 13,81µl / 1s
// -> 6,90µl / Pulse
#define DEFAULT_PUMP_DOSE 7
#define STARTUP_DELAY 5000
#define SHUTDOWN_DELAY_MS 5000
#define ATOMIC_FS_UPDATE

View File

@ -76,7 +76,7 @@ typedef struct
uint32_t DistancePerLube_Default = 8000;
uint32_t DistancePerLube_Rain = 4000;
uint32_t tankCapacity_ml = 320;
uint32_t amountPerDose_µl = DEFAULT_PUMP_DOSE;
uint32_t amountPerDose_µl = 72;
uint8_t TankRemindAtPercentage = 30;
uint8_t PulsePerRevolution = 1;
uint32_t TireWidth_mm = 150;
@ -95,7 +95,7 @@ typedef struct
} LubeConfig_t;
const LubeConfig_t LubeConfig_defaults{
0, 8000, 4000, 320, DEFAULT_PUMP_DOSE, 30, 1, 150, 70, 18, 2000, 25, SOURCE_IMPULSE,
0, 8000, 4000, 320, 72, 30, 1, 150, 70, 18, 2000, 25, SOURCE_IMPULSE,
#ifdef FEATURE_ENABLE_GPS
BAUD_115200,
#endif

View File

@ -5,7 +5,7 @@ uint32_t lubePulseTimestamp = 0;
void RunLubeApp(uint32_t add_milimeters)
{
globals.TankPercentage = PersistenceData.tankRemain_µl / (LubeConfig.tankCapacity_ml * 10);
globals.TankPercentage = PersistenceData.tankRemain_µl / (LubeConfig.tankCapacity_ml * 1000);
MaintainDTC(DTC_TANK_EMPTY, DTC_CRITICAL, (PersistenceData.tankRemain_µl < LubeConfig.amountPerDose_µl));
MaintainDTC(DTC_TANK_LOW, DTC_WARN, (globals.TankPercentage < LubeConfig.TankRemindAtPercentage));

View File

@ -8,6 +8,10 @@
#include "globals.h"
#include "dtc.h"
#define LUBE_PULSE_LENGHT_MS 160
#define LUBE_PULSE_PAUSE_MS 100
#define STARTUP_DELAY 5000
void RunLubeApp(uint32_t add_milimeters);
void LubePulse();

View File

@ -77,7 +77,6 @@ void RemoteDebug_CheckEEPOM();
void RemoteDebug_dumpConfig();
void RemoteDebug_dumpPersistance();
void RemoteDebug_ShowDTCs();
void RemoteDebug_dumpGlobals();
#endif
#ifdef FEATURE_ENABLE_WIFI_CLIENT
@ -288,11 +287,9 @@ void processCmdRemoteDebug()
else if (lastCmd == "dumpPDS")
RemoteDebug_dumpPersistance();
else if (lastCmd == "saveEE")
globals.requestEEAction = EE_ALL_SAVE;
globals.requestEEAction == EE_ALL_SAVE;
else if (lastCmd == "showdtc")
RemoteDebug_ShowDTCs();
else if (lastCmd == "dumpGlobals")
RemoteDebug_dumpGlobals();
}
void RemoteDebug_formatCFG()
@ -353,20 +350,6 @@ void RemoteDebug_dumpConfig()
debugA("checksum: 0x%08X", LubeConfig.checksum);
}
void RemoteDebug_dumpGlobals()
{
debugA("systemStatus: %d", globals.systemStatus);
debugA("resumeStatus: %d", globals.resumeStatus);
debugA("systemStatustxt: %s", globals.systemStatustxt);
debugA("purgePulses: %d", globals.purgePulses);
debugA("requestEEAction: %d", globals.requestEEAction);
debugA("DeviceName: %s", globals.DeviceName);
debugA("FlashVersion: %s", globals.FlashVersion);
debugA("eePersistanceAdress: %d", globals.eePersistanceAdress);
debugA("TankPercentage: %d", globals.TankPercentage);
debugA("hasDTC: %d", globals.hasDTC);
}
void RemoteDebug_dumpPersistance()
{
debugA("writeCycleCounter: %d", PersistenceData.writeCycleCounter);
@ -765,7 +748,7 @@ void SystemShutdown()
if (shutdown_delay == 0)
{
shutdown_delay = millis() + SHUTDOWN_DELAY_MS;
Serial.printf("Shutdown requested - Restarting in %d seconds\n", SHUTDOWN_DELAY_MS / 1000);
Serial.printf("Shutdown requested - Restarting in %d seconds\n", SHUTDOWN_DELAY_MS/1000);
}
if (shutdown_delay < millis())
{

View File

@ -9,5 +9,4 @@ const char helpCmd[] = "sysinfo - System Info\r\n"
"dumpCFG - print Config struct\r\n"
"dumpPDS - print PersistanceStruct\r\n"
"saveEE - save EE-Data\r\n"
"showdtc - Show all DTCs\r\n"
"dumpGlobals - print globals\r\n";
"showdtc - Show all DTCs\r\n";

View File

@ -323,11 +323,6 @@ void WebserverPOST_Callback(AsyncWebServerRequest *request)
globals.requestEEAction = globals.requestEEAction == EE_PDS_FORMAT ? EE_FORMAT_ALL : EE_CFG_FORMAT;
}
}
if (p->name() == "purgenow")
{
globals.systemStatus = sysStat_Purge;
globals.purgePulses = LubeConfig.BleedingPulses;
}
// end: POST Form Maintenance
}
}