mirror of
https://github.com/wled/WLED.git
synced 2025-07-09 03:46:35 +00:00
Fixes to feature update for Internal Temperature usermod
- Updated all doubles to floating-point literals by adding explicit `f` suffix - Removed all remaining html from readme markdown documentation.
This commit is contained in:
parent
9877e899e0
commit
a1dfdced31
@ -4,26 +4,27 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- 🌡️ Adds the internal temperature readout of the chip to the `Info` tab
|
- 🌡️ Adds the internal temperature readout of the chip to the `Info` tab
|
||||||
- 🥵 High temperature indicator/action. (Configurable threshold and preset)
|
- 🥵 High temperature indicator/action. (Configurable threshold and preset)
|
||||||
- 📣 Publishes the internal temperature over the MQTT topic: `mcutemp`
|
- 📣 Publishes the internal temperature over the MQTT topic: `mcutemp`
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## Use Examples
|
## Use Examples
|
||||||
- Warn of excessive/damaging temperatures by the triggering of a 'warning' preset
|
- Warn of excessive/damaging temperatures by the triggering of a 'warning' preset
|
||||||
- Activate a cooling fan (when used with the multi-relay usermod)
|
- Activate a cooling fan (when used with the multi-relay usermod)
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
- A shown temp of 53,33°C might indicate that the internal temp is not supported
|
- A shown temp of 53,33°C might indicate that the internal temp is not supported
|
||||||
- ESP8266 does not have a internal temp sensor -> Disabled (Indicated with a readout of '-1')
|
- ESP8266 does not have a internal temp sensor -> Disabled (Indicated with a readout of '-1')
|
||||||
- ESP32S2 seems to crash on reading the sensor -> Disabled (Indicated with a readout of '-1')
|
- ESP32S2 seems to crash on reading the sensor -> Disabled (Indicated with a readout of '-1')
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
- Add a build flag `-D USERMOD_INTERNAL_TEMPERATURE` to your `platformio.ini` (or `platformio_override.ini`).
|
- Add a build flag `-D USERMOD_INTERNAL_TEMPERATURE` to your `platformio.ini` (or `platformio_override.ini`).
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## 📝 Change Log
|
## 📝 Change Log
|
||||||
|
|
||||||
@ -35,7 +36,7 @@
|
|||||||
2023-09-01
|
2023-09-01
|
||||||
|
|
||||||
* "Internal Temperature" usermod created
|
* "Internal Temperature" usermod created
|
||||||
<br><br>
|
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
- Soeren Willrodt [@lost-hope](https://github.com/lost-hope)
|
- Soeren Willrodt [@lost-hope](https://github.com/lost-hope)
|
||||||
|
@ -10,10 +10,10 @@ private:
|
|||||||
unsigned long loopInterval = 10000;
|
unsigned long loopInterval = 10000;
|
||||||
unsigned long lastTime = 0;
|
unsigned long lastTime = 0;
|
||||||
bool isEnabled = false;
|
bool isEnabled = false;
|
||||||
float temperature = 0;
|
float temperature = 0.0f;
|
||||||
int presetToActivate = 0; // Preset to activate when temp goes above threshold (0 = disabled)
|
uint8_t presetToActivate = 0; // Preset to activate when temp goes above threshold (0 = disabled)
|
||||||
float activationThreshold = 95.0f; // Temperature threshold to trigger high-temperature actions
|
float activationThreshold = 95.0f; // Temperature threshold to trigger high-temperature actions
|
||||||
float resetMargin = 2.0; // Margin below the activation threshold (Prevents frequent toggling when close to threshold)
|
float resetMargin = 2.0f; // Margin below the activation threshold (Prevents frequent toggling when close to threshold)
|
||||||
bool isAboveThreshold = false; // Flag to track if the high temperature preset is currently active
|
bool isAboveThreshold = false; // Flag to track if the high temperature preset is currently active
|
||||||
|
|
||||||
static const char _name[];
|
static const char _name[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user