feat: Adjust control command output mapping range
This commit is contained in:
parent
2978b12af6
commit
c0931edc6c
|
@ -14,7 +14,7 @@ ESP8266WebServer server(80);
|
|||
String deviceName;
|
||||
String topic;
|
||||
#define QOS_2 2
|
||||
#define OUTPUT_PIN 4
|
||||
#define OUTPUT_PIN D1
|
||||
|
||||
void (* resetFunc) (void) = 0;
|
||||
|
||||
|
@ -182,8 +182,8 @@ void onMqttMessage(int messageSize) {
|
|||
}
|
||||
|
||||
void processControlCommand(int64_t num) {
|
||||
// Map the input value (0-100) to the output range (70-140)
|
||||
long mappedValue = map(num, 0, 100, 70, 140);
|
||||
// Map the input value (0-100) to the output range (60-140)
|
||||
long mappedValue = map(num, 0, 100, 60, 140);
|
||||
|
||||
Serial.print("[MEGA] Received power: ");
|
||||
Serial.print(num);
|
||||
|
|
Loading…
Reference in New Issue
Block a user