mirror of
https://github.com/esphome/esphome.git
synced 2024-12-24 14:34:54 +01:00
more clang
This commit is contained in:
parent
6f0184832c
commit
35c6d00044
2 changed files with 5 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue