From 63d0622c3895757beac5e6b2cdb8d4f657bffae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20W=C3=B3jcik?= Date: Tue, 7 Jan 2025 16:39:44 +0100 Subject: [PATCH] Remove commented code --- esphome/components/diesel_heater_ble/state.h | 55 -------------------- 1 file changed, 55 deletions(-) diff --git a/esphome/components/diesel_heater_ble/state.h b/esphome/components/diesel_heater_ble/state.h index 2f269b7930..9680d246ac 100644 --- a/esphome/components/diesel_heater_ble/state.h +++ b/esphome/components/diesel_heater_ble/state.h @@ -98,58 +98,3 @@ class HeaterState { } // namespace diesel_heater_ble } // namespace esphome - -// // Represents the current system state -// class HeaterState { -// public: -// // Decoded fields from the response -// uint16_t deviceStatusFlags; // Device status flags (on/off, error states) -// uint16_t tempSetpoint; // Temperature setpoint -// uint16_t currentTemperature; // Current temperature -// uint16_t altitude; // Altitude in meters or feet -// uint8_t batteryVoltage; // Battery voltage (scaled) -// uint8_t fuelLevel; // Remaining fuel level -// uint8_t operatingMode; // Current operating mode -// uint8_t errorCode; // Error code -// uint32_t runtimeCounter; // Total runtime (in minutes or seconds) -// uint8_t additionalStatus[10]; // Placeholder for additional statuses - -// // Decode raw response into meaningful fields - -// static std::vector decode(const std::vector &raw) { -// if (raw.size() != 48 || raw[0] != 0xAA || raw[1] != 0x55) { -// throw std::invalid_argument("Invalid packet format"); -// } - -// std::vector decoded; -// decoded.push_back(raw[3] | (raw[4] << 8)); -// decoded.push_back(raw[5] | (raw[6] << 8)); -// decoded.push_back(raw[7] | (raw[8] << 8)); -// decoded.push_back(raw[9] | (raw[10] << 8)); -// decoded.push_back(raw[11]); -// decoded.push_back(raw[12]); -// decoded.push_back(raw[13]); -// decoded.push_back(raw[14]); -// decoded.push_back(raw[15] | (raw[16] << 8) | (raw[17] << 16) | (raw[18] << 24)); -// std::memcpy(&decoded[9], &raw[19], 10); -// return decoded; -// } -// static HeaterState decompose(const std::vector &raw) { -// if (raw.size() != 48 || raw[0] != 0xAA || raw[1] != 0x55) { -// throw std::invalid_argument("Invalid packet format"); -// } - -// HeaterState state; -// state.deviceStatusFlags = raw[3] | (raw[4] << 8); -// state.tempSetpoint = raw[5] | (raw[6] << 8); -// state.currentTemperature = raw[7] | (raw[8] << 8); -// state.altitude = raw[9] | (raw[10] << 8); -// state.batteryVoltage = raw[11]; -// state.fuelLevel = raw[12]; -// state.operatingMode = raw[13]; -// state.errorCode = raw[14]; -// state.runtimeCounter = raw[15] | (raw[16] << 8) | (raw[17] << 16) | (raw[18] << 24); -// std::memcpy(state.additionalStatus, &raw[19], 10); -// return state; -// } -// };