mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 15:08:10 +01:00
Fix compile issues on windows (#3491)
This commit is contained in:
parent
dda1ddcb26
commit
d9d2edeb08
2 changed files with 2 additions and 3 deletions
|
@ -41,7 +41,6 @@
|
|||
* O FF FF FF FF FF FF FF FF - Not used
|
||||
* M 6C - CRC over bytes 2 to F (Addition)
|
||||
\*********************************************************************************************/
|
||||
#include <cmath>
|
||||
#include "sonoff_d1.h"
|
||||
|
||||
namespace esphome {
|
||||
|
@ -263,7 +262,7 @@ void SonoffD1Output::write_state(light::LightState *state) {
|
|||
state->current_values_as_brightness(&brightness);
|
||||
|
||||
// Convert ESPHome's brightness (0-1) to the device's internal brightness (0-100)
|
||||
const uint8_t calculated_brightness = std::round(brightness * 100);
|
||||
const uint8_t calculated_brightness = (uint8_t) roundf(brightness * 100);
|
||||
|
||||
if (calculated_brightness == 0) {
|
||||
// if(binary) ESP_LOGD(TAG, "current_values_as_binary() returns true for zero brightness");
|
||||
|
|
|
@ -20,7 +20,7 @@ void TuyaTextSensor::setup() {
|
|||
break;
|
||||
}
|
||||
default:
|
||||
ESP_LOGW(TAG, "Unsupported data type for tuya text sensor %u: %#02hhX", datapoint.id, datapoint.type);
|
||||
ESP_LOGW(TAG, "Unsupported data type for tuya text sensor %u: %#02hhX", datapoint.id, (uint8_t) datapoint.type);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue