Expose current state
This commit is contained in:
@@ -63,6 +63,7 @@ void DMX512Output::set_channel(uint16_t channel) {
|
||||
}
|
||||
|
||||
void DMX512Output::write_state(float state) {
|
||||
this->state = state;
|
||||
uint16_t value = state * 0xffff;
|
||||
if(this->universe_)
|
||||
this->universe_->write_channel(this->channel_, (value >> 8));
|
||||
|
||||
@@ -75,6 +75,7 @@ public:
|
||||
void set_universe(DMX512 *universe) { this->universe_ = universe; }
|
||||
void set_channel(uint16_t channel);
|
||||
void write_state(float state) override;
|
||||
float state;
|
||||
|
||||
protected:
|
||||
uint16_t channel_{0};
|
||||
|
||||
Reference in New Issue
Block a user