diff --git a/esp32/lib/ESP32-sveltekit/MotionService.h b/esp32/lib/ESP32-sveltekit/MotionService.h index 2746319..4b908a2 100644 --- a/esp32/lib/ESP32-sveltekit/MotionService.h +++ b/esp32/lib/ESP32-sveltekit/MotionService.h @@ -97,7 +97,7 @@ class MotionService ESP_LOGV("MotionService", "Mode %d", root["data"].as()); motionState = (MOTION_STATE)root["data"].as(); char output[2]; - sprintf(output, "%d", motionState); + sprintf(output, "%d", (int)motionState); _socket->emit(MODE_EVENT, output, String(originId).c_str()); } @@ -147,7 +147,7 @@ class MotionService } void loop() { - if (auto currentMillis = millis(); !_lastUpdate || (currentMillis - _lastUpdate) >= MotionInterval) { + if (int currentMillis = millis(); !_lastUpdate || (currentMillis - _lastUpdate) >= MotionInterval) { _lastUpdate = currentMillis; if (updateMotion()) syncAngles(); }