We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da81f34 commit b454578Copy full SHA for b454578
examples/Fan/Fan.ino
@@ -59,8 +59,6 @@ bool onRangeValue(const String &deviceId, int &rangeValue) {
59
// Fan rangeValueDelta is from -3..+3
60
bool onAdjustRangeValue(const String &deviceId, int rangeValueDelta) {
61
device_state.fanSpeed += rangeValueDelta;
62
- if (device_state.fanSpeed < 1) device_state.fanSpeed = 1;
63
- if (device_state.fanSpeed > 3) device_state.fanSpeed = 3;
64
Serial.printf("Fan speed changed about %i to %d\r\n", rangeValueDelta, device_state.fanSpeed);
65
66
rangeValueDelta = device_state.fanSpeed; // return absolute fan speed
0 commit comments