Ble tx improvements (#1546)

This commit is contained in:
Netro 2023-11-01 18:24:55 -04:00 committed by GitHub
parent dceb7255b0
commit b5c244a09b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 67 additions and 24 deletions

View file

@ -187,14 +187,14 @@ void BLETxView::start() {
// Send first or single packet.
progressbar.set_max(packet_count);
button_play.set_bitmap(&bitmap_stop);
baseband::set_btletx(channel_number, macAddress, advertisementData);
baseband::set_btletx(channel_number, macAddress, advertisementData, pduType);
transmitter_model.enable();
is_running = true;
}
} else {
// Send next packet.
baseband::set_btletx(channel_number, macAddress, advertisementData);
baseband::set_btletx(channel_number, macAddress, advertisementData, pduType);
}
if ((packet_counter % 10) == 0) {
@ -246,6 +246,7 @@ BLETxView::BLETxView(NavigationView& nav)
&label_speed,
&options_speed,
&options_channel,
&options_adv_type,
&label_packets_sent,
&text_packets_sent,
&label_mac_address,
@ -268,6 +269,10 @@ BLETxView::BLETxView(NavigationView& nav)
timer_period = i;
};
options_adv_type.on_change = [this](size_t, int32_t i) {
pduType = (PKT_TYPE)i;
};
options_speed.set_selected_index(0);
button_open.on_select = [this, &nav](Button&) {