mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-03 10:00:12 -05:00
Rename capture UI record objects and functions.
This commit is contained in:
parent
f2453dd639
commit
b8196ee2be
@ -32,7 +32,7 @@ namespace ui {
|
|||||||
|
|
||||||
CaptureAppView::CaptureAppView(NavigationView& nav) {
|
CaptureAppView::CaptureAppView(NavigationView& nav) {
|
||||||
add_children({ {
|
add_children({ {
|
||||||
&button_start_stop,
|
&button_record,
|
||||||
&rssi,
|
&rssi,
|
||||||
&channel,
|
&channel,
|
||||||
&field_frequency,
|
&field_frequency,
|
||||||
@ -66,8 +66,8 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
|
|||||||
this->on_vga_changed(v_db);
|
this->on_vga_changed(v_db);
|
||||||
};
|
};
|
||||||
|
|
||||||
button_start_stop.on_select = [this](ImageButton&) {
|
button_record.on_select = [this](ImageButton&) {
|
||||||
this->on_start_stop();
|
this->on_record();
|
||||||
};
|
};
|
||||||
|
|
||||||
receiver_model.set_baseband_configuration({
|
receiver_model.set_baseband_configuration({
|
||||||
@ -98,13 +98,13 @@ void CaptureAppView::set_parent_rect(const Rect new_parent_rect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CaptureAppView::focus() {
|
void CaptureAppView::focus() {
|
||||||
button_start_stop.focus();
|
button_record.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CaptureAppView::on_start_stop() {
|
void CaptureAppView::on_record() {
|
||||||
if( capture_thread ) {
|
if( capture_thread ) {
|
||||||
capture_thread.reset();
|
capture_thread.reset();
|
||||||
button_start_stop.set_bitmap(&bitmap_record);
|
button_record.set_bitmap(&bitmap_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);
|
||||||
@ -113,7 +113,7 @@ void CaptureAppView::on_start_stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
capture_thread = std::make_unique<AudioThread>(filename);
|
capture_thread = std::make_unique<AudioThread>(filename);
|
||||||
button_start_stop.set_bitmap(&bitmap_stop);
|
button_record.set_bitmap(&bitmap_stop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,13 +57,13 @@ private:
|
|||||||
|
|
||||||
std::unique_ptr<AudioThread> capture_thread;
|
std::unique_ptr<AudioThread> capture_thread;
|
||||||
|
|
||||||
void on_start_stop();
|
void on_record();
|
||||||
|
|
||||||
void on_tuning_frequency_changed(rf::Frequency f);
|
void on_tuning_frequency_changed(rf::Frequency f);
|
||||||
void on_lna_changed(int32_t v_db);
|
void on_lna_changed(int32_t v_db);
|
||||||
void on_vga_changed(int32_t v_db);
|
void on_vga_changed(int32_t v_db);
|
||||||
|
|
||||||
ImageButton button_start_stop {
|
ImageButton button_record {
|
||||||
{ 0 * 8, 2 * 16, 2 * 8, 1 * 16 },
|
{ 0 * 8, 2 * 16, 2 * 8, 1 * 16 },
|
||||||
&bitmap_record,
|
&bitmap_record,
|
||||||
Color::red(),
|
Color::red(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user