diff --git a/firmware/application/apps/ui_fileman.cpp b/firmware/application/apps/ui_fileman.cpp index 836c87188..25bcbba4b 100644 --- a/firmware/application/apps/ui_fileman.cpp +++ b/firmware/application/apps/ui_fileman.cpp @@ -566,7 +566,7 @@ void FileManagerView::on_rename(std::string_view hint) { cursor_pos = pos; text_prompt( - nav_, name_buffer, cursor_pos, max_filename_length,0, + nav_, name_buffer, cursor_pos, max_filename_length, 0, [this](std::string& renamed) { auto renamed_path = fs::path{renamed}; rename_file(get_selected_full_path(), current_path / renamed_path); @@ -640,7 +640,7 @@ void FileManagerView::on_clean() { void FileManagerView::on_new_dir() { name_buffer = ""; - text_prompt(nav_, name_buffer, max_filename_length,0, [this](std::string& dir_name) { + text_prompt(nav_, name_buffer, max_filename_length, 0, [this](std::string& dir_name) { make_new_directory(current_path / dir_name); reload_current(true); }); @@ -671,7 +671,7 @@ void FileManagerView::on_paste() { void FileManagerView::on_new_file() { name_buffer = ""; - text_prompt(nav_, name_buffer, max_filename_length,0, [this](std::string& file_name) { + text_prompt(nav_, name_buffer, max_filename_length, 0, [this](std::string& file_name) { make_new_file(current_path / file_name); reload_current(true); }); diff --git a/firmware/application/apps/ui_freqman.cpp b/firmware/application/apps/ui_freqman.cpp index 46528a255..3f0c23f3f 100644 --- a/firmware/application/apps/ui_freqman.cpp +++ b/firmware/application/apps/ui_freqman.cpp @@ -240,7 +240,7 @@ void FrequencyManagerView::on_edit_freq() { void FrequencyManagerView::on_edit_desc() { temp_buffer_ = current_entry().description; - text_prompt(nav_, temp_buffer_, freqman_max_desc_size,0, [this](std::string& new_desc) { + text_prompt(nav_, temp_buffer_, freqman_max_desc_size, 0, [this](std::string& new_desc) { auto entry = current_entry(); entry.description = std::move(new_desc); db_.replace_entry(current_index(), entry); @@ -250,7 +250,7 @@ void FrequencyManagerView::on_edit_desc() { void FrequencyManagerView::on_add_category() { temp_buffer_.clear(); - text_prompt(nav_, temp_buffer_, 20,0, [this](std::string& new_name) { + text_prompt(nav_, temp_buffer_, 20, 0, [this](std::string& new_name) { if (!new_name.empty()) { create_freqman_file(new_name); refresh_categories(); diff --git a/firmware/application/apps/ui_pocsag_tx.cpp b/firmware/application/apps/ui_pocsag_tx.cpp index b911565cf..3f0dfb218 100644 --- a/firmware/application/apps/ui_pocsag_tx.cpp +++ b/firmware/application/apps/ui_pocsag_tx.cpp @@ -153,7 +153,7 @@ void POCSAGTXView::paint(Painter&) { } void POCSAGTXView::on_set_text(NavigationView& nav) { - text_prompt(nav, buffer, MAX_POCSAG_LENGTH,0); + text_prompt(nav, buffer, MAX_POCSAG_LENGTH, 0); } POCSAGTXView::POCSAGTXView( diff --git a/firmware/application/apps/ui_recon_settings.cpp b/firmware/application/apps/ui_recon_settings.cpp index be2f0b875..55e947b72 100644 --- a/firmware/application/apps/ui_recon_settings.cpp +++ b/firmware/application/apps/ui_recon_settings.cpp @@ -82,7 +82,7 @@ ReconSetupViewMain::ReconSetupViewMain(NavigationView& nav, Rect parent_rect, st }; button_choose_output_name.on_select = [this, &nav](Button&) { - text_prompt(nav, _output_file, 28, 0,[this](std::string& buffer) { + text_prompt(nav, _output_file, 28, 0, [this](std::string& buffer) { _output_file = buffer; button_choose_output_name.set_text(_output_file); }); diff --git a/firmware/application/binder.hpp b/firmware/application/binder.hpp index 94ade2982..170c054cf 100644 --- a/firmware/application/binder.hpp +++ b/firmware/application/binder.hpp @@ -105,7 +105,7 @@ void bind(TextField& field, T& value, NavigationView& nav, Fn fn = Fn{}) { // Capture a new string and make the lambda mutable so it can be modified. field.on_select = [&nav, buf = std::string{}](TextField& tf) mutable { buf = tf.get_text(); - text_prompt(nav, buf, /*max_length*/ 255,0, + text_prompt(nav, buf, /*max_length*/ 255, 0, [&tf](std::string& str) { tf.set_text(str); }); diff --git a/firmware/application/external/metronome/ui_metronome.cpp b/firmware/application/external/metronome/ui_metronome.cpp index e3efdb319..fc314405c 100644 --- a/firmware/application/external/metronome/ui_metronome.cpp +++ b/firmware/application/external/metronome/ui_metronome.cpp @@ -212,7 +212,7 @@ MetronomeTapTempoView::MetronomeTapTempoView(NavigationView& nav, uint16_t bpm) nav_, input_buffer, 3, - 1, + 1, /*enter number*/ [this](std::string& buffer) { if (buffer.empty()) { return; diff --git a/firmware/application/external/morse_tx/ui_morse.cpp b/firmware/application/external/morse_tx/ui_morse.cpp index d68760bfb..aaa114485 100644 --- a/firmware/application/external/morse_tx/ui_morse.cpp +++ b/firmware/application/external/morse_tx/ui_morse.cpp @@ -99,7 +99,7 @@ static msg_t loopthread_fn(void* arg) { } void MorseView::on_set_text(NavigationView& nav) { - text_prompt(nav, buffer, 28,0); + text_prompt(nav, buffer, 28, 0); } void MorseView::focus() { diff --git a/firmware/application/external/ook_editor/ui_ook_editor.cpp b/firmware/application/external/ook_editor/ui_ook_editor.cpp index 559926410..370c16aa6 100644 --- a/firmware/application/external/ook_editor/ui_ook_editor.cpp +++ b/firmware/application/external/ook_editor/ui_ook_editor.cpp @@ -264,7 +264,7 @@ OOKEditorAppView::OOKEditorAppView(NavigationView& nav) nav, ook_data.payload, 100, - 1, + 1, /* enter number */ [this](std::string& s) { text_payload.set(s); draw_waveform(); diff --git a/firmware/application/external/ookbrute/ui_ookbrute.cpp b/firmware/application/external/ookbrute/ui_ookbrute.cpp index ddde62a4c..2c5e8826f 100644 --- a/firmware/application/external/ookbrute/ui_ookbrute.cpp +++ b/firmware/application/external/ookbrute/ui_ookbrute.cpp @@ -83,7 +83,7 @@ OOKBruteView::OOKBruteView(NavigationView& nav) nav_, text_input_buffer, 8, // currently longest is princeton - 1, /*enter number*/ + 1, /*enter number*/ [this](std::string& buffer) { field_start.set_value(atoi(buffer.c_str())); validate_start_stop(); @@ -101,7 +101,7 @@ OOKBruteView::OOKBruteView(NavigationView& nav) nav_, text_input_buffer, 8, // currently longest is princeton - 0,/*enter number*/ + 0, /*enter number*/ [this](std::string& buffer) { field_stop.set_value(atoi(buffer.c_str())); validate_start_stop(); diff --git a/firmware/application/external/remote/ui_remote.cpp b/firmware/application/external/remote/ui_remote.cpp index e7d64a0d9..53ed60524 100644 --- a/firmware/application/external/remote/ui_remote.cpp +++ b/firmware/application/external/remote/ui_remote.cpp @@ -330,7 +330,7 @@ RemoteAppView::RemoteAppView( field_title.on_select = [this, &nav](TextField&) { temp_buffer_ = model_.name; - text_prompt(nav_, temp_buffer_, text_edit_max, 0,[this](std::string& new_name) { + text_prompt(nav_, temp_buffer_, text_edit_max, 0, [this](std::string& new_name) { model_.name = new_name; refresh_ui(); set_needs_save(); @@ -339,7 +339,7 @@ RemoteAppView::RemoteAppView( field_filename.on_select = [this, &nav](TextField&) { temp_buffer_ = remote_path_.stem().string(); - text_prompt(nav_, temp_buffer_, text_edit_max,0, [this](std::string& new_name) { + text_prompt(nav_, temp_buffer_, text_edit_max, 0, [this](std::string& new_name) { rename_remote(new_name); refresh_ui(); }); diff --git a/firmware/application/external/spainter/ui_spectrum_painter_text.cpp b/firmware/application/external/spainter/ui_spectrum_painter_text.cpp index e3b0222d4..c514c3510 100644 --- a/firmware/application/external/spainter/ui_spectrum_painter_text.cpp +++ b/firmware/application/external/spainter/ui_spectrum_painter_text.cpp @@ -56,7 +56,7 @@ SpectrumInputTextView::~SpectrumInputTextView() { } void SpectrumInputTextView::on_set_text(NavigationView& nav) { - text_prompt(nav, buffer, 300,0); + text_prompt(nav, buffer, 300, 0); } void SpectrumInputTextView::focus() { diff --git a/firmware/application/ui/ui_alphanum.hpp b/firmware/application/ui/ui_alphanum.hpp index aece75612..654ed57e1 100644 --- a/firmware/application/ui/ui_alphanum.hpp +++ b/firmware/application/ui/ui_alphanum.hpp @@ -37,7 +37,7 @@ namespace ui { class AlphanumView : public TextEntryView { public: - AlphanumView(NavigationView& nav, std::string& str, size_t max_length,uint8_t enter_mode); + AlphanumView(NavigationView& nav, std::string& str, size_t max_length, uint8_t enter_mode); AlphanumView(const AlphanumView&) = delete; AlphanumView(AlphanumView&&) = delete; diff --git a/firmware/application/ui/ui_textentry.cpp b/firmware/application/ui/ui_textentry.cpp index 36a85d59f..aab0a01e2 100644 --- a/firmware/application/ui/ui_textentry.cpp +++ b/firmware/application/ui/ui_textentry.cpp @@ -33,7 +33,7 @@ void text_prompt( size_t max_length, uint8_t mode, std::function on_done) { - text_prompt(nav, str, str.length(), max_length, mode,on_done); + text_prompt(nav, str, str.length(), max_length, mode, on_done); } void text_prompt( @@ -43,7 +43,7 @@ void text_prompt( size_t max_length, uint8_t mode, std::function on_done) { - auto te_view = nav.push(str, max_length,mode); + auto te_view = nav.push(str, max_length, mode); te_view->set_cursor(cursor_pos); te_view->on_changed = [on_done](std::string& value) { if (on_done) diff --git a/firmware/application/ui/ui_textentry.hpp b/firmware/application/ui/ui_textentry.hpp index 5870aef13..e01378560 100644 --- a/firmware/application/ui/ui_textentry.hpp +++ b/firmware/application/ui/ui_textentry.hpp @@ -70,7 +70,7 @@ void text_prompt( std::string& str, uint32_t cursor_pos, size_t max_length, - uint8_t mode, // enter mode: 123 abc etc + uint8_t mode, // enter mode: 123 abc etc std::function on_done = nullptr); } /* namespace ui */