15 namespace lightwaverf {
26 void setup()
override;
29 void send_rx(
const std::vector<uint8_t> &msg, uint8_t repeats,
bool inverted,
int u_sec);
44 TEMPLATABLE_VALUE(
int, repeat);
45 TEMPLATABLE_VALUE(
int, inverted);
46 TEMPLATABLE_VALUE(
int, pulse_length);
47 TEMPLATABLE_VALUE(std::vector<uint8_t>, code);
52 void set_data(
const std::vector<uint8_t> &data) { code_ = data; }
55 int repeats = this->repeat_.value(
x...);
56 int inverted = this->inverted_.value(
x...);
57 int pulse_length = this->pulse_length_.value(
x...);
58 std::vector<uint8_t> msg = this->code_.value(
x...);
60 this->parent_->send_rx(msg, repeats, inverted, pulse_length);
InternalGPIOPin * pin_tx_
This class simplifies creating components that periodically check a state.
void set_data(const std::vector< uint8_t > &data)
void send_rx(const std::vector< uint8_t > &msg, uint8_t repeats, bool inverted, int u_sec)
InternalGPIOPin * pin_rx_
void set_repeats(const int &data)
void print_msg_(uint8_t *msg, uint8_t len)
void set_inverted(const int &data)
SendRawAction(LightWaveRF *parent)
Implementation of SPI Controller mode.
void dump_config() override
void set_pulse_length(const int &data)
void set_pin(InternalGPIOPin *pin_tx, InternalGPIOPin *pin_rx)