Enable addidtional distance and SNR uart outputs

This commit is contained in:
Robin Thoni 2024-06-24 08:32:20 +00:00 committed by GitHub
parent 1d26bbb986
commit faa52b9cc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,7 @@ class DfrobotSen0395SettingsAction : public Action<Ts...>, public Parented<Dfrob
int8_t val = this->presence_via_uart_.value(x...); int8_t val = this->presence_via_uart_.value(x...);
if (val >= 0) { if (val >= 0) {
this->parent_->enqueue(make_unique<UartOutputCommand>(val)); this->parent_->enqueue(make_unique<UartOutputCommand>(val));
this->parent_->enqueue(make_unique<UartOutputCommand>(2, val));
} }
} }
if (this->sensitivity_.has_value()) { if (this->sensitivity_.has_value()) {

View File

@ -25,6 +25,7 @@ void Sen0395UartPresenceSwitch::write_state(bool state) {
this->parent_->enqueue(make_unique<PowerCommand>(false)); this->parent_->enqueue(make_unique<PowerCommand>(false));
} }
this->parent_->enqueue(make_unique<UartOutputCommand>(state)); this->parent_->enqueue(make_unique<UartOutputCommand>(state));
this->parent_->enqueue(make_unique<UartOutputCommand>(2, state));
this->parent_->enqueue(make_unique<SaveCfgCommand>()); this->parent_->enqueue(make_unique<SaveCfgCommand>());
if (was_active) { if (was_active) {
this->parent_->enqueue(make_unique<PowerCommand>(true)); this->parent_->enqueue(make_unique<PowerCommand>(true));