mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-21 15:10:51 +00:00
Added PWM RSSI output for NBFM and WFM
This commit is contained in:
@@ -46,11 +46,13 @@ public:
|
||||
}
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
|
||||
private:
|
||||
int32_t min_;
|
||||
int32_t avg_;
|
||||
int32_t max_;
|
||||
|
||||
bool pwmrssi_enabled = false;
|
||||
|
||||
MessageHandlerRegistration message_handler_stats {
|
||||
Message::ID::RSSIStatistics,
|
||||
@@ -58,8 +60,17 @@ private:
|
||||
this->on_statistics_update(static_cast<const RSSIStatisticsMessage*>(p)->statistics);
|
||||
}
|
||||
};
|
||||
|
||||
MessageHandlerRegistration message_handler_pwmrssi {
|
||||
Message::ID::PWMRSSIConfigure,
|
||||
[this](const Message* const p) {
|
||||
const auto message = *reinterpret_cast<const PWMRSSIConfigureMessage*>(p);
|
||||
this->set_pwmrssi(message.enabled);
|
||||
}
|
||||
};
|
||||
|
||||
void on_statistics_update(const RSSIStatistics& statistics);
|
||||
void set_pwmrssi(bool enabled);
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user