Discovery with theengs decoder (#1106)

* Discovery with theengs decoder

* Add devices to doc

* Correct missing suffix for DT24
This commit is contained in:
Florian authored and GitHub committed 2021-12-11 11:54:08 -06:00
1 parent 7c5538be65
commit 7dc49165a0
8 files changed
+119 -424

No files matched your search

+4 -4
View File
@@ -206,8 +206,8 @@ void MQTTtoPWM(char* topicOri, JsonObject& jsonData) {
JsonVariant value = jsonData[channelJsonKeys[i]];
if (!value.isNull()) {
float targetValue = value.as<float>();
targetValue = min(targetValue, 1.f);
targetValue = max(targetValue, 0.f);
targetValue = std::min(targetValue, 1.f);
targetValue = std::max(targetValue, 0.f);
targetValues[i] = targetValue;
// Initially configure as an instantaneous change....
@@ -239,8 +239,8 @@ void MQTTtoPWM(char* topicOri, JsonObject& jsonData) {
if (!value.isNull()) {
float gamma = value.as<float>();
// Sanity check
gamma = min(gamma, 4.f);
gamma = max(gamma, 0.5f);
gamma = std::min(gamma, 4.f);
gamma = std::max(gamma, 0.5f);
calibrationGamma[i] = gamma;
}
snprintf(key, sizeof(key), "min-%s", channelJsonKeys[i]);