BLE RX: Making auto channel timer independent of packet events. (#1608)

This commit is contained in:
Netro 2023-11-28 12:18:15 -05:00 committed by GitHub
parent 175e5e2e8c
commit a6ed6e3099
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 27 deletions

View file

@ -195,6 +195,7 @@ class BLERxView : public View {
bool saveFile(const std::filesystem::path& path);
void on_data(BlePacketData* packetData);
void on_filter_change(std::string value);
void on_timer();
void handle_entries_sort(uint8_t index);
void updateEntry(const BlePacketData* packet, BleRecentEntry& entry, ADV_PDU_TYPE pdu_type);
@ -212,6 +213,9 @@ class BLERxView : public View {
uint8_t channel_number = 37;
bool auto_channel = false;
int16_t timer_count{0};
int16_t timer_period{6}; // 100ms
std::string filterBuffer{};
std::string filter{};
std::string listFileBuffer{};
@ -313,6 +317,12 @@ class BLERxView : public View {
const auto message = static_cast<const BLEPacketMessage*>(p);
this->on_data(message->packet);
}};
MessageHandlerRegistration message_handler_frame_sync{
Message::ID::DisplayFrameSync,
[this](const Message* const) {
this->on_timer();
}};
};
} /* namespace ui */