diff --git a/firmware/application/main.cpp b/firmware/application/main.cpp index a3bbf576f..24c7f2930 100755 --- a/firmware/application/main.cpp +++ b/firmware/application/main.cpp @@ -23,30 +23,30 @@ // Color bitmaps generated with: // Gimp image > indexed colors (16), then "xxd -i *.bmp" -//BUG: Xylos doesn't play last tone ? -//BUG (fixed ?): Unistroke text entry screen doesn't care about string max length parameter //TEST: Imperial in whipcalc //TEST: Numbers //TEST: Jammer //TEST: Frequency manager + save/load +//BUG: Xylos doesn't play last tone ? +//TODO: Morse coder for foxhunts +//TODO: Finish EPAR tx +//TODO: Test dual tone in proc_tones and remove proc_dtmf_tx +//TODO: IQ replay +//TODO: Waveform widget ? +//TODO: Wav visualizer + //BUG: POCSAG RX sometimes misses the first codeword after SYNC //BUG: Check AFSK transmit end, skips last bits ? //BUG: RDS doesn't stop baseband when stopping tx ? //TODO: File browser ? //TODO: Mousejack ? -//TODO: Waveform widget ? -//TODO: Wav visualizer //TODO: Move frequencykeypad from ui_receiver to ui_widget (used everywhere) //TODO: ADS-B draw trajectory + GPS coordinates + scale, and playback -//TODO: Finish EPAR tx //TODO: Analog TV tx with camcorder font character generator -//TODO: Test dual tone in proc_tones and remove proc_dtmf_tx -//TODO: Morse coder for foxhunts //TODO: Make Morse coder and Whistle use proc_tones //TODO: RDS multiple groups (sequence) -//TODO: IQ replay //TODO: Use ModalMessageView confirmation for TX ? //TODO: Show address/data bit fields in OOK TX //TODO: Scan for OOK TX diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index 0a22892ee..b15862055 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -393,6 +393,8 @@ SystemView::SystemView( this->status_view.set_title(new_view.title()); }; + // portapack::persistent_memory::set_playdead_sequence(0x8D1); + // Initial view if ((portapack::persistent_memory::playing_dead() == 0x5920C1DF) || // Enable code (portapack::persistent_memory::ui_config() & 16)) { // Login option @@ -459,7 +461,7 @@ PlayDeadView::PlayDeadView(NavigationView& nav) { text_playdead3.hidden(true); button_seq_entry.on_dir = [this](Button&, KeyEvent key){ - sequence = (sequence << 3) | static_cast::type>(key); + sequence = (sequence << 3) | (static_cast::type>(key) + 1); return true; }; diff --git a/firmware/application/ui_setup.cpp b/firmware/application/ui_setup.cpp index 7dd469718..fa9640d18 100644 --- a/firmware/application/ui_setup.cpp +++ b/firmware/application/ui_setup.cpp @@ -22,6 +22,7 @@ #include "ui_setup.hpp" +#include "ui_navigation.hpp" #include "ui_touch_calibration.hpp" #include "portapack_persistent_memory.hpp" @@ -193,8 +194,12 @@ SetPlayDeadView::SetPlayDeadView(NavigationView& nav) { button_cancel.hidden(true); set_dirty(); } else { - persistent_memory::set_playdead_sequence(sequence); - nav.pop(); + if (sequence == 0x8D1) // U D L R + nav.display_modal("Warning", "Default sequence entered !", ABORT, nullptr); + else { + persistent_memory::set_playdead_sequence(sequence); + nav.pop(); + } } }; @@ -210,7 +215,7 @@ SetPlayDeadView::SetPlayDeadView(NavigationView& nav) { else if (key_code == 3) sequence_txt[keycount] = 'U'; text_sequence.set(sequence_txt); - sequence = (sequence << 3) | key_code; + sequence = (sequence << 3) | (key_code + 1); keycount++; return true; } diff --git a/firmware/common/portapack_persistent_memory.cpp b/firmware/common/portapack_persistent_memory.cpp index 09a60ecce..c5acebbad 100644 --- a/firmware/common/portapack_persistent_memory.cpp +++ b/firmware/common/portapack_persistent_memory.cpp @@ -72,6 +72,7 @@ struct data_t { uint32_t afsk_config; // Play dead unlock + uint32_t playdead_magic; uint32_t playing_dead; uint32_t playdead_sequence; @@ -168,20 +169,29 @@ void set_afsk_config(const uint32_t new_value) { data->afsk_config = new_value; } +static constexpr uint32_t playdead_magic = 0x88d3bb57; + uint32_t playing_dead() { return data->playing_dead; } void set_playing_dead(const uint32_t new_value) { + if( data->playdead_magic != playdead_magic ) { + set_playdead_sequence(0x8D1); // U D L R + } data->playing_dead = new_value; } uint32_t playdead_sequence() { + if( data->playdead_magic != playdead_magic ) { + set_playdead_sequence(0x8D1); // U D L R + } return data->playdead_sequence; } void set_playdead_sequence(const uint32_t new_value) { data->playdead_sequence = new_value; + data->playdead_magic = playdead_magic; } bool stealth_mode() { diff --git a/firmware/portapack-h1-havoc.bin b/firmware/portapack-h1-havoc.bin index 99d125f8f..865fa5d78 100644 Binary files a/firmware/portapack-h1-havoc.bin and b/firmware/portapack-h1-havoc.bin differ