Discovery with theengs decoder (#1106)
* Discovery with theengs decoder * Add devices to doc * Correct missing suffix for DT24
This commit is contained in:
1 parent
7c5538be65
commit
7dc49165a0
8 files changed
+119
-424
No files matched your search
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user