more clang

This commit is contained in:
Guido Schreuder 2024-02-21 08:35:47 +01:00
parent 6f0184832c
commit 35c6d00044
2 changed files with 5 additions and 12 deletions

View file

@ -16,18 +16,12 @@ void EbusSensorBase::dump_config() {
ESP_LOGCONFIG(TAG, " command: 0x%04x", this->command_);
};
void EbusSensorBase::set_send_poll(bool send_poll) { this->send_poll_ = send_poll; }
void EbusSensorBase::set_command(uint16_t command) { this->command_ = command; }
void EbusSensorBase::set_payload(const std::vector<uint8_t> &payload) { this->payload_ = payload; }
void EbusSensorBase::set_response_read_position(uint8_t response_position) { this->response_position_ = response_position; }
optional<SendCommand> EbusSensorBase::prepare_command() {
optional<SendCommand> command;
if (this->send_poll_) {
command = SendCommand( //
this->primary_address_, this->address_, this->command_,
this->payload_.size(), &this->payload_[0]);
this->primary_address_, this->address_, this->command_, this->payload_.size(), &this->payload_[0]);
}
return command;
}

View file

@ -10,11 +10,10 @@ class EbusSensorBase : public EbusReceiver, public EbusSender, public Component
public:
void dump_config() override;
void set_send_poll(bool /*send_poll*/);
void set_command(uint16_t /*command*/);
void set_payload(const std::vector<uint8_t> & /*payload*/);
void set_response_read_position(uint8_t /*response_position*/);
void set_send_poll(bool send_poll) { this->send_poll_ = send_poll; }
void set_command(uint16_t command) { this->command_ = command; }
void set_payload(const std::vector<uint8_t> &payload) { this->payload_ = payload; }
void set_response_read_position(uint8_t response_position) { this->response_position_ = response_position; }
optional<SendCommand> prepare_command() override;