Rename capture UI record objects and functions.

This commit is contained in:
Jared Boone 2016-04-22 12:08:01 -07:00
parent f2453dd639
commit b8196ee2be
2 changed files with 9 additions and 9 deletions

View File

@ -32,7 +32,7 @@ namespace ui {
CaptureAppView::CaptureAppView(NavigationView& nav) {
add_children({ {
&button_start_stop,
&button_record,
&rssi,
&channel,
&field_frequency,
@ -66,8 +66,8 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
this->on_vga_changed(v_db);
};
button_start_stop.on_select = [this](ImageButton&) {
this->on_start_stop();
button_record.on_select = [this](ImageButton&) {
this->on_record();
};
receiver_model.set_baseband_configuration({
@ -98,13 +98,13 @@ void CaptureAppView::set_parent_rect(const Rect new_parent_rect) {
}
void CaptureAppView::focus() {
button_start_stop.focus();
button_record.focus();
}
void CaptureAppView::on_start_stop() {
void CaptureAppView::on_record() {
if( capture_thread ) {
capture_thread.reset();
button_start_stop.set_bitmap(&bitmap_record);
button_record.set_bitmap(&bitmap_record);
} else {
const auto filename = next_filename_matching_pattern("BBD_????.C16");
text_record_filename.set(filename);
@ -113,7 +113,7 @@ void CaptureAppView::on_start_stop() {
}
capture_thread = std::make_unique<AudioThread>(filename);
button_start_stop.set_bitmap(&bitmap_stop);
button_record.set_bitmap(&bitmap_stop);
}
}

View File

@ -57,13 +57,13 @@ private:
std::unique_ptr<AudioThread> capture_thread;
void on_start_stop();
void on_record();
void on_tuning_frequency_changed(rf::Frequency f);
void on_lna_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 },
&bitmap_record,
Color::red(),