mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-05-04 11:20:49 +00: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 "utility.hpp"
|
||||||
|
|
||||||
|
#include "string_format.hpp"
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
CaptureAppView::CaptureAppView(NavigationView& nav) {
|
CaptureAppView::CaptureAppView(NavigationView& nav) {
|
||||||
@ -40,6 +42,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
|
|||||||
&field_lna,
|
&field_lna,
|
||||||
&field_vga,
|
&field_vga,
|
||||||
&text_record_filename,
|
&text_record_filename,
|
||||||
|
&text_record_dropped,
|
||||||
&waterfall,
|
&waterfall,
|
||||||
} });
|
} });
|
||||||
|
|
||||||
@ -114,6 +117,7 @@ void CaptureAppView::on_record() {
|
|||||||
} else {
|
} else {
|
||||||
const auto filename = next_filename_matching_pattern("BBD_????.C16");
|
const auto filename = next_filename_matching_pattern("BBD_????.C16");
|
||||||
text_record_filename.set(filename);
|
text_record_filename.set(filename);
|
||||||
|
text_record_dropped.set("");
|
||||||
if( filename.empty() ) {
|
if( filename.empty() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -125,6 +129,9 @@ void CaptureAppView::on_record() {
|
|||||||
|
|
||||||
void CaptureAppView::on_tick_second() {
|
void CaptureAppView::on_tick_second() {
|
||||||
if( capture_thread ) {
|
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 {
|
RSSI rssi {
|
||||||
{ 21 * 8, 0, 6 * 8, 4 },
|
{ 21 * 8, 0, 6 * 8, 4 },
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user