Apply clang-tidy style (for ESP32 Arduino 2/4) to Madoka component

This commit is contained in:
Petapton 2024-01-04 14:41:53 +00:00
parent fce6626b15
commit 1f450214c5
2 changed files with 3 additions and 4 deletions

View File

@ -364,9 +364,8 @@ void Madoka::parse_cb_(message msg) {
uint8_t argument_id = msg[i++];
uint8_t len = msg[i++];
if (this->cur_status_.mode == 1) {
} else if (argument_id == 0x21 && len == 1 && this->cur_status_.mode == 4) {
fan_mode = msg[i];
} else if (argument_id == 0x20 && len == 1) {
} else if ((argument_id == 0x21 && len == 1 && this->cur_status_.mode == 4) ||
(argument_id == 0x20 && len == 1 && this->cur_status_.mode != 4)) {
fan_mode = msg[i];
}
i += len;

View File

@ -22,7 +22,7 @@ static const uint8_t BLE_SEND_MAX_RETRIES = 5;
namespace esphome {
namespace madoka {
static const char *TAG = "madoka";
static const char *const TAG = "madoka";
using chunk = std::vector<uint8_t>;
using message = std::vector<uint8_t>;