Compare commits
No commits in common. "b7ccffc157bc4317ee8c125ca253fafaf7ce0808" and "5638c03e76c69072d9cd88897b26f4e96eff96bf" have entirely different histories.
b7ccffc157
...
5638c03e76
@ -349,33 +349,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
|
||||||
<label for="washdistance" class="control-label col-4">Waschmodus Distanz</label>
|
|
||||||
<div class="col-8">
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="washdistance" type="text"
|
|
||||||
class="set-wsevent data-washdistance form-control" required="required">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<span class="input-group-text">m</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group row">
|
|
||||||
<label for="washinterval" class="control-label col-4">Waschmodus Interval</label>
|
|
||||||
<div class="col-8">
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="washinterval" type="text"
|
|
||||||
class="set-wsevent data-washinterval form-control" required="required">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<span class="input-group-text">m</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<!-- Div Group Lube Settings-->
|
<!-- Div Group Lube Settings-->
|
||||||
<!-- Div Group Oiltank Settings -->
|
<!-- Div Group Oiltank Settings -->
|
||||||
|
@ -73,7 +73,6 @@ typedef enum eSystem_Status
|
|||||||
sysStat_Startup,
|
sysStat_Startup,
|
||||||
sysStat_Normal,
|
sysStat_Normal,
|
||||||
sysStat_Rain,
|
sysStat_Rain,
|
||||||
sysStat_Wash,
|
|
||||||
sysStat_Purge,
|
sysStat_Purge,
|
||||||
sysStat_Error,
|
sysStat_Error,
|
||||||
sysStat_Shutdown
|
sysStat_Shutdown
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "dtc.h"
|
#include "dtc.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#define EEPROM_STRUCTURE_REVISION 4 // Increment this version when changing EEPROM structures
|
#define EEPROM_STRUCTURE_REVISION 3 // Increment this version when changing EEPROM structures
|
||||||
|
|
||||||
#if PCB_REV == 1 || PCB_REV == 2 || PCB_REV == 3
|
#if PCB_REV == 1 || PCB_REV == 2 || PCB_REV == 3
|
||||||
#define EEPROM_SIZE_BYTES I2C_DEVICESIZE_24LC64
|
#define EEPROM_SIZE_BYTES I2C_DEVICESIZE_24LC64
|
||||||
@ -69,8 +69,6 @@ typedef struct
|
|||||||
uint32_t RimDiameter_Inch;
|
uint32_t RimDiameter_Inch;
|
||||||
uint32_t DistancePerRevolution_mm;
|
uint32_t DistancePerRevolution_mm;
|
||||||
uint16_t BleedingPulses;
|
uint16_t BleedingPulses;
|
||||||
uint16_t WashMode_Distance;
|
|
||||||
uint16_t WashMode_Interval;
|
|
||||||
SpeedSource_t SpeedSource;
|
SpeedSource_t SpeedSource;
|
||||||
GPSBaudRate_t GPSBaudRate;
|
GPSBaudRate_t GPSBaudRate;
|
||||||
CANSource_t CANSource;
|
CANSource_t CANSource;
|
||||||
@ -87,7 +85,7 @@ typedef struct
|
|||||||
|
|
||||||
// Default configuration settings
|
// Default configuration settings
|
||||||
const LubeConfig_t LubeConfig_defaults = {
|
const LubeConfig_t LubeConfig_defaults = {
|
||||||
0, 8000, 4000, 320, DEFAULT_PUMP_DOSE, 30, 1, 150, 70, 18, 2000, 25, 500, 10, SOURCE_IMPULSE,
|
0, 8000, 4000, 320, DEFAULT_PUMP_DOSE, 30, 1, 150, 70, 18, 2000, 25, SOURCE_IMPULSE,
|
||||||
BAUD_115200,
|
BAUD_115200,
|
||||||
KTM_890_ADV_R_2021,
|
KTM_890_ADV_R_2021,
|
||||||
false,
|
false,
|
||||||
|
@ -37,10 +37,9 @@
|
|||||||
#define LED_STARTUP_TANKWARN COLOR_AMBER
|
#define LED_STARTUP_TANKWARN COLOR_AMBER
|
||||||
#define LED_NORMAL_COLOR COLOR_GREEN
|
#define LED_NORMAL_COLOR COLOR_GREEN
|
||||||
#define LED_RAIN_COLOR COLOR_BLUE
|
#define LED_RAIN_COLOR COLOR_BLUE
|
||||||
#define LED_WASH_COLOR COLOR_JADE
|
#define LED_WIFI_BLINK COLOR_YELLOW
|
||||||
#define LED_WIFI_COLOR COLOR_YELLOW
|
|
||||||
#define LED_PURGE_COLOR COLOR_MAGENTA
|
#define LED_PURGE_COLOR COLOR_MAGENTA
|
||||||
#define LED_ERROR_COLOR COLOR_RED
|
#define LED_ERROR_BLINK COLOR_RED
|
||||||
#define LED_SHUTDOWN_COLOR COLOR_CYAN
|
#define LED_SHUTDOWN_BLINK COLOR_CYAN
|
||||||
|
|
||||||
#endif /* _LED_COLORS_H_ */
|
#endif /* _LED_COLORS_H_ */
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#define _LEDCONTROL_H_
|
#define _LEDCONTROL_H_
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "led_colors.h"
|
|
||||||
|
|
||||||
// LED-Muster
|
// LED-Muster
|
||||||
enum LedPattern
|
enum LedPattern
|
||||||
@ -13,8 +12,7 @@ enum LedPattern
|
|||||||
LED_PATTERN_FLASH_FAST,
|
LED_PATTERN_FLASH_FAST,
|
||||||
LED_PATTERN_BLINK,
|
LED_PATTERN_BLINK,
|
||||||
LED_PATTERN_BLINK_FAST,
|
LED_PATTERN_BLINK_FAST,
|
||||||
LED_PATTERN_BREATH,
|
LED_PATTERN_BREATH
|
||||||
LED_PATTERN_BREATH_REVERSE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialisiert die LED-Steuerung
|
// Initialisiert die LED-Steuerung
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
*
|
*
|
||||||
* @brief Header file for converting structs to JSON objects.
|
* @brief Header file for converting structs to JSON objects.
|
||||||
*
|
*
|
||||||
* @note This file is auto-generated by a script on 2025-06-15 11:37:51.
|
* @note This file is auto-generated by a script on 2024-01-30 20:29:34.
|
||||||
*
|
*
|
||||||
* @author Marcel Peterkau
|
* @author Marcel Peterkau
|
||||||
* @date 15.06.2025
|
* @date 30.01.2024
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _STRUCT2JSON_H_
|
#ifndef _STRUCT2JSON_H_
|
||||||
@ -23,4 +23,4 @@ void generateJsonObject_PersistenceData(JsonObject data);
|
|||||||
|
|
||||||
#endif /* _STRUCT2JSON_H_ */
|
#endif /* _STRUCT2JSON_H_ */
|
||||||
|
|
||||||
// CODEGENERATOR_CHECKSUM: 4702cb49ea55617cbb34715164810bb58d3c3f46fb1653b6f47bd4fd9cb0031e
|
// CODEGENERATOR_CHECKSUM: 59f35aadffd0bbef253210ea2fbaaf9a515553a2e3cc9bf4cfa2819b63c969ce
|
@ -9,10 +9,12 @@ void ButtonAction_ToggleMode()
|
|||||||
if (globals.systemStatus == sysStat_Normal)
|
if (globals.systemStatus == sysStat_Normal)
|
||||||
{
|
{
|
||||||
globals.systemStatus = sysStat_Rain;
|
globals.systemStatus = sysStat_Rain;
|
||||||
|
globals.resumeStatus = sysStat_Rain;
|
||||||
}
|
}
|
||||||
else if (globals.systemStatus == sysStat_Rain)
|
else if (globals.systemStatus == sysStat_Rain)
|
||||||
{
|
{
|
||||||
globals.systemStatus = sysStat_Normal;
|
globals.systemStatus = sysStat_Normal;
|
||||||
|
globals.resumeStatus = sysStat_Normal;
|
||||||
}
|
}
|
||||||
Debug_pushMessage("Toggling Mode\n");
|
Debug_pushMessage("Toggling Mode\n");
|
||||||
}
|
}
|
||||||
@ -20,6 +22,7 @@ void ButtonAction_ToggleMode()
|
|||||||
void ButtonAction_StartPurge()
|
void ButtonAction_StartPurge()
|
||||||
{
|
{
|
||||||
globals.systemStatus = sysStat_Purge;
|
globals.systemStatus = sysStat_Purge;
|
||||||
|
globals.purgePulses = LubeConfig.BleedingPulses;
|
||||||
Debug_pushMessage("Starting Purge\n");
|
Debug_pushMessage("Starting Purge\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,21 +30,20 @@ void ButtonAction_ToggleWiFi()
|
|||||||
{
|
{
|
||||||
extern void toggleWiFiAP(bool shutdown = false);
|
extern void toggleWiFiAP(bool shutdown = false);
|
||||||
toggleWiFiAP();
|
toggleWiFiAP();
|
||||||
|
|
||||||
Debug_pushMessage("Toggling WiFi\n");
|
Debug_pushMessage("Toggling WiFi\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ButtonAction_WashMode()
|
void ButtonAction_WashMode()
|
||||||
{
|
{
|
||||||
globals.systemStatus = sysStat_Wash;
|
Debug_pushMessage("Wash mode not yet implemented\n");
|
||||||
Debug_pushMessage("Setting WashMode\n");
|
// TODO: Implementieren, sobald Verhalten klar ist
|
||||||
}
|
}
|
||||||
|
|
||||||
// Liste der Aktionen, sortiert nach Mindest-Haltezeit (ms)
|
// Liste der Aktionen, sortiert nach Mindest-Haltezeit (ms)
|
||||||
const ButtonActionEntry buttonActions[] = {
|
const ButtonActionEntry buttonActions[] = {
|
||||||
{500, LED_RAIN_COLOR, ButtonAction_ToggleMode},
|
{500, LED_RAIN_COLOR, ButtonAction_ToggleMode},
|
||||||
{3500, LED_PURGE_COLOR, ButtonAction_StartPurge},
|
{3500, LED_PURGE_COLOR, ButtonAction_StartPurge},
|
||||||
{6500, LED_WIFI_COLOR, ButtonAction_ToggleWiFi},
|
{6500, LED_WIFI_BLINK, ButtonAction_ToggleWiFi},
|
||||||
{9500, LED_WASH_COLOR, ButtonAction_WashMode}};
|
{9500, COLOR_WARM_WHITE, ButtonAction_WashMode}};
|
||||||
|
|
||||||
const uint8_t buttonActionCount = sizeof(buttonActions) / sizeof(ButtonActionEntry);
|
const uint8_t buttonActionCount = sizeof(buttonActions) / sizeof(ButtonActionEntry);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
// === buttoncontrol.cpp ===
|
// === buttoncontrol.cpp ===
|
||||||
#include "buttoncontrol.h"
|
#include "buttoncontrol.h"
|
||||||
#include "ledcontrol.h"
|
#include "ledcontrol.h" // Neue LED-Logik wird hier verwendet
|
||||||
|
|
||||||
static uint8_t btnPin;
|
static uint8_t btnPin;
|
||||||
static uint32_t pressStart = 0;
|
static uint32_t pressStart = 0;
|
||||||
|
@ -30,7 +30,6 @@ void Debug_ShowDTCs();
|
|||||||
void Debug_dumpGlobals();
|
void Debug_dumpGlobals();
|
||||||
void Debug_printHelp();
|
void Debug_printHelp();
|
||||||
void Debug_Purge();
|
void Debug_Purge();
|
||||||
void Debug_refillTank();
|
|
||||||
const char *uint32_to_binary_string(uint32_t num);
|
const char *uint32_to_binary_string(uint32_t num);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -319,8 +318,7 @@ static const std::map<String, DebugCmdHandler> &getCmdMap()
|
|||||||
int code = tokens[0].toInt();
|
int code = tokens[0].toInt();
|
||||||
MaintainDTC((DTCNum_t)code, true, millis());
|
MaintainDTC((DTCNum_t)code, true, millis());
|
||||||
}
|
}
|
||||||
}},
|
}}
|
||||||
{"tank_refill", [](const String &) { Debug_refillTank(); }},
|
|
||||||
};
|
};
|
||||||
return cmdMap;
|
return cmdMap;
|
||||||
}
|
}
|
||||||
@ -544,13 +542,6 @@ void Debug_Purge()
|
|||||||
Debug_pushMessage("Purging 10 pulses\n");
|
Debug_pushMessage("Purging 10 pulses\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Debug_refillTank()
|
|
||||||
{
|
|
||||||
PersistenceData.tankRemain_microL = LubeConfig.tankCapacity_ml * 1000;
|
|
||||||
globals.requestEEAction = EE_PDS_SAVE;
|
|
||||||
Debug_pushMessage("Setting Tank to 100%\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert a uint32_t value to a binary string with nibbles separated by a space.
|
* @brief Convert a uint32_t value to a binary string with nibbles separated by a space.
|
||||||
*
|
*
|
||||||
|
@ -94,36 +94,11 @@ void LEDControl_Update()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LED_PATTERN_BREATH:
|
case LED_PATTERN_BREATH:
|
||||||
{
|
brightness = map(now % 2000, 0, 1000, LubeConfig.LED_Min_Brightness, LubeConfig.LED_Max_Brightness);
|
||||||
uint32_t t = now % 2000;
|
if ((now % 2000) >= 1000)
|
||||||
if (t < 600)
|
brightness = LubeConfig.LED_Max_Brightness - (brightness - LubeConfig.LED_Min_Brightness);
|
||||||
{
|
|
||||||
// Schnell hochdimmen (600 ms)
|
|
||||||
brightness = map(t, 0, 600, LubeConfig.LED_Min_Brightness, LubeConfig.LED_Max_Brightness);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Langsam runterdimmen (1400 ms)
|
|
||||||
brightness = map(t, 600, 2000, LubeConfig.LED_Max_Brightness, LubeConfig.LED_Min_Brightness);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LED_PATTERN_BREATH_REVERSE:
|
|
||||||
{
|
|
||||||
uint32_t t = now % 2000;
|
|
||||||
if (t < 1400)
|
|
||||||
{
|
|
||||||
// Langsam hochdimmen (1400 ms)
|
|
||||||
brightness = map(t, 0, 1400, LubeConfig.LED_Min_Brightness, LubeConfig.LED_Max_Brightness);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Schnell runterdimmen (600 ms)
|
|
||||||
brightness = map(t, 1400, 2000, LubeConfig.LED_Max_Brightness, LubeConfig.LED_Min_Brightness);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
leds.setBrightness(brightness);
|
leds.setBrightness(brightness);
|
||||||
leds.setPixelColor(0, on ? color : 0);
|
leds.setPixelColor(0, on ? color : 0);
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lubeapp.h"
|
#include "lubeapp.h"
|
||||||
#include "ledcontrol.h"
|
|
||||||
|
|
||||||
uint32_t lubePulseTimestamp = 0;
|
uint32_t lubePulseTimestamp = 0;
|
||||||
|
|
||||||
@ -28,9 +27,6 @@ uint32_t lubePulseTimestamp = 0;
|
|||||||
*/
|
*/
|
||||||
void RunLubeApp(uint32_t add_milimeters)
|
void RunLubeApp(uint32_t add_milimeters)
|
||||||
{
|
{
|
||||||
static tSystem_Status lastSystemStatus = sysStat_Startup;
|
|
||||||
static uint16_t washModeDistance = 0;
|
|
||||||
|
|
||||||
// Calculate and update tank percentage
|
// Calculate and update tank percentage
|
||||||
globals.TankPercentage = PersistenceData.tankRemain_microL / (LubeConfig.tankCapacity_ml * 10);
|
globals.TankPercentage = PersistenceData.tankRemain_microL / (LubeConfig.tankCapacity_ml * 10);
|
||||||
|
|
||||||
@ -53,31 +49,17 @@ void RunLubeApp(uint32_t add_milimeters)
|
|||||||
switch (globals.systemStatus)
|
switch (globals.systemStatus)
|
||||||
{
|
{
|
||||||
case sysStat_Startup:
|
case sysStat_Startup:
|
||||||
|
strcpy_P(globals.systemStatustxt, PSTR("Startup"));
|
||||||
if (lastSystemStatus != globals.systemStatus)
|
|
||||||
{
|
|
||||||
strcpy_P(globals.systemStatustxt, PSTR("Startup"));
|
|
||||||
LEDControl_SetBasic(LED_STARTUP_NORMAL, LED_PATTERN_BLINK);
|
|
||||||
lastSystemStatus = globals.systemStatus;
|
|
||||||
globals.resumeStatus = sysStat_Startup;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transition to Normal status after startup delay
|
// Transition to Normal status after startup delay
|
||||||
if (millis() > STARTUP_DELAY)
|
if (millis() > STARTUP_DELAY)
|
||||||
{
|
{
|
||||||
globals.systemStatus = sysStat_Normal;
|
globals.systemStatus = sysStat_Normal;
|
||||||
|
globals.resumeStatus = sysStat_Normal;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sysStat_Normal:
|
case sysStat_Normal:
|
||||||
if (lastSystemStatus != globals.systemStatus)
|
strcpy_P(globals.systemStatustxt, PSTR("Normal"));
|
||||||
{
|
|
||||||
strcpy_P(globals.systemStatustxt, PSTR("Normal"));
|
|
||||||
LEDControl_SetBasic(LED_NORMAL_COLOR, LED_PATTERN_ON);
|
|
||||||
lastSystemStatus = globals.systemStatus;
|
|
||||||
globals.resumeStatus = sysStat_Normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trigger lube pulse if traveled distance exceeds the configured limit
|
// Trigger lube pulse if traveled distance exceeds the configured limit
|
||||||
if (PersistenceData.TravelDistance_highRes_mm / 1000 > LubeConfig.DistancePerLube_Default)
|
if (PersistenceData.TravelDistance_highRes_mm / 1000 > LubeConfig.DistancePerLube_Default)
|
||||||
{
|
{
|
||||||
@ -87,14 +69,7 @@ void RunLubeApp(uint32_t add_milimeters)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case sysStat_Rain:
|
case sysStat_Rain:
|
||||||
if (lastSystemStatus != globals.systemStatus)
|
strcpy_P(globals.systemStatustxt, PSTR("Rain"));
|
||||||
{
|
|
||||||
strcpy_P(globals.systemStatustxt, PSTR("Rain"));
|
|
||||||
LEDControl_SetBasic(LED_RAIN_COLOR, LED_PATTERN_ON);
|
|
||||||
lastSystemStatus = globals.systemStatus;
|
|
||||||
globals.resumeStatus = sysStat_Rain;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trigger lube pulse if traveled distance exceeds the configured limit in Rain mode
|
// Trigger lube pulse if traveled distance exceeds the configured limit in Rain mode
|
||||||
if (PersistenceData.TravelDistance_highRes_mm / 1000 > LubeConfig.DistancePerLube_Rain)
|
if (PersistenceData.TravelDistance_highRes_mm / 1000 > LubeConfig.DistancePerLube_Rain)
|
||||||
{
|
{
|
||||||
@ -103,41 +78,8 @@ void RunLubeApp(uint32_t add_milimeters)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sysStat_Wash:
|
|
||||||
if (lastSystemStatus != globals.systemStatus)
|
|
||||||
{
|
|
||||||
washModeDistance = LubeConfig.WashMode_Distance;
|
|
||||||
strcpy_P(globals.systemStatustxt, PSTR("Wash"));
|
|
||||||
LEDControl_SetBasic(LED_WASH_COLOR, LED_PATTERN_BREATH);
|
|
||||||
lastSystemStatus = globals.systemStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trigger lube pulse if traveled distance exceeds the configured Interval in Wash mode
|
|
||||||
if (PersistenceData.TravelDistance_highRes_mm / 1000 > LubeConfig.WashMode_Interval)
|
|
||||||
{
|
|
||||||
LubePulse();
|
|
||||||
PersistenceData.TravelDistance_highRes_mm = 0;
|
|
||||||
|
|
||||||
if (washModeDistance >= LubeConfig.WashMode_Distance)
|
|
||||||
{
|
|
||||||
washModeDistance = washModeDistance - LubeConfig.WashMode_Interval;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
globals.systemStatus = globals.resumeStatus;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case sysStat_Purge:
|
case sysStat_Purge:
|
||||||
if (lastSystemStatus != globals.systemStatus)
|
strcpy_P(globals.systemStatustxt, PSTR("Purge"));
|
||||||
{
|
|
||||||
globals.purgePulses = LubeConfig.BleedingPulses;
|
|
||||||
strcpy_P(globals.systemStatustxt, PSTR("Purge"));
|
|
||||||
LEDControl_SetBasic(LED_PURGE_COLOR, LED_PATTERN_BLINK);
|
|
||||||
lastSystemStatus = globals.systemStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Execute lube pulses during the Purge status
|
// Execute lube pulses during the Purge status
|
||||||
if (globals.purgePulses > 0)
|
if (globals.purgePulses > 0)
|
||||||
{
|
{
|
||||||
@ -157,26 +99,12 @@ void RunLubeApp(uint32_t add_milimeters)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case sysStat_Error:
|
case sysStat_Error:
|
||||||
|
strcpy_P(globals.systemStatustxt, PSTR("Error"));
|
||||||
if (lastSystemStatus != globals.systemStatus)
|
|
||||||
{
|
|
||||||
strcpy_P(globals.systemStatustxt, PSTR("Error"));
|
|
||||||
LEDControl_SetBasic(LED_ERROR_COLOR, LED_PATTERN_BLINK_FAST);
|
|
||||||
lastSystemStatus = globals.systemStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
globals.purgePulses = 0;
|
globals.purgePulses = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sysStat_Shutdown:
|
case sysStat_Shutdown:
|
||||||
|
strcpy_P(globals.systemStatustxt, PSTR("Shutdown"));
|
||||||
if (lastSystemStatus != globals.systemStatus)
|
|
||||||
{
|
|
||||||
strcpy_P(globals.systemStatustxt, PSTR("Shutdown"));
|
|
||||||
LEDControl_SetBasic(LED_SHUTDOWN_COLOR, LED_PATTERN_BREATH_REVERSE);
|
|
||||||
lastSystemStatus = globals.systemStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -411,8 +411,6 @@ void Display_Process()
|
|||||||
*/
|
*/
|
||||||
void toggleWiFiAP(bool shutdown)
|
void toggleWiFiAP(bool shutdown)
|
||||||
{
|
{
|
||||||
LEDControl_SetOverride(LED_WIFI_COLOR, LED_PATTERN_BLINK_FAST, 2500);
|
|
||||||
|
|
||||||
// Check if WiFi is currently active
|
// Check if WiFi is currently active
|
||||||
if (WiFi.getMode() != WIFI_OFF)
|
if (WiFi.getMode() != WIFI_OFF)
|
||||||
{
|
{
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
*
|
*
|
||||||
* @brief Implementation file for converting structs to JSON objects.
|
* @brief Implementation file for converting structs to JSON objects.
|
||||||
*
|
*
|
||||||
* @note This file is auto-generated by a script on 2025-06-15 11:37:51.
|
* @note This file is auto-generated by a script on 2024-01-30 20:29:34.
|
||||||
*
|
*
|
||||||
* @author Marcel Peterkau
|
* @author Marcel Peterkau
|
||||||
* @date 15.06.2025
|
* @date 30.01.2024
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -26,8 +26,6 @@ void generateJsonObject_LubeConfig(JsonObject data)
|
|||||||
data["RimDiameter_Inch"] = LubeConfig.RimDiameter_Inch;
|
data["RimDiameter_Inch"] = LubeConfig.RimDiameter_Inch;
|
||||||
data["DistancePerRevolution_mm"] = LubeConfig.DistancePerRevolution_mm;
|
data["DistancePerRevolution_mm"] = LubeConfig.DistancePerRevolution_mm;
|
||||||
data["BleedingPulses"] = LubeConfig.BleedingPulses;
|
data["BleedingPulses"] = LubeConfig.BleedingPulses;
|
||||||
data["WashMode_Distance"] = LubeConfig.WashMode_Distance;
|
|
||||||
data["WashMode_Interval"] = LubeConfig.WashMode_Interval;
|
|
||||||
data["SpeedSource"] = LubeConfig.SpeedSource;
|
data["SpeedSource"] = LubeConfig.SpeedSource;
|
||||||
data["GPSBaudRate"] = LubeConfig.GPSBaudRate;
|
data["GPSBaudRate"] = LubeConfig.GPSBaudRate;
|
||||||
data["CANSource"] = LubeConfig.CANSource;
|
data["CANSource"] = LubeConfig.CANSource;
|
||||||
@ -54,4 +52,4 @@ void generateJsonObject_PersistenceData(JsonObject data)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// CODEGENERATOR_CHECKSUM: 4702cb49ea55617cbb34715164810bb58d3c3f46fb1653b6f47bd4fd9cb0031e
|
// CODEGENERATOR_CHECKSUM: 59f35aadffd0bbef253210ea2fbaaf9a515553a2e3cc9bf4cfa2819b63c969ce
|
@ -480,6 +480,7 @@ void Websocket_HandleButtons(uint8_t *data)
|
|||||||
else if (strcmp(identifier, "purgenow") == 0)
|
else if (strcmp(identifier, "purgenow") == 0)
|
||||||
{
|
{
|
||||||
globals.systemStatus = sysStat_Purge;
|
globals.systemStatus = sysStat_Purge;
|
||||||
|
globals.purgePulses = LubeConfig.BleedingPulses;
|
||||||
}
|
}
|
||||||
else if (strcmp(identifier, "sourcesave") == 0)
|
else if (strcmp(identifier, "sourcesave") == 0)
|
||||||
{
|
{
|
||||||
@ -498,7 +499,6 @@ void Websocket_HandleButtons(uint8_t *data)
|
|||||||
else if (strcmp(identifier, "resettank") == 0)
|
else if (strcmp(identifier, "resettank") == 0)
|
||||||
{
|
{
|
||||||
PersistenceData.tankRemain_microL = LubeConfig.tankCapacity_ml * 1000;
|
PersistenceData.tankRemain_microL = LubeConfig.tankCapacity_ml * 1000;
|
||||||
globals.requestEEAction = EE_PDS_SAVE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -580,14 +580,6 @@ void Websocket_HandleSettings(uint8_t *data)
|
|||||||
{
|
{
|
||||||
strncpy(LubeConfig.wifi_client_password, value, sizeof(LubeConfig.wifi_client_password));
|
strncpy(LubeConfig.wifi_client_password, value, sizeof(LubeConfig.wifi_client_password));
|
||||||
}
|
}
|
||||||
else if (strcmp(identifier, "washinterval") == 0)
|
|
||||||
{
|
|
||||||
LubeConfig.WashMode_Interval = atoi(value);
|
|
||||||
}
|
|
||||||
else if (strcmp(identifier, "washdistance") == 0)
|
|
||||||
{
|
|
||||||
LubeConfig.WashMode_Distance = atoi(value);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug_pushMessage("Got unknown Settings-id and value '%s' from ws-client\n", identifier);
|
Debug_pushMessage("Got unknown Settings-id and value '%s' from ws-client\n", identifier);
|
||||||
@ -708,8 +700,6 @@ void Websocket_RefreshClientData_Static(uint32_t client_id, bool send_mapping)
|
|||||||
const char mapping[] = "MAPPING_STATIC:"
|
const char mapping[] = "MAPPING_STATIC:"
|
||||||
"lubedistancenormal;"
|
"lubedistancenormal;"
|
||||||
"lubedistancerain;"
|
"lubedistancerain;"
|
||||||
"washdistance;"
|
|
||||||
"washinterval;"
|
|
||||||
"tankcap;"
|
"tankcap;"
|
||||||
"pumppulse;"
|
"pumppulse;"
|
||||||
"tankwarn;"
|
"tankwarn;"
|
||||||
@ -740,8 +730,6 @@ void Websocket_RefreshClientData_Static(uint32_t client_id, bool send_mapping)
|
|||||||
|
|
||||||
temp.concat(String(LubeConfig.DistancePerLube_Default) + ";");
|
temp.concat(String(LubeConfig.DistancePerLube_Default) + ";");
|
||||||
temp.concat(String(LubeConfig.DistancePerLube_Rain) + ";");
|
temp.concat(String(LubeConfig.DistancePerLube_Rain) + ";");
|
||||||
temp.concat(String(LubeConfig.WashMode_Distance) + ";");
|
|
||||||
temp.concat(String(LubeConfig.WashMode_Interval) + ";");
|
|
||||||
temp.concat(String(LubeConfig.tankCapacity_ml) + ";");
|
temp.concat(String(LubeConfig.tankCapacity_ml) + ";");
|
||||||
temp.concat(String(LubeConfig.amountPerDose_microL) + ";");
|
temp.concat(String(LubeConfig.amountPerDose_microL) + ";");
|
||||||
temp.concat(String(LubeConfig.TankRemindAtPercentage) + ";");
|
temp.concat(String(LubeConfig.TankRemindAtPercentage) + ";");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user