mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-25 07:19:28 -05:00
Display percent of data dropped during capture to SD card.
This commit is contained in:
parent
6ee886b90e
commit
be9f3362da
@ -29,6 +29,8 @@ using namespace portapack;
|
||||
|
||||
#include "utility.hpp"
|
||||
|
||||
#include "string_format.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
CaptureAppView::CaptureAppView(NavigationView& nav) {
|
||||
@ -40,6 +42,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
|
||||
&field_lna,
|
||||
&field_vga,
|
||||
&text_record_filename,
|
||||
&text_record_dropped,
|
||||
&waterfall,
|
||||
} });
|
||||
|
||||
@ -114,6 +117,7 @@ void CaptureAppView::on_record() {
|
||||
} else {
|
||||
const auto filename = next_filename_matching_pattern("BBD_????.C16");
|
||||
text_record_filename.set(filename);
|
||||
text_record_dropped.set("");
|
||||
if( filename.empty() ) {
|
||||
return;
|
||||
}
|
||||
@ -125,6 +129,9 @@ void CaptureAppView::on_record() {
|
||||
|
||||
void CaptureAppView::on_tick_second() {
|
||||
if( capture_thread ) {
|
||||
const auto dropped_percent = std::min(99U, capture_thread->state().dropped_percent());
|
||||
const auto s = to_string_dec_uint(dropped_percent, 2, ' ') + "\%";
|
||||
text_record_dropped.set(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,11 @@ private:
|
||||
"",
|
||||
};
|
||||
|
||||
Text text_record_dropped {
|
||||
{ 16 * 8, 2 * 16, 3 * 8, 16 },
|
||||
"",
|
||||
};
|
||||
|
||||
RSSI rssi {
|
||||
{ 21 * 8, 0, 6 * 8, 4 },
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user