From 3193c6ee99ca229cbfda374989c1fc6c4673385d Mon Sep 17 00:00:00 2001 From: furrtek Date: Sun, 7 Jan 2018 23:13:08 +0000 Subject: [PATCH] Added bias-T status icon Merged radio settings in one screen --- firmware/application/CMakeLists.txt | 287 +++++++++--------- firmware/application/{ => apps}/ais_app.cpp | 0 firmware/application/{ => apps}/ais_app.hpp | 0 .../{ => apps}/analog_audio_app.cpp | 0 .../{ => apps}/analog_audio_app.hpp | 0 .../application/{ => apps}/capture_app.cpp | 0 .../application/{ => apps}/capture_app.hpp | 0 firmware/application/{ => apps}/ert_app.cpp | 0 firmware/application/{ => apps}/ert_app.hpp | 0 .../application/{ => apps}/pocsag_app.cpp | 0 .../application/{ => apps}/pocsag_app.hpp | 0 .../application/{ => apps}/replay_app.cpp | 0 .../application/{ => apps}/replay_app.hpp | 0 .../{ => apps}/spectrum_analysis_app.cpp | 0 .../{ => apps}/spectrum_analysis_app.hpp | 0 firmware/application/{ => apps}/tpms_app.cpp | 0 firmware/application/{ => apps}/tpms_app.hpp | 0 firmware/application/{ => apps}/ui_about.cpp | 0 firmware/application/{ => apps}/ui_about.hpp | 0 .../application/{ => apps}/ui_about_demo.cpp | 0 .../application/{ => apps}/ui_about_demo.hpp | 0 .../application/{ => apps}/ui_adsb_rx.cpp | 0 .../application/{ => apps}/ui_adsb_rx.hpp | 0 .../application/{ => apps}/ui_adsb_tx.cpp | 0 .../application/{ => apps}/ui_adsb_tx.hpp | 0 .../application/{ => apps}/ui_afsk_rx.cpp | 0 .../application/{ => apps}/ui_afsk_rx.hpp | 0 .../application/{ => apps}/ui_aprs_tx.cpp | 0 .../application/{ => apps}/ui_aprs_tx.hpp | 0 firmware/application/{ => apps}/ui_bht_tx.cpp | 0 firmware/application/{ => apps}/ui_bht_tx.hpp | 0 .../application/{ => apps}/ui_coasterp.cpp | 0 .../application/{ => apps}/ui_coasterp.hpp | 0 firmware/application/{ => apps}/ui_debug.cpp | 0 firmware/application/{ => apps}/ui_debug.hpp | 0 .../application/{ => apps}/ui_encoders.cpp | 0 .../application/{ => apps}/ui_encoders.hpp | 0 .../application/{ => apps}/ui_fileman.cpp | 0 .../application/{ => apps}/ui_fileman.hpp | 0 .../application/{ => apps}/ui_freqman.cpp | 0 .../application/{ => apps}/ui_freqman.hpp | 0 firmware/application/{ => apps}/ui_jammer.cpp | 0 firmware/application/{ => apps}/ui_jammer.hpp | 0 firmware/application/{ => apps}/ui_keyfob.cpp | 0 firmware/application/{ => apps}/ui_keyfob.hpp | 0 firmware/application/{ => apps}/ui_lcr.cpp | 0 firmware/application/{ => apps}/ui_lcr.hpp | 0 firmware/application/{ => apps}/ui_mictx.cpp | 0 firmware/application/{ => apps}/ui_mictx.hpp | 0 .../application/{ => apps}/ui_modemsetup.cpp | 0 .../application/{ => apps}/ui_modemsetup.hpp | 0 firmware/application/{ => apps}/ui_morse.cpp | 0 firmware/application/{ => apps}/ui_morse.hpp | 0 .../application/{ => apps}/ui_numbers.cpp | 0 .../application/{ => apps}/ui_numbers.hpp | 0 .../application/{ => apps}/ui_nuoptix.cpp | 0 .../application/{ => apps}/ui_nuoptix.hpp | 0 .../application/{ => apps}/ui_pocsag_tx.cpp | 0 .../application/{ => apps}/ui_pocsag_tx.hpp | 0 firmware/application/{ => apps}/ui_rds.cpp | 0 firmware/application/{ => apps}/ui_rds.hpp | 0 .../application/{ => apps}/ui_scanner.cpp | 0 .../application/{ => apps}/ui_scanner.hpp | 0 firmware/application/{ => apps}/ui_script.cpp | 0 firmware/application/{ => apps}/ui_script.hpp | 0 .../application/{ => apps}/ui_sd_wipe.cpp | 0 .../application/{ => apps}/ui_sd_wipe.hpp | 0 firmware/application/{ => apps}/ui_setup.cpp | 79 ++--- firmware/application/{ => apps}/ui_setup.hpp | 111 +++---- firmware/application/{ => apps}/ui_sigfrx.cpp | 0 firmware/application/{ => apps}/ui_sigfrx.hpp | 0 firmware/application/{ => apps}/ui_siggen.cpp | 0 firmware/application/{ => apps}/ui_siggen.hpp | 0 firmware/application/{ => apps}/ui_sonde.cpp | 0 firmware/application/{ => apps}/ui_sonde.hpp | 0 .../application/{ => apps}/ui_soundboard.cpp | 0 .../application/{ => apps}/ui_soundboard.hpp | 0 firmware/application/{ => apps}/ui_sstvtx.cpp | 0 firmware/application/{ => apps}/ui_sstvtx.hpp | 0 firmware/application/{ => apps}/ui_test.cpp | 0 firmware/application/{ => apps}/ui_test.hpp | 0 .../{ => apps}/ui_touch_calibration.cpp | 0 .../{ => apps}/ui_touch_calibration.hpp | 2 + .../application/{ => apps}/ui_touchtunes.cpp | 0 .../application/{ => apps}/ui_touchtunes.hpp | 0 .../application/{ => apps}/ui_view_wav.cpp | 0 .../application/{ => apps}/ui_view_wav.hpp | 0 .../application/{ => apps}/ui_whipcalc.cpp | 0 .../application/{ => apps}/ui_whipcalc.hpp | 0 firmware/application/bitmap.hpp | 166 +++------- firmware/application/freqman.hpp | 4 +- firmware/application/{ => hw}/debounce.cpp | 0 firmware/application/{ => hw}/debounce.hpp | 0 firmware/application/{ => hw}/encoder.cpp | 0 firmware/application/{ => hw}/encoder.hpp | 0 firmware/application/{ => hw}/max2837.cpp | 0 firmware/application/{ => hw}/max2837.hpp | 0 firmware/application/{ => hw}/max5864.cpp | 0 firmware/application/{ => hw}/max5864.hpp | 0 firmware/application/{ => hw}/rffc507x.cpp | 0 firmware/application/{ => hw}/rffc507x.hpp | 0 .../application/{ => hw}/rffc507x_spi.cpp | 0 .../application/{ => hw}/rffc507x_spi.hpp | 0 firmware/application/{ => hw}/si5351.cpp | 0 firmware/application/{ => hw}/si5351.hpp | 0 firmware/application/{ => hw}/spi_arbiter.hpp | 0 firmware/application/{ => hw}/spi_pp.cpp | 0 firmware/application/{ => hw}/spi_pp.hpp | 0 firmware/application/{ => hw}/touch_adc.cpp | 0 firmware/application/{ => hw}/touch_adc.hpp | 0 firmware/application/io_wave.hpp | 2 +- firmware/application/main.cpp.orig | 168 ++++++++++ .../application/{ => protocols}/modems.cpp | 0 .../application/{ => protocols}/modems.hpp | 0 firmware/application/radio.cpp | 3 + firmware/application/{ => ui}/ui_alphanum.cpp | 0 firmware/application/{ => ui}/ui_alphanum.hpp | 0 firmware/application/{ => ui}/ui_audio.cpp | 0 firmware/application/{ => ui}/ui_audio.hpp | 0 firmware/application/{ => ui}/ui_channel.cpp | 0 firmware/application/{ => ui}/ui_channel.hpp | 0 .../{ => ui}/ui_font_fixed_8x16.cpp | 0 .../{ => ui}/ui_font_fixed_8x16.hpp | 0 firmware/application/{ => ui}/ui_geomap.cpp | 0 firmware/application/{ => ui}/ui_geomap.hpp | 0 firmware/application/{ => ui}/ui_menu.cpp | 0 firmware/application/{ => ui}/ui_menu.hpp | 0 firmware/application/{ => ui}/ui_receiver.cpp | 0 firmware/application/{ => ui}/ui_receiver.hpp | 0 firmware/application/{ => ui}/ui_rssi.cpp | 0 firmware/application/{ => ui}/ui_rssi.hpp | 0 firmware/application/{ => ui}/ui_spectrum.cpp | 0 firmware/application/{ => ui}/ui_spectrum.hpp | 0 firmware/application/{ => ui}/ui_tabview.cpp | 0 firmware/application/{ => ui}/ui_tabview.hpp | 0 .../application/{ => ui}/ui_textentry.cpp | 0 .../application/{ => ui}/ui_textentry.hpp | 0 .../application/{ => ui}/ui_transmitter.cpp | 0 .../application/{ => ui}/ui_transmitter.hpp | 0 firmware/application/ui_audiotx.cpp | 223 -------------- firmware/application/ui_audiotx.hpp | 187 ------------ firmware/application/ui_navigation.cpp | 19 +- firmware/application/ui_navigation.hpp | 30 +- firmware/common/message.hpp | 9 + ...on_audiotx.png => icon_audiotx.png_unused} | Bin firmware/graphics/icon_biast_off.png | Bin 0 -> 121 bytes firmware/graphics/icon_biast_on.png | Bin 0 -> 138 bytes ..._keyboard.png => icon_keyboard.png_unused} | Bin ...icon_nordic.png => icon_nordic.png_unused} | Bin ...on_numbers.png => icon_numbers.png_unused} | Bin ...nistroke.png => icon_unistroke.png_unused} | Bin ...on_whistle.png => icon_whistle.png_unused} | Bin 152 files changed, 487 insertions(+), 803 deletions(-) rename firmware/application/{ => apps}/ais_app.cpp (100%) rename firmware/application/{ => apps}/ais_app.hpp (100%) rename firmware/application/{ => apps}/analog_audio_app.cpp (100%) rename firmware/application/{ => apps}/analog_audio_app.hpp (100%) rename firmware/application/{ => apps}/capture_app.cpp (100%) rename firmware/application/{ => apps}/capture_app.hpp (100%) rename firmware/application/{ => apps}/ert_app.cpp (100%) rename firmware/application/{ => apps}/ert_app.hpp (100%) rename firmware/application/{ => apps}/pocsag_app.cpp (100%) rename firmware/application/{ => apps}/pocsag_app.hpp (100%) rename firmware/application/{ => apps}/replay_app.cpp (100%) rename firmware/application/{ => apps}/replay_app.hpp (100%) rename firmware/application/{ => apps}/spectrum_analysis_app.cpp (100%) rename firmware/application/{ => apps}/spectrum_analysis_app.hpp (100%) rename firmware/application/{ => apps}/tpms_app.cpp (100%) rename firmware/application/{ => apps}/tpms_app.hpp (100%) rename firmware/application/{ => apps}/ui_about.cpp (100%) rename firmware/application/{ => apps}/ui_about.hpp (100%) rename firmware/application/{ => apps}/ui_about_demo.cpp (100%) rename firmware/application/{ => apps}/ui_about_demo.hpp (100%) rename firmware/application/{ => apps}/ui_adsb_rx.cpp (100%) rename firmware/application/{ => apps}/ui_adsb_rx.hpp (100%) rename firmware/application/{ => apps}/ui_adsb_tx.cpp (100%) rename firmware/application/{ => apps}/ui_adsb_tx.hpp (100%) rename firmware/application/{ => apps}/ui_afsk_rx.cpp (100%) rename firmware/application/{ => apps}/ui_afsk_rx.hpp (100%) rename firmware/application/{ => apps}/ui_aprs_tx.cpp (100%) rename firmware/application/{ => apps}/ui_aprs_tx.hpp (100%) rename firmware/application/{ => apps}/ui_bht_tx.cpp (100%) rename firmware/application/{ => apps}/ui_bht_tx.hpp (100%) rename firmware/application/{ => apps}/ui_coasterp.cpp (100%) rename firmware/application/{ => apps}/ui_coasterp.hpp (100%) rename firmware/application/{ => apps}/ui_debug.cpp (100%) rename firmware/application/{ => apps}/ui_debug.hpp (100%) rename firmware/application/{ => apps}/ui_encoders.cpp (100%) rename firmware/application/{ => apps}/ui_encoders.hpp (100%) rename firmware/application/{ => apps}/ui_fileman.cpp (100%) rename firmware/application/{ => apps}/ui_fileman.hpp (100%) rename firmware/application/{ => apps}/ui_freqman.cpp (100%) rename firmware/application/{ => apps}/ui_freqman.hpp (100%) rename firmware/application/{ => apps}/ui_jammer.cpp (100%) rename firmware/application/{ => apps}/ui_jammer.hpp (100%) rename firmware/application/{ => apps}/ui_keyfob.cpp (100%) rename firmware/application/{ => apps}/ui_keyfob.hpp (100%) rename firmware/application/{ => apps}/ui_lcr.cpp (100%) rename firmware/application/{ => apps}/ui_lcr.hpp (100%) rename firmware/application/{ => apps}/ui_mictx.cpp (100%) rename firmware/application/{ => apps}/ui_mictx.hpp (100%) rename firmware/application/{ => apps}/ui_modemsetup.cpp (100%) rename firmware/application/{ => apps}/ui_modemsetup.hpp (100%) rename firmware/application/{ => apps}/ui_morse.cpp (100%) rename firmware/application/{ => apps}/ui_morse.hpp (100%) rename firmware/application/{ => apps}/ui_numbers.cpp (100%) rename firmware/application/{ => apps}/ui_numbers.hpp (100%) rename firmware/application/{ => apps}/ui_nuoptix.cpp (100%) rename firmware/application/{ => apps}/ui_nuoptix.hpp (100%) rename firmware/application/{ => apps}/ui_pocsag_tx.cpp (100%) rename firmware/application/{ => apps}/ui_pocsag_tx.hpp (100%) rename firmware/application/{ => apps}/ui_rds.cpp (100%) rename firmware/application/{ => apps}/ui_rds.hpp (100%) rename firmware/application/{ => apps}/ui_scanner.cpp (100%) rename firmware/application/{ => apps}/ui_scanner.hpp (100%) rename firmware/application/{ => apps}/ui_script.cpp (100%) rename firmware/application/{ => apps}/ui_script.hpp (100%) rename firmware/application/{ => apps}/ui_sd_wipe.cpp (100%) rename firmware/application/{ => apps}/ui_sd_wipe.hpp (100%) rename firmware/application/{ => apps}/ui_setup.cpp (88%) rename firmware/application/{ => apps}/ui_setup.hpp (88%) rename firmware/application/{ => apps}/ui_sigfrx.cpp (100%) rename firmware/application/{ => apps}/ui_sigfrx.hpp (100%) rename firmware/application/{ => apps}/ui_siggen.cpp (100%) rename firmware/application/{ => apps}/ui_siggen.hpp (100%) rename firmware/application/{ => apps}/ui_sonde.cpp (100%) rename firmware/application/{ => apps}/ui_sonde.hpp (100%) rename firmware/application/{ => apps}/ui_soundboard.cpp (100%) rename firmware/application/{ => apps}/ui_soundboard.hpp (100%) rename firmware/application/{ => apps}/ui_sstvtx.cpp (100%) rename firmware/application/{ => apps}/ui_sstvtx.hpp (100%) rename firmware/application/{ => apps}/ui_test.cpp (100%) rename firmware/application/{ => apps}/ui_test.hpp (100%) rename firmware/application/{ => apps}/ui_touch_calibration.cpp (100%) rename firmware/application/{ => apps}/ui_touch_calibration.hpp (97%) rename firmware/application/{ => apps}/ui_touchtunes.cpp (100%) rename firmware/application/{ => apps}/ui_touchtunes.hpp (100%) rename firmware/application/{ => apps}/ui_view_wav.cpp (100%) rename firmware/application/{ => apps}/ui_view_wav.hpp (100%) rename firmware/application/{ => apps}/ui_whipcalc.cpp (100%) rename firmware/application/{ => apps}/ui_whipcalc.hpp (100%) rename firmware/application/{ => hw}/debounce.cpp (100%) rename firmware/application/{ => hw}/debounce.hpp (100%) rename firmware/application/{ => hw}/encoder.cpp (100%) rename firmware/application/{ => hw}/encoder.hpp (100%) rename firmware/application/{ => hw}/max2837.cpp (100%) rename firmware/application/{ => hw}/max2837.hpp (100%) rename firmware/application/{ => hw}/max5864.cpp (100%) rename firmware/application/{ => hw}/max5864.hpp (100%) rename firmware/application/{ => hw}/rffc507x.cpp (100%) rename firmware/application/{ => hw}/rffc507x.hpp (100%) rename firmware/application/{ => hw}/rffc507x_spi.cpp (100%) rename firmware/application/{ => hw}/rffc507x_spi.hpp (100%) rename firmware/application/{ => hw}/si5351.cpp (100%) rename firmware/application/{ => hw}/si5351.hpp (100%) rename firmware/application/{ => hw}/spi_arbiter.hpp (100%) rename firmware/application/{ => hw}/spi_pp.cpp (100%) rename firmware/application/{ => hw}/spi_pp.hpp (100%) rename firmware/application/{ => hw}/touch_adc.cpp (100%) rename firmware/application/{ => hw}/touch_adc.hpp (100%) create mode 100755 firmware/application/main.cpp.orig rename firmware/application/{ => protocols}/modems.cpp (100%) rename firmware/application/{ => protocols}/modems.hpp (100%) rename firmware/application/{ => ui}/ui_alphanum.cpp (100%) rename firmware/application/{ => ui}/ui_alphanum.hpp (100%) rename firmware/application/{ => ui}/ui_audio.cpp (100%) rename firmware/application/{ => ui}/ui_audio.hpp (100%) rename firmware/application/{ => ui}/ui_channel.cpp (100%) rename firmware/application/{ => ui}/ui_channel.hpp (100%) rename firmware/application/{ => ui}/ui_font_fixed_8x16.cpp (100%) rename firmware/application/{ => ui}/ui_font_fixed_8x16.hpp (100%) rename firmware/application/{ => ui}/ui_geomap.cpp (100%) rename firmware/application/{ => ui}/ui_geomap.hpp (100%) rename firmware/application/{ => ui}/ui_menu.cpp (100%) rename firmware/application/{ => ui}/ui_menu.hpp (100%) rename firmware/application/{ => ui}/ui_receiver.cpp (100%) rename firmware/application/{ => ui}/ui_receiver.hpp (100%) rename firmware/application/{ => ui}/ui_rssi.cpp (100%) rename firmware/application/{ => ui}/ui_rssi.hpp (100%) rename firmware/application/{ => ui}/ui_spectrum.cpp (100%) rename firmware/application/{ => ui}/ui_spectrum.hpp (100%) rename firmware/application/{ => ui}/ui_tabview.cpp (100%) rename firmware/application/{ => ui}/ui_tabview.hpp (100%) rename firmware/application/{ => ui}/ui_textentry.cpp (100%) rename firmware/application/{ => ui}/ui_textentry.hpp (100%) rename firmware/application/{ => ui}/ui_transmitter.cpp (100%) rename firmware/application/{ => ui}/ui_transmitter.hpp (100%) delete mode 100644 firmware/application/ui_audiotx.cpp delete mode 100644 firmware/application/ui_audiotx.hpp rename firmware/graphics/{icon_audiotx.png => icon_audiotx.png_unused} (100%) create mode 100644 firmware/graphics/icon_biast_off.png create mode 100644 firmware/graphics/icon_biast_on.png rename firmware/graphics/{icon_keyboard.png => icon_keyboard.png_unused} (100%) rename firmware/graphics/{icon_nordic.png => icon_nordic.png_unused} (100%) rename firmware/graphics/{icon_numbers.png => icon_numbers.png_unused} (100%) rename firmware/graphics/{icon_unistroke.png => icon_unistroke.png_unused} (100%) rename firmware/graphics/{icon_whistle.png => icon_whistle.png_unused} (100%) diff --git a/firmware/application/CMakeLists.txt b/firmware/application/CMakeLists.txt index 9f1b8373..6d9251f5 100644 --- a/firmware/application/CMakeLists.txt +++ b/firmware/application/CMakeLists.txt @@ -109,160 +109,160 @@ set(CSRC # setting. set(CPPSRC main.cpp - irq_lcd_frame.cpp - irq_controls.cpp - irq_rtc.cpp - ${COMMON}/event.cpp - event_m0.cpp - ${COMMON}/message_queue.cpp - ${COMMON}/hackrf_hal.cpp - portapack.cpp - ${COMMON}/backlight.cpp - ${COMMON}/portapack_shared_memory.cpp - baseband_api.cpp - ${COMMON}/portapack_persistent_memory.cpp - ${COMMON}/portapack_io.cpp - ${COMMON}/i2c_pp.cpp - spi_pp.cpp - clock_manager.cpp - si5351.cpp - ${COMMON}/wm8731.cpp + ${COMMON}/adsb.cpp + ${COMMON}/adsb_frame.cpp + ${COMMON}/ais_baseband.cpp + ${COMMON}/ais_packet.cpp ${COMMON}/ak4951.cpp - radio.cpp + ${COMMON}/backlight.cpp ${COMMON}/baseband_cpld.cpp - tuning.cpp - rf_path.cpp - rffc507x.cpp - rffc507x_spi.cpp - max2837.cpp - max5864.cpp + ${COMMON}/bch_code.cpp ${COMMON}/buffer.cpp - debounce.cpp + ${COMMON}/buffer_exchange.cpp + ${COMMON}/chibios_cpp.cpp + ${COMMON}/cpld_max5.cpp + ${COMMON}/cpld_update.cpp + ${COMMON}/cpld_xilinx.cpp + ${COMMON}/debug.cpp + ${COMMON}/ert_packet.cpp + ${COMMON}/event.cpp + ${COMMON}/gcc.cpp + ${COMMON}/hackrf_hal.cpp + ${COMMON}/i2c_pp.cpp + ${COMMON}/jtag.cpp + ${COMMON}/jtag_tap.cpp + ${COMMON}/lcd_ili9341.cpp + ${COMMON}/lfsr_random.cpp + ${COMMON}/manchester.cpp + ${COMMON}/message_queue.cpp + ${COMMON}/morse.cpp + ${COMMON}/png_writer.cpp + ${COMMON}/pocsag.cpp + ${COMMON}/pocsag_packet.cpp + ${COMMON}/portapack_io.cpp + ${COMMON}/portapack_persistent_memory.cpp + ${COMMON}/portapack_shared_memory.cpp + ${COMMON}/sonde_packet.cpp + ${COMMON}/test_packet.cpp + ${COMMON}/tpms_packet.cpp + ${COMMON}/ui.cpp + ${COMMON}/ui_focus.cpp + ${COMMON}/ui_painter.cpp + ${COMMON}/ui_text.cpp + ${COMMON}/ui_widget.cpp + ${COMMON}/utility.cpp + ${COMMON}/wm8731.cpp + audio.cpp + baseband_api.cpp + capture_thread.cpp + clock_manager.cpp + core_control.cpp + de_bruijn.cpp + emu_cc1101.cpp + event_m0.cpp + file.cpp + freqman.cpp + io_file.cpp + io_wave.cpp + irq_controls.cpp + irq_lcd_frame.cpp + irq_rtc.cpp + log_file.cpp + portapack.cpp + radio.cpp + receiver_model.cpp + recent_entries.cpp + replay_thread.cpp + rf_path.cpp + rtc_time.cpp + sd_card.cpp + serializer.cpp + spectrum_color_lut.cpp + string_format.cpp + temperature_logger.cpp touch.cpp - touch_adc.cpp + tone_key.cpp + transmitter_model.cpp + tuning.cpp + hw/debounce.cpp + hw/encoder.cpp + hw/max2837.cpp + hw/max5864.cpp + hw/rffc507x.cpp + hw/rffc507x_spi.cpp + hw/si5351.cpp + hw/spi_pp.cpp + hw/touch_adc.cpp + ui_baseband_stats_view.cpp + ui_navigation.cpp + ui_playdead.cpp + ui_record_view.cpp + ui_sd_card_status_view.cpp + ui/ui_alphanum.cpp + ui/ui_audio.cpp + ui/ui_channel.cpp + ui/ui_font_fixed_8x16.cpp + ui/ui_geomap.cpp + ui/ui_menu.cpp + ui/ui_receiver.cpp + ui/ui_rssi.cpp + ui/ui_spectrum.cpp + ui/ui_tabview.cpp + ui/ui_textentry.cpp + ui/ui_transmitter.cpp + apps/ui_about.cpp + apps/ui_adsb_rx.cpp + apps/ui_adsb_tx.cpp + apps/ui_afsk_rx.cpp + apps/ui_aprs_tx.cpp + apps/ui_bht_tx.cpp + apps/ui_coasterp.cpp + apps/ui_debug.cpp + apps/ui_encoders.cpp + apps/ui_fileman.cpp + apps/ui_freqman.cpp + apps/ui_jammer.cpp + apps/ui_keyfob.cpp + apps/ui_lcr.cpp + apps/ui_mictx.cpp + apps/ui_modemsetup.cpp + apps/ui_morse.cpp + apps/ui_nuoptix.cpp + apps/ui_pocsag_tx.cpp + apps/ui_rds.cpp + apps/ui_scanner.cpp + apps/ui_sd_wipe.cpp + apps/ui_setup.cpp + apps/ui_siggen.cpp + apps/ui_sonde.cpp + apps/ui_soundboard.cpp + apps/ui_sstvtx.cpp + apps/ui_test.cpp + apps/ui_touch_calibration.cpp + apps/ui_touchtunes.cpp + apps/ui_view_wav.cpp + apps/ui_whipcalc.cpp + apps/analog_audio_app.cpp + apps/ais_app.cpp + apps/tpms_app.cpp + apps/pocsag_app.cpp + apps/ert_app.cpp + apps/capture_app.cpp + apps/replay_app.cpp protocols/aprs.cpp protocols/ax25.cpp protocols/bht.cpp protocols/dcs.cpp protocols/encoders.cpp protocols/lcr.cpp + protocols/modems.cpp protocols/rds.cpp - serializer.cpp - modems.cpp - audio.cpp - ${COMMON}/bch_code.cpp - tone_key.cpp - de_bruijn.cpp - encoder.cpp - emu_cc1101.cpp - freqman.cpp - ${COMMON}/lcd_ili9341.cpp - ${COMMON}/ui.cpp - ${COMMON}/ui_text.cpp - ${COMMON}/ui_widget.cpp - ${COMMON}/ui_painter.cpp - ${COMMON}/ui_focus.cpp - ui_about.cpp - ui_adsb_rx.cpp - ui_adsb_tx.cpp - ui_afsk_rx.cpp - ui_alphanum.cpp - ui_aprs_tx.cpp - ui_audio.cpp - ui_baseband_stats_view.cpp - ui_bht_tx.cpp - ui_channel.cpp - ui_coasterp.cpp - ui_debug.cpp - ui_encoders.cpp - ui_fileman.cpp - ui_font_fixed_8x16.cpp - ui_freqman.cpp - ui_geomap.cpp # ui_handwrite.cpp - ui_jammer.cpp - ui_keyfob.cpp - ui_lcr.cpp - ui_menu.cpp - ui_mictx.cpp - ui_modemsetup.cpp - ui_morse.cpp - ui_navigation.cpp - # ui_numbers.cpp - ui_nuoptix.cpp - ui_playdead.cpp - ui_pocsag_tx.cpp - ui_rds.cpp - ui_receiver.cpp - ui_record_view.cpp - # ui_replay_view.cpp - ui_rssi.cpp - ui_scanner.cpp - # ui_script.cpp - ui_sd_card_status_view.cpp - ui_sd_wipe.cpp - # ui_sd_card_debug.cpp - ui_setup.cpp - ui_siggen.cpp - ui_sonde.cpp - ui_soundboard.cpp - ui_spectrum.cpp - ui_sstvtx.cpp - ui_tabview.cpp - ui_test.cpp - ui_textentry.cpp - ui_touch_calibration.cpp - ui_touchtunes.cpp - ui_transmitter.cpp - ui_view_wav.cpp - ui_whipcalc.cpp # ui_loadmodule.cpp - recent_entries.cpp - receiver_model.cpp - transmitter_model.cpp - spectrum_color_lut.cpp - analog_audio_app.cpp - ${COMMON}/ais_baseband.cpp - ${COMMON}/ais_packet.cpp - ${COMMON}/pocsag_packet.cpp - ${COMMON}/pocsag.cpp - ${COMMON}/morse.cpp - ${COMMON}/adsb_frame.cpp - ${COMMON}/adsb.cpp - ${COMMON}/sonde_packet.cpp - ${COMMON}/test_packet.cpp - ais_app.cpp - tpms_app.cpp - pocsag_app.cpp - ${COMMON}/tpms_packet.cpp - ert_app.cpp - ${COMMON}/ert_packet.cpp - capture_app.cpp - replay_app.cpp - sd_card.cpp - rtc_time.cpp - file.cpp - log_file.cpp - ${COMMON}/png_writer.cpp - ${COMMON}/buffer_exchange.cpp - capture_thread.cpp - replay_thread.cpp - io_file.cpp - io_wave.cpp - ${COMMON}/manchester.cpp - string_format.cpp - temperature_logger.cpp - ${COMMON}/utility.cpp - ${COMMON}/chibios_cpp.cpp - ${COMMON}/debug.cpp - ${COMMON}/gcc.cpp - ${COMMON}/lfsr_random.cpp - core_control.cpp - ${COMMON}/cpld_max5.cpp - ${COMMON}/cpld_xilinx.cpp - ${COMMON}/jtag.cpp - ${COMMON}/jtag_tap.cpp - ${COMMON}/cpld_update.cpp + # ui_numbers.cpp + # ui_replay_view.cpp + # ui_script.cpp + # ui_sd_card_debug.cpp ${CPLD_20150901_DATA_CPP} ${CPLD_20170522_DATA_CPP} ${HACKRF_CPLD_DATA_CPP} @@ -295,8 +295,11 @@ set(INCDIR ${CMAKE_CURRENT_BINARY_DIR} ${COMMON} ${PORTINC} ${KERNINC} ${TESTINC ${HALINC} ${PLATFORMINC} ${BOARDINC} ${FATFSINC} ${CHIBIOS}/os/various - bitmaps + ui + hw + apps protocols + bitmaps ) # diff --git a/firmware/application/ais_app.cpp b/firmware/application/apps/ais_app.cpp similarity index 100% rename from firmware/application/ais_app.cpp rename to firmware/application/apps/ais_app.cpp diff --git a/firmware/application/ais_app.hpp b/firmware/application/apps/ais_app.hpp similarity index 100% rename from firmware/application/ais_app.hpp rename to firmware/application/apps/ais_app.hpp diff --git a/firmware/application/analog_audio_app.cpp b/firmware/application/apps/analog_audio_app.cpp similarity index 100% rename from firmware/application/analog_audio_app.cpp rename to firmware/application/apps/analog_audio_app.cpp diff --git a/firmware/application/analog_audio_app.hpp b/firmware/application/apps/analog_audio_app.hpp similarity index 100% rename from firmware/application/analog_audio_app.hpp rename to firmware/application/apps/analog_audio_app.hpp diff --git a/firmware/application/capture_app.cpp b/firmware/application/apps/capture_app.cpp similarity index 100% rename from firmware/application/capture_app.cpp rename to firmware/application/apps/capture_app.cpp diff --git a/firmware/application/capture_app.hpp b/firmware/application/apps/capture_app.hpp similarity index 100% rename from firmware/application/capture_app.hpp rename to firmware/application/apps/capture_app.hpp diff --git a/firmware/application/ert_app.cpp b/firmware/application/apps/ert_app.cpp similarity index 100% rename from firmware/application/ert_app.cpp rename to firmware/application/apps/ert_app.cpp diff --git a/firmware/application/ert_app.hpp b/firmware/application/apps/ert_app.hpp similarity index 100% rename from firmware/application/ert_app.hpp rename to firmware/application/apps/ert_app.hpp diff --git a/firmware/application/pocsag_app.cpp b/firmware/application/apps/pocsag_app.cpp similarity index 100% rename from firmware/application/pocsag_app.cpp rename to firmware/application/apps/pocsag_app.cpp diff --git a/firmware/application/pocsag_app.hpp b/firmware/application/apps/pocsag_app.hpp similarity index 100% rename from firmware/application/pocsag_app.hpp rename to firmware/application/apps/pocsag_app.hpp diff --git a/firmware/application/replay_app.cpp b/firmware/application/apps/replay_app.cpp similarity index 100% rename from firmware/application/replay_app.cpp rename to firmware/application/apps/replay_app.cpp diff --git a/firmware/application/replay_app.hpp b/firmware/application/apps/replay_app.hpp similarity index 100% rename from firmware/application/replay_app.hpp rename to firmware/application/apps/replay_app.hpp diff --git a/firmware/application/spectrum_analysis_app.cpp b/firmware/application/apps/spectrum_analysis_app.cpp similarity index 100% rename from firmware/application/spectrum_analysis_app.cpp rename to firmware/application/apps/spectrum_analysis_app.cpp diff --git a/firmware/application/spectrum_analysis_app.hpp b/firmware/application/apps/spectrum_analysis_app.hpp similarity index 100% rename from firmware/application/spectrum_analysis_app.hpp rename to firmware/application/apps/spectrum_analysis_app.hpp diff --git a/firmware/application/tpms_app.cpp b/firmware/application/apps/tpms_app.cpp similarity index 100% rename from firmware/application/tpms_app.cpp rename to firmware/application/apps/tpms_app.cpp diff --git a/firmware/application/tpms_app.hpp b/firmware/application/apps/tpms_app.hpp similarity index 100% rename from firmware/application/tpms_app.hpp rename to firmware/application/apps/tpms_app.hpp diff --git a/firmware/application/ui_about.cpp b/firmware/application/apps/ui_about.cpp similarity index 100% rename from firmware/application/ui_about.cpp rename to firmware/application/apps/ui_about.cpp diff --git a/firmware/application/ui_about.hpp b/firmware/application/apps/ui_about.hpp similarity index 100% rename from firmware/application/ui_about.hpp rename to firmware/application/apps/ui_about.hpp diff --git a/firmware/application/ui_about_demo.cpp b/firmware/application/apps/ui_about_demo.cpp similarity index 100% rename from firmware/application/ui_about_demo.cpp rename to firmware/application/apps/ui_about_demo.cpp diff --git a/firmware/application/ui_about_demo.hpp b/firmware/application/apps/ui_about_demo.hpp similarity index 100% rename from firmware/application/ui_about_demo.hpp rename to firmware/application/apps/ui_about_demo.hpp diff --git a/firmware/application/ui_adsb_rx.cpp b/firmware/application/apps/ui_adsb_rx.cpp similarity index 100% rename from firmware/application/ui_adsb_rx.cpp rename to firmware/application/apps/ui_adsb_rx.cpp diff --git a/firmware/application/ui_adsb_rx.hpp b/firmware/application/apps/ui_adsb_rx.hpp similarity index 100% rename from firmware/application/ui_adsb_rx.hpp rename to firmware/application/apps/ui_adsb_rx.hpp diff --git a/firmware/application/ui_adsb_tx.cpp b/firmware/application/apps/ui_adsb_tx.cpp similarity index 100% rename from firmware/application/ui_adsb_tx.cpp rename to firmware/application/apps/ui_adsb_tx.cpp diff --git a/firmware/application/ui_adsb_tx.hpp b/firmware/application/apps/ui_adsb_tx.hpp similarity index 100% rename from firmware/application/ui_adsb_tx.hpp rename to firmware/application/apps/ui_adsb_tx.hpp diff --git a/firmware/application/ui_afsk_rx.cpp b/firmware/application/apps/ui_afsk_rx.cpp similarity index 100% rename from firmware/application/ui_afsk_rx.cpp rename to firmware/application/apps/ui_afsk_rx.cpp diff --git a/firmware/application/ui_afsk_rx.hpp b/firmware/application/apps/ui_afsk_rx.hpp similarity index 100% rename from firmware/application/ui_afsk_rx.hpp rename to firmware/application/apps/ui_afsk_rx.hpp diff --git a/firmware/application/ui_aprs_tx.cpp b/firmware/application/apps/ui_aprs_tx.cpp similarity index 100% rename from firmware/application/ui_aprs_tx.cpp rename to firmware/application/apps/ui_aprs_tx.cpp diff --git a/firmware/application/ui_aprs_tx.hpp b/firmware/application/apps/ui_aprs_tx.hpp similarity index 100% rename from firmware/application/ui_aprs_tx.hpp rename to firmware/application/apps/ui_aprs_tx.hpp diff --git a/firmware/application/ui_bht_tx.cpp b/firmware/application/apps/ui_bht_tx.cpp similarity index 100% rename from firmware/application/ui_bht_tx.cpp rename to firmware/application/apps/ui_bht_tx.cpp diff --git a/firmware/application/ui_bht_tx.hpp b/firmware/application/apps/ui_bht_tx.hpp similarity index 100% rename from firmware/application/ui_bht_tx.hpp rename to firmware/application/apps/ui_bht_tx.hpp diff --git a/firmware/application/ui_coasterp.cpp b/firmware/application/apps/ui_coasterp.cpp similarity index 100% rename from firmware/application/ui_coasterp.cpp rename to firmware/application/apps/ui_coasterp.cpp diff --git a/firmware/application/ui_coasterp.hpp b/firmware/application/apps/ui_coasterp.hpp similarity index 100% rename from firmware/application/ui_coasterp.hpp rename to firmware/application/apps/ui_coasterp.hpp diff --git a/firmware/application/ui_debug.cpp b/firmware/application/apps/ui_debug.cpp similarity index 100% rename from firmware/application/ui_debug.cpp rename to firmware/application/apps/ui_debug.cpp diff --git a/firmware/application/ui_debug.hpp b/firmware/application/apps/ui_debug.hpp similarity index 100% rename from firmware/application/ui_debug.hpp rename to firmware/application/apps/ui_debug.hpp diff --git a/firmware/application/ui_encoders.cpp b/firmware/application/apps/ui_encoders.cpp similarity index 100% rename from firmware/application/ui_encoders.cpp rename to firmware/application/apps/ui_encoders.cpp diff --git a/firmware/application/ui_encoders.hpp b/firmware/application/apps/ui_encoders.hpp similarity index 100% rename from firmware/application/ui_encoders.hpp rename to firmware/application/apps/ui_encoders.hpp diff --git a/firmware/application/ui_fileman.cpp b/firmware/application/apps/ui_fileman.cpp similarity index 100% rename from firmware/application/ui_fileman.cpp rename to firmware/application/apps/ui_fileman.cpp diff --git a/firmware/application/ui_fileman.hpp b/firmware/application/apps/ui_fileman.hpp similarity index 100% rename from firmware/application/ui_fileman.hpp rename to firmware/application/apps/ui_fileman.hpp diff --git a/firmware/application/ui_freqman.cpp b/firmware/application/apps/ui_freqman.cpp similarity index 100% rename from firmware/application/ui_freqman.cpp rename to firmware/application/apps/ui_freqman.cpp diff --git a/firmware/application/ui_freqman.hpp b/firmware/application/apps/ui_freqman.hpp similarity index 100% rename from firmware/application/ui_freqman.hpp rename to firmware/application/apps/ui_freqman.hpp diff --git a/firmware/application/ui_jammer.cpp b/firmware/application/apps/ui_jammer.cpp similarity index 100% rename from firmware/application/ui_jammer.cpp rename to firmware/application/apps/ui_jammer.cpp diff --git a/firmware/application/ui_jammer.hpp b/firmware/application/apps/ui_jammer.hpp similarity index 100% rename from firmware/application/ui_jammer.hpp rename to firmware/application/apps/ui_jammer.hpp diff --git a/firmware/application/ui_keyfob.cpp b/firmware/application/apps/ui_keyfob.cpp similarity index 100% rename from firmware/application/ui_keyfob.cpp rename to firmware/application/apps/ui_keyfob.cpp diff --git a/firmware/application/ui_keyfob.hpp b/firmware/application/apps/ui_keyfob.hpp similarity index 100% rename from firmware/application/ui_keyfob.hpp rename to firmware/application/apps/ui_keyfob.hpp diff --git a/firmware/application/ui_lcr.cpp b/firmware/application/apps/ui_lcr.cpp similarity index 100% rename from firmware/application/ui_lcr.cpp rename to firmware/application/apps/ui_lcr.cpp diff --git a/firmware/application/ui_lcr.hpp b/firmware/application/apps/ui_lcr.hpp similarity index 100% rename from firmware/application/ui_lcr.hpp rename to firmware/application/apps/ui_lcr.hpp diff --git a/firmware/application/ui_mictx.cpp b/firmware/application/apps/ui_mictx.cpp similarity index 100% rename from firmware/application/ui_mictx.cpp rename to firmware/application/apps/ui_mictx.cpp diff --git a/firmware/application/ui_mictx.hpp b/firmware/application/apps/ui_mictx.hpp similarity index 100% rename from firmware/application/ui_mictx.hpp rename to firmware/application/apps/ui_mictx.hpp diff --git a/firmware/application/ui_modemsetup.cpp b/firmware/application/apps/ui_modemsetup.cpp similarity index 100% rename from firmware/application/ui_modemsetup.cpp rename to firmware/application/apps/ui_modemsetup.cpp diff --git a/firmware/application/ui_modemsetup.hpp b/firmware/application/apps/ui_modemsetup.hpp similarity index 100% rename from firmware/application/ui_modemsetup.hpp rename to firmware/application/apps/ui_modemsetup.hpp diff --git a/firmware/application/ui_morse.cpp b/firmware/application/apps/ui_morse.cpp similarity index 100% rename from firmware/application/ui_morse.cpp rename to firmware/application/apps/ui_morse.cpp diff --git a/firmware/application/ui_morse.hpp b/firmware/application/apps/ui_morse.hpp similarity index 100% rename from firmware/application/ui_morse.hpp rename to firmware/application/apps/ui_morse.hpp diff --git a/firmware/application/ui_numbers.cpp b/firmware/application/apps/ui_numbers.cpp similarity index 100% rename from firmware/application/ui_numbers.cpp rename to firmware/application/apps/ui_numbers.cpp diff --git a/firmware/application/ui_numbers.hpp b/firmware/application/apps/ui_numbers.hpp similarity index 100% rename from firmware/application/ui_numbers.hpp rename to firmware/application/apps/ui_numbers.hpp diff --git a/firmware/application/ui_nuoptix.cpp b/firmware/application/apps/ui_nuoptix.cpp similarity index 100% rename from firmware/application/ui_nuoptix.cpp rename to firmware/application/apps/ui_nuoptix.cpp diff --git a/firmware/application/ui_nuoptix.hpp b/firmware/application/apps/ui_nuoptix.hpp similarity index 100% rename from firmware/application/ui_nuoptix.hpp rename to firmware/application/apps/ui_nuoptix.hpp diff --git a/firmware/application/ui_pocsag_tx.cpp b/firmware/application/apps/ui_pocsag_tx.cpp similarity index 100% rename from firmware/application/ui_pocsag_tx.cpp rename to firmware/application/apps/ui_pocsag_tx.cpp diff --git a/firmware/application/ui_pocsag_tx.hpp b/firmware/application/apps/ui_pocsag_tx.hpp similarity index 100% rename from firmware/application/ui_pocsag_tx.hpp rename to firmware/application/apps/ui_pocsag_tx.hpp diff --git a/firmware/application/ui_rds.cpp b/firmware/application/apps/ui_rds.cpp similarity index 100% rename from firmware/application/ui_rds.cpp rename to firmware/application/apps/ui_rds.cpp diff --git a/firmware/application/ui_rds.hpp b/firmware/application/apps/ui_rds.hpp similarity index 100% rename from firmware/application/ui_rds.hpp rename to firmware/application/apps/ui_rds.hpp diff --git a/firmware/application/ui_scanner.cpp b/firmware/application/apps/ui_scanner.cpp similarity index 100% rename from firmware/application/ui_scanner.cpp rename to firmware/application/apps/ui_scanner.cpp diff --git a/firmware/application/ui_scanner.hpp b/firmware/application/apps/ui_scanner.hpp similarity index 100% rename from firmware/application/ui_scanner.hpp rename to firmware/application/apps/ui_scanner.hpp diff --git a/firmware/application/ui_script.cpp b/firmware/application/apps/ui_script.cpp similarity index 100% rename from firmware/application/ui_script.cpp rename to firmware/application/apps/ui_script.cpp diff --git a/firmware/application/ui_script.hpp b/firmware/application/apps/ui_script.hpp similarity index 100% rename from firmware/application/ui_script.hpp rename to firmware/application/apps/ui_script.hpp diff --git a/firmware/application/ui_sd_wipe.cpp b/firmware/application/apps/ui_sd_wipe.cpp similarity index 100% rename from firmware/application/ui_sd_wipe.cpp rename to firmware/application/apps/ui_sd_wipe.cpp diff --git a/firmware/application/ui_sd_wipe.hpp b/firmware/application/apps/ui_sd_wipe.hpp similarity index 100% rename from firmware/application/ui_sd_wipe.hpp rename to firmware/application/apps/ui_sd_wipe.hpp diff --git a/firmware/application/ui_setup.cpp b/firmware/application/apps/ui_setup.cpp similarity index 88% rename from firmware/application/ui_setup.cpp rename to firmware/application/apps/ui_setup.cpp index 7c0b90a9..5927ead4 100644 --- a/firmware/application/ui_setup.cpp +++ b/firmware/application/apps/ui_setup.cpp @@ -34,7 +34,6 @@ using portapack::receiver_model; using namespace portapack; #include "string_format.hpp" -#include "portapack_persistent_memory.hpp" #include "ui_font_fixed_8x16.hpp" #include "cpld_update.hpp" @@ -58,7 +57,6 @@ SetDateTimeView::SetDateTimeView( }, add_children({ - &text_title, &field_year, &text_slash1, &field_month, @@ -112,25 +110,23 @@ SetDateTimeModel SetDateTimeView::form_collect() { }; } -SetFrequencyCorrectionView::SetFrequencyCorrectionView( +SetRadioView::SetRadioView( NavigationView& nav ) { - button_ok.on_select = [&nav, this](Button&){ - const auto model = this->form_collect(); - portapack::persistent_memory::set_correction_ppb(model.ppm * 1000); - nav.pop(); - }, - button_cancel.on_select = [&nav](Button&){ nav.pop(); }, add_children({ - &text_title, + &labels, &field_ppm, - &text_ppm, - &button_ok, - &button_cancel, + &text_description_1, + &text_description_2, + &text_description_3, + &text_description_4, + &check_bias, + &button_done, + &button_cancel }); SetFrequencyCorrectionModel model { @@ -138,45 +134,35 @@ SetFrequencyCorrectionView::SetFrequencyCorrectionView( }; form_init(model); + + check_bias.set_value(receiver_model.antenna_bias()); + check_bias.on_select = [this](Checkbox&, bool v) { + receiver_model.set_antenna_bias(v); + StatusRefreshMessage message { }; + EventDispatcher::send_message(message); + }; + + button_done.on_select = [this, &nav](Button&){ + const auto model = this->form_collect(); + portapack::persistent_memory::set_correction_ppb(model.ppm * 1000); + nav.pop(); + }; } -void SetFrequencyCorrectionView::focus() { - button_cancel.focus(); +void SetRadioView::focus() { + button_done.focus(); } -void SetFrequencyCorrectionView::form_init(const SetFrequencyCorrectionModel& model) { +void SetRadioView::form_init(const SetFrequencyCorrectionModel& model) { field_ppm.set_value(model.ppm); } -SetFrequencyCorrectionModel SetFrequencyCorrectionView::form_collect() { +SetFrequencyCorrectionModel SetRadioView::form_collect() { return { .ppm = static_cast(field_ppm.value()), }; } -AntennaBiasSetupView::AntennaBiasSetupView(NavigationView& nav) { - add_children({ - &text_title, - &text_description_1, - &text_description_2, - &text_description_3, - &text_description_4, - &options_bias, - &button_done, - }); - - options_bias.set_by_value(receiver_model.antenna_bias() ? 1 : 0); - options_bias.on_change = [this](size_t, OptionsField::value_t v) { - receiver_model.set_antenna_bias(v); - }; - - button_done.on_select = [&nav](Button&){ nav.pop(); }; -} - -void AntennaBiasSetupView::focus() { - button_done.focus(); -} - SetPlayDeadView::SetPlayDeadView(NavigationView& nav) { add_children({ &text_sequence, @@ -446,13 +432,14 @@ void ModInfoView::focus() { SetupMenuView::SetupMenuView(NavigationView& nav) { add_items({ - { "UI", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Radio", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "UI", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, //{ "SD card modules", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Date/Time", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "Frequency correction", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "Antenna Bias Voltage", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "Touch screen", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "Play dead", ui::Color::red(), &bitmap_icon_playdead, [&nav](){ nav.push(); } } + { "Date/Time", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + //{ "Frequency correction", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + //{ "Antenna Bias Voltage", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Touch screen", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Play dead", ui::Color::white(), &bitmap_icon_playdead, [&nav](){ nav.push(); } } }); on_left = [&nav](){ nav.pop(); }; } diff --git a/firmware/application/ui_setup.hpp b/firmware/application/apps/ui_setup.hpp similarity index 88% rename from firmware/application/ui_setup.hpp rename to firmware/application/apps/ui_setup.hpp index bc7fded4..d3cab311 100644 --- a/firmware/application/ui_setup.hpp +++ b/firmware/application/apps/ui_setup.hpp @@ -46,13 +46,10 @@ public: SetDateTimeView(NavigationView& nav); void focus() override; + + std::string title() const override { return "Set Date/Time"; }; private: - Text text_title { - { 10 * 8, 7 * 16, 9 * 16, 16 }, - "Date/Time" - }; - NumberField field_year { { 4 * 8, 9 * 16 }, 4, @@ -135,36 +132,60 @@ struct SetFrequencyCorrectionModel { int8_t ppm; }; -class SetFrequencyCorrectionView : public View { +class SetRadioView : public View { public: - SetFrequencyCorrectionView(NavigationView& nav); + SetRadioView(NavigationView& nav); void focus() override; + + std::string title() const override { return "Radio settings"; }; private: - Text text_title { - { 5 * 8, 7 * 16, 20 * 8, 16 }, - "Frequency Correction" + Labels labels { + { { 2 * 8, 2 * 16 }, "Frequency correction:", Color::light_grey() }, + { { 6 * 8, 3 * 16 }, "PPM", Color::light_grey() }, }; NumberField field_ppm { - { 11 * 8, 9 * 16 }, + { 2 * 8, 3 * 16 }, 3, { -50, 50 }, 1, '0', }; - Text text_ppm { - { 15 * 8, 9 * 16, 3 * 8, 16 }, - "PPM", + + Text text_description_1 { + { 24, 6 * 16, 24 * 8, 16 }, + "CAUTION: Ensure that all" }; - Button button_ok { - { 4 * 8, 13 * 16, 8 * 8, 24 }, - "OK", + Text text_description_2 { + { 28, 7 * 16, 23 * 8, 16 }, + "devices attached to the" + }; + + Text text_description_3 { + { 8, 8 * 16, 28 * 8, 16 }, + "antenna connector can accept" + }; + + Text text_description_4 { + { 68, 9 * 16, 13 * 8, 16 }, + "a DC voltage!" + }; + + Checkbox check_bias { + { 28, 12 * 16 }, + 5, + "Turn on bias voltage" + }; + + Button button_done { + { 2 * 8, 16 * 16, 12 * 8, 32 }, + "Done" }; Button button_cancel { - { 18 * 8, 13 * 16, 8 * 8, 24 }, + { 16 * 8, 16 * 16, 12 * 8, 32 }, "Cancel", }; @@ -201,58 +222,14 @@ private: }; }; -class AntennaBiasSetupView : public View { -public: - AntennaBiasSetupView(NavigationView& nav); - - void focus() override; - -private: - Text text_title { - { 5 * 8, 3 * 16, 20 * 8, 16 }, - "Antenna Bias Voltage" - }; - - Text text_description_1 { - { 24, 6 * 16, 24 * 8, 16 }, - "CAUTION: Ensure that all" - }; - - Text text_description_2 { - { 28, 7 * 16, 23 * 8, 16 }, - "devices attached to the" - }; - - Text text_description_3 { - { 8, 8 * 16, 28 * 8, 16 }, - "antenna connector can accept" - }; - - Text text_description_4 { - { 68, 9 * 16, 13 * 8, 16 }, - "a DC voltage!" - }; - - OptionsField options_bias { - { 100, 12 * 16 }, - 5, - { - { " Off ", 0 }, - { " On ", 1 }, - } - }; - - Button button_done { - { 72, 15 * 16, 96, 24 }, - "Done" - }; -}; - class SetUIView : public View { public: SetUIView(NavigationView& nav); + void focus() override; + std::string title() const override { return "UI settings"; }; + private: Checkbox checkbox_login { { 3 * 8, 2 * 16 }, @@ -296,6 +273,8 @@ public: void focus() override; + std::string title() const override { return "Playdead settings"; }; + private: bool entermode = false; uint32_t sequence { 0 }; @@ -390,6 +369,8 @@ private: class SetupMenuView : public MenuView { public: SetupMenuView(NavigationView& nav); + + std::string title() const override { return "Settings"; }; }; } /* namespace ui */ diff --git a/firmware/application/ui_sigfrx.cpp b/firmware/application/apps/ui_sigfrx.cpp similarity index 100% rename from firmware/application/ui_sigfrx.cpp rename to firmware/application/apps/ui_sigfrx.cpp diff --git a/firmware/application/ui_sigfrx.hpp b/firmware/application/apps/ui_sigfrx.hpp similarity index 100% rename from firmware/application/ui_sigfrx.hpp rename to firmware/application/apps/ui_sigfrx.hpp diff --git a/firmware/application/ui_siggen.cpp b/firmware/application/apps/ui_siggen.cpp similarity index 100% rename from firmware/application/ui_siggen.cpp rename to firmware/application/apps/ui_siggen.cpp diff --git a/firmware/application/ui_siggen.hpp b/firmware/application/apps/ui_siggen.hpp similarity index 100% rename from firmware/application/ui_siggen.hpp rename to firmware/application/apps/ui_siggen.hpp diff --git a/firmware/application/ui_sonde.cpp b/firmware/application/apps/ui_sonde.cpp similarity index 100% rename from firmware/application/ui_sonde.cpp rename to firmware/application/apps/ui_sonde.cpp diff --git a/firmware/application/ui_sonde.hpp b/firmware/application/apps/ui_sonde.hpp similarity index 100% rename from firmware/application/ui_sonde.hpp rename to firmware/application/apps/ui_sonde.hpp diff --git a/firmware/application/ui_soundboard.cpp b/firmware/application/apps/ui_soundboard.cpp similarity index 100% rename from firmware/application/ui_soundboard.cpp rename to firmware/application/apps/ui_soundboard.cpp diff --git a/firmware/application/ui_soundboard.hpp b/firmware/application/apps/ui_soundboard.hpp similarity index 100% rename from firmware/application/ui_soundboard.hpp rename to firmware/application/apps/ui_soundboard.hpp diff --git a/firmware/application/ui_sstvtx.cpp b/firmware/application/apps/ui_sstvtx.cpp similarity index 100% rename from firmware/application/ui_sstvtx.cpp rename to firmware/application/apps/ui_sstvtx.cpp diff --git a/firmware/application/ui_sstvtx.hpp b/firmware/application/apps/ui_sstvtx.hpp similarity index 100% rename from firmware/application/ui_sstvtx.hpp rename to firmware/application/apps/ui_sstvtx.hpp diff --git a/firmware/application/ui_test.cpp b/firmware/application/apps/ui_test.cpp similarity index 100% rename from firmware/application/ui_test.cpp rename to firmware/application/apps/ui_test.cpp diff --git a/firmware/application/ui_test.hpp b/firmware/application/apps/ui_test.hpp similarity index 100% rename from firmware/application/ui_test.hpp rename to firmware/application/apps/ui_test.hpp diff --git a/firmware/application/ui_touch_calibration.cpp b/firmware/application/apps/ui_touch_calibration.cpp similarity index 100% rename from firmware/application/ui_touch_calibration.cpp rename to firmware/application/apps/ui_touch_calibration.cpp diff --git a/firmware/application/ui_touch_calibration.hpp b/firmware/application/apps/ui_touch_calibration.hpp similarity index 97% rename from firmware/application/ui_touch_calibration.hpp rename to firmware/application/apps/ui_touch_calibration.hpp index c9a17aed..1c4fc597 100644 --- a/firmware/application/ui_touch_calibration.hpp +++ b/firmware/application/apps/ui_touch_calibration.hpp @@ -34,6 +34,8 @@ public: void focus() override; + std::string title() const override { return "Touch calibration"; }; + private: enum class Phase { Init, diff --git a/firmware/application/ui_touchtunes.cpp b/firmware/application/apps/ui_touchtunes.cpp similarity index 100% rename from firmware/application/ui_touchtunes.cpp rename to firmware/application/apps/ui_touchtunes.cpp diff --git a/firmware/application/ui_touchtunes.hpp b/firmware/application/apps/ui_touchtunes.hpp similarity index 100% rename from firmware/application/ui_touchtunes.hpp rename to firmware/application/apps/ui_touchtunes.hpp diff --git a/firmware/application/ui_view_wav.cpp b/firmware/application/apps/ui_view_wav.cpp similarity index 100% rename from firmware/application/ui_view_wav.cpp rename to firmware/application/apps/ui_view_wav.cpp diff --git a/firmware/application/ui_view_wav.hpp b/firmware/application/apps/ui_view_wav.hpp similarity index 100% rename from firmware/application/ui_view_wav.hpp rename to firmware/application/apps/ui_view_wav.hpp diff --git a/firmware/application/ui_whipcalc.cpp b/firmware/application/apps/ui_whipcalc.cpp similarity index 100% rename from firmware/application/ui_whipcalc.cpp rename to firmware/application/apps/ui_whipcalc.cpp diff --git a/firmware/application/ui_whipcalc.hpp b/firmware/application/apps/ui_whipcalc.hpp similarity index 100% rename from firmware/application/ui_whipcalc.hpp rename to firmware/application/apps/ui_whipcalc.hpp diff --git a/firmware/application/bitmap.hpp b/firmware/application/bitmap.hpp index 07a4bb25..467ce441 100644 --- a/firmware/application/bitmap.hpp +++ b/firmware/application/bitmap.hpp @@ -95,28 +95,6 @@ static constexpr Bitmap bitmap_sd_card_error { { 16, 16 }, bitmap_sd_card_error_data }; -static constexpr uint8_t bitmap_icon_unistroke_data[] = { - 0x33, 0xC0, - 0x33, 0x00, - 0xB3, 0xCD, - 0xB3, 0xDF, - 0xB3, 0xD9, - 0xB3, 0xD9, - 0x9E, 0xD9, - 0x00, 0x00, - 0x00, 0x00, - 0x0C, 0x1C, - 0x06, 0x3E, - 0x06, 0x67, - 0xCE, 0x43, - 0xFC, 0x01, - 0x78, 0x40, - 0x00, 0x00, -}; -static constexpr Bitmap bitmap_icon_unistroke { - { 16, 16 }, bitmap_icon_unistroke_data -}; - static constexpr uint8_t bitmap_stripes_data[] = { 0xFF, 0x03, 0xC0, 0xFF, 0x01, 0xE0, @@ -639,28 +617,6 @@ static constexpr Bitmap bitmap_icon_freqman { { 16, 16 }, bitmap_icon_freqman_data }; -static constexpr uint8_t bitmap_icon_whistle_data[] = { - 0x00, 0x00, - 0x60, 0x00, - 0xFC, 0x01, - 0xFF, 0x03, - 0xFF, 0x0F, - 0xF9, 0x11, - 0x66, 0x30, - 0x88, 0x3C, - 0x10, 0x7F, - 0x10, 0x7E, - 0x08, 0x7C, - 0x08, 0x7C, - 0x10, 0x3C, - 0x20, 0x0E, - 0xC0, 0x03, - 0x00, 0x00, -}; -static constexpr Bitmap bitmap_icon_whistle { - { 16, 16 }, bitmap_icon_whistle_data -}; - static constexpr uint8_t bitmap_sd_card_ok_data[] = { 0x00, 0x00, 0x00, 0x00, @@ -705,28 +661,6 @@ static constexpr Bitmap bitmap_icon_microphone { { 16, 16 }, bitmap_icon_microphone_data }; -static constexpr uint8_t bitmap_icon_numbers_data[] = { - 0x00, 0x00, - 0x68, 0x1B, - 0x48, 0x09, - 0x48, 0x1A, - 0x48, 0x5B, - 0x08, 0x00, - 0x14, 0x00, - 0x1C, 0x00, - 0x14, 0x00, - 0x14, 0x00, - 0x1C, 0x00, - 0x14, 0x00, - 0x22, 0x00, - 0x3E, 0x00, - 0x22, 0x00, - 0x00, 0x00, -}; -static constexpr Bitmap bitmap_icon_numbers { - { 16, 16 }, bitmap_icon_numbers_data -}; - static constexpr uint8_t bitmap_icon_notepad_data[] = { 0x0C, 0x00, 0x1E, 0x00, @@ -875,26 +809,48 @@ static constexpr Bitmap bitmap_icon_keyfob { { 16, 16 }, bitmap_icon_keyfob_data }; -static constexpr uint8_t bitmap_icon_nordic_data[] = { +static constexpr uint8_t bitmap_icon_biast_off_data[] = { + 0xFF, 0xFF, + 0xFF, 0xFF, + 0x80, 0x01, + 0x80, 0x01, + 0x80, 0x01, + 0x00, 0x00, + 0x00, 0x00, + 0x20, 0x04, + 0x60, 0x06, + 0xC0, 0x03, + 0x80, 0x01, + 0xC0, 0x03, + 0x60, 0x06, + 0x20, 0x04, 0x00, 0x00, - 0x18, 0x18, - 0x26, 0x6C, - 0xC1, 0x8E, - 0x07, 0x8F, - 0x1F, 0x8C, - 0x3F, 0x80, - 0xFF, 0x80, - 0xFF, 0x83, - 0xFF, 0x87, - 0xEF, 0x9F, - 0x8F, 0xFF, - 0x4F, 0xFF, - 0x2E, 0x7C, - 0x18, 0x18, 0x00, 0x00, }; -static constexpr Bitmap bitmap_icon_nordic { - { 16, 16 }, bitmap_icon_nordic_data +static constexpr Bitmap bitmap_icon_biast_off { + { 16, 16 }, bitmap_icon_biast_off_data +}; + +static constexpr uint8_t bitmap_icon_biast_on_data[] = { + 0xFF, 0xFF, + 0xFF, 0xFF, + 0x80, 0x01, + 0x80, 0x03, + 0x08, 0x06, + 0x08, 0x04, + 0x0C, 0x06, + 0x84, 0x03, + 0x0E, 0x06, + 0x3E, 0x04, + 0x38, 0x06, + 0x90, 0x03, + 0x18, 0x06, + 0x08, 0x04, + 0x08, 0x06, + 0x80, 0x03, +}; +static constexpr Bitmap bitmap_icon_biast_on { + { 16, 16 }, bitmap_icon_biast_on_data }; static constexpr uint8_t bitmap_icon_previous_data[] = { @@ -1327,28 +1283,6 @@ static constexpr Bitmap bitmap_icon_ert { { 16, 16 }, bitmap_icon_ert_data }; -static constexpr uint8_t bitmap_icon_keyboard_data[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xF0, 0x1F, - 0x18, 0x11, - 0x18, 0x11, - 0x18, 0x11, - 0xFC, 0x7F, - 0x46, 0x44, - 0x46, 0x44, - 0x46, 0x44, - 0xFE, 0x7F, - 0xFE, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, -}; -static constexpr Bitmap bitmap_icon_keyboard { - { 16, 16 }, bitmap_icon_keyboard_data -}; - static constexpr uint8_t bitmap_icon_utilities_data[] = { 0xC0, 0x03, 0x80, 0x0F, @@ -1677,28 +1611,6 @@ static constexpr Bitmap bitmap_target { { 16, 16 }, bitmap_target_data }; -static constexpr uint8_t bitmap_icon_audiotx_data[] = { - 0x00, 0x70, - 0x00, 0x7F, - 0xC0, 0x4F, - 0xC0, 0x60, - 0x40, 0x5E, - 0xC0, 0x41, - 0x40, 0x40, - 0x40, 0x40, - 0x40, 0x40, - 0x40, 0x70, - 0x70, 0x7C, - 0x7C, 0x7E, - 0x7E, 0x3E, - 0x3E, 0x1C, - 0x1C, 0x00, - 0x00, 0x00, -}; -static constexpr Bitmap bitmap_icon_audiotx { - { 16, 16 }, bitmap_icon_audiotx_data -}; - static constexpr uint8_t bitmap_icon_sstv_data[] = { 0x10, 0x08, 0x20, 0x04, diff --git a/firmware/application/freqman.hpp b/firmware/application/freqman.hpp index 162d0c22..688801c3 100644 --- a/firmware/application/freqman.hpp +++ b/firmware/application/freqman.hpp @@ -58,8 +58,8 @@ struct freqman_entry { using freqman_db = std::vector; std::vector get_freqman_files(); -bool load_freqman_file(std::string& file_stem, freqman_db &db); -bool save_freqman_file(std::string& file_stem, freqman_db &db); +bool load_freqman_file(std::string& file_stem, freqman_db& db); +bool save_freqman_file(std::string& file_stem, freqman_db& db); bool create_freqman_file(std::string& file_stem, File& freqman_file); std::string freqman_item_string(freqman_entry &item, size_t max_length); diff --git a/firmware/application/debounce.cpp b/firmware/application/hw/debounce.cpp similarity index 100% rename from firmware/application/debounce.cpp rename to firmware/application/hw/debounce.cpp diff --git a/firmware/application/debounce.hpp b/firmware/application/hw/debounce.hpp similarity index 100% rename from firmware/application/debounce.hpp rename to firmware/application/hw/debounce.hpp diff --git a/firmware/application/encoder.cpp b/firmware/application/hw/encoder.cpp similarity index 100% rename from firmware/application/encoder.cpp rename to firmware/application/hw/encoder.cpp diff --git a/firmware/application/encoder.hpp b/firmware/application/hw/encoder.hpp similarity index 100% rename from firmware/application/encoder.hpp rename to firmware/application/hw/encoder.hpp diff --git a/firmware/application/max2837.cpp b/firmware/application/hw/max2837.cpp similarity index 100% rename from firmware/application/max2837.cpp rename to firmware/application/hw/max2837.cpp diff --git a/firmware/application/max2837.hpp b/firmware/application/hw/max2837.hpp similarity index 100% rename from firmware/application/max2837.hpp rename to firmware/application/hw/max2837.hpp diff --git a/firmware/application/max5864.cpp b/firmware/application/hw/max5864.cpp similarity index 100% rename from firmware/application/max5864.cpp rename to firmware/application/hw/max5864.cpp diff --git a/firmware/application/max5864.hpp b/firmware/application/hw/max5864.hpp similarity index 100% rename from firmware/application/max5864.hpp rename to firmware/application/hw/max5864.hpp diff --git a/firmware/application/rffc507x.cpp b/firmware/application/hw/rffc507x.cpp similarity index 100% rename from firmware/application/rffc507x.cpp rename to firmware/application/hw/rffc507x.cpp diff --git a/firmware/application/rffc507x.hpp b/firmware/application/hw/rffc507x.hpp similarity index 100% rename from firmware/application/rffc507x.hpp rename to firmware/application/hw/rffc507x.hpp diff --git a/firmware/application/rffc507x_spi.cpp b/firmware/application/hw/rffc507x_spi.cpp similarity index 100% rename from firmware/application/rffc507x_spi.cpp rename to firmware/application/hw/rffc507x_spi.cpp diff --git a/firmware/application/rffc507x_spi.hpp b/firmware/application/hw/rffc507x_spi.hpp similarity index 100% rename from firmware/application/rffc507x_spi.hpp rename to firmware/application/hw/rffc507x_spi.hpp diff --git a/firmware/application/si5351.cpp b/firmware/application/hw/si5351.cpp similarity index 100% rename from firmware/application/si5351.cpp rename to firmware/application/hw/si5351.cpp diff --git a/firmware/application/si5351.hpp b/firmware/application/hw/si5351.hpp similarity index 100% rename from firmware/application/si5351.hpp rename to firmware/application/hw/si5351.hpp diff --git a/firmware/application/spi_arbiter.hpp b/firmware/application/hw/spi_arbiter.hpp similarity index 100% rename from firmware/application/spi_arbiter.hpp rename to firmware/application/hw/spi_arbiter.hpp diff --git a/firmware/application/spi_pp.cpp b/firmware/application/hw/spi_pp.cpp similarity index 100% rename from firmware/application/spi_pp.cpp rename to firmware/application/hw/spi_pp.cpp diff --git a/firmware/application/spi_pp.hpp b/firmware/application/hw/spi_pp.hpp similarity index 100% rename from firmware/application/spi_pp.hpp rename to firmware/application/hw/spi_pp.hpp diff --git a/firmware/application/touch_adc.cpp b/firmware/application/hw/touch_adc.cpp similarity index 100% rename from firmware/application/touch_adc.cpp rename to firmware/application/hw/touch_adc.cpp diff --git a/firmware/application/touch_adc.hpp b/firmware/application/hw/touch_adc.hpp similarity index 100% rename from firmware/application/touch_adc.hpp rename to firmware/application/hw/touch_adc.hpp diff --git a/firmware/application/io_wave.hpp b/firmware/application/io_wave.hpp index 6cdf4ab7..47d2b1d6 100644 --- a/firmware/application/io_wave.hpp +++ b/firmware/application/io_wave.hpp @@ -33,7 +33,7 @@ struct fmt_pcm_t { constexpr fmt_pcm_t( const uint32_t sampling_rate ) : nSamplesPerSec { sampling_rate }, - nAvgBytesPerSec { nSamplesPerSec * nBlockAlign } + nAvgBytesPerSec { nSamplesPerSec * 2 } // nBlockAlign = 2 { } diff --git a/firmware/application/main.cpp.orig b/firmware/application/main.cpp.orig new file mode 100755 index 00000000..103a14e2 --- /dev/null +++ b/firmware/application/main.cpp.orig @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc. + * Copyright (C) 2016 Furrtek + * + * This file is part of PortaPack. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +// Color bitmaps generated with: +// Gimp image > indexed colors (16), then "xxd -i *.bmp" + +//TEST: Menuview refresh, seems to blink a lot +//TEST: Check AFSK transmit end, skips last bits ? +//TEST: Imperial in whipcalc + +//BUG: Auto backlight off doesn't work anymore +//BUG: CPLD-related rx ok, tx bad, see portapack.cpp lines 214+ to disable CPLD overlay +//BUG: REPLAY See what's wrong with quality (format, or need for interpolation filter ?) +//BUG: SCANNER Lock on frequency, if frequency jump, still locked on first one +//BUG: SCANNER Multiple slices + +//TODO: Cap Wav viewer position +//TODO: Adapt wav viewer position step +//TODO: Use unit_auto_scale +//TODO: Remove make_bistream from encoders.cpp, too complex, stinks. bitstream_append should be enough. +//TODO: Continue work on proc_afskrx_corr, see python script (it works !) +//TODO: Super simple text file viewer +//TODO: De bruijn sequence scanner for encoders +//TODO: FILEMAN Rename folders +//TODO: FILEMAN Move files +//TODO: Frequency and bw settings were removed from modemsetup, put those back in LCR TX +//TODO: Use separate thread for scanning in EPAR TX +//TODO: Use separate thread for scanning in LCR TX +//TODO: REPLAY Convert C16 to C8 on M0 core +//TODO: Make freqman refresh simpler (use previous black rectangle method) +//TODO: Merge AFSK and TONES procs ? +//TODO: NFM RX mode: nav.pop on squelch +//TODO: MORSE use prosigns +//TODO: MORSE live keying mode +//TODO: Use to_string_short_freq wherever possible +//TODO: SCANNER Waveform widget as FFT view ? +//TODO: Optimize (and group ?) CTCSS tone gen code +/* +Continuous (Fox-oring) +12s transmit, 48s space (Sprint 1/5th) +60s transmit, 240s space (Classic 1/5 min) +60s transmit, 360s space (Classic 1/7 min) +*/ +<<<<<<< Updated upstream +======= +//TODO: Use TransmitterView in TEDI/LCR, Numbers, ... +>>>>>>> Stashed changes +//TODO: FreqMan: Remove and rename categories +//TODO: Mousejack ? +//TODO: Move frequencykeypad from ui_receiver to ui_widget (used everywhere) +//TODO: ADS-B draw trajectory + GPS coordinates + scale, and playback +//TODO: RDS multiple groups (sequence) +//TODO: Use ModalMessageView confirmation for TX ? +//TODO: Use msgpack for settings, lists... on sd card + +// Multimon-style stuff: +//TODO: CTCSS detector +//TODO: DMR detector +//TODO: GSM channel detector +//TODO: SIGFOX RX/TX +//TODO: Playdead amnesia and login +//TODO: Setup: Play dead by default ? Enable/disable ? + +// Old or low-priority stuff: +//TODO: Bodet :) +//TODO: Analog TV tx with camcorder font character generator +//TODO: Show address/data bit fields in OOK TX +//TODO: Scan for OOK TX +//TODO: Script engine ? +//TODO: AFSK receiver +//TODO: Check more OOK encoders +//BUG (fixed ?): No audio in about when shown second time +//TODO: Show MD5 mismatches for modules not found, etc... +//TODO: Module name/filename in modules.hpp to indicate requirement in case it's not found ui_loadmodule +//BUG: Description doesn't show up first time going to system>module info (UI drawn on top) +//TODO: Two players tic-tac-toe +//TODO: Analog TV pong game + +#include "ch.h" + +#include "portapack.hpp" +#include "portapack_shared_memory.hpp" + +#include "message_queue.hpp" + +#include "ui.hpp" +#include "ui_widget.hpp" +#include "ui_painter.hpp" +#include "ui_navigation.hpp" + +#include "irq_lcd_frame.hpp" +#include "irq_controls.hpp" +#include "irq_rtc.hpp" + +#include "event_m0.hpp" + +#include "core_control.hpp" +#include "spi_image.hpp" + +#include "debug.hpp" +#include "led.hpp" + +#include "gcc.hpp" + +#include "sd_card.hpp" + +#include + +static void event_loop() { + ui::Context context; + ui::SystemView system_view { + context, + portapack::display.screen_rect() + }; + + EventDispatcher event_dispatcher { &system_view, context }; + MessageHandlerRegistration message_handler_display_sleep { + Message::ID::DisplaySleep, + [&event_dispatcher](const Message* const) { + event_dispatcher.set_display_sleep(true); + } + }; + + event_dispatcher.run(); +} + +int main(void) { + if( portapack::init() ) { + portapack::display.init(); + + sdcStart(&SDCD1, nullptr); + + controls_init(); + lcd_frame_sync_configure(); + rtc_interrupt_enable(); + + event_loop(); + + sdcDisconnect(&SDCD1); + sdcStop(&SDCD1); + + portapack::shutdown(); + } + + m4_init(portapack::spi_flash::image_tag_hackrf, portapack::memory::map::m4_code_hackrf); + m0_halt(); + + return 0; +} diff --git a/firmware/application/modems.cpp b/firmware/application/protocols/modems.cpp similarity index 100% rename from firmware/application/modems.cpp rename to firmware/application/protocols/modems.cpp diff --git a/firmware/application/modems.hpp b/firmware/application/protocols/modems.hpp similarity index 100% rename from firmware/application/modems.hpp rename to firmware/application/protocols/modems.hpp diff --git a/firmware/application/radio.cpp b/firmware/application/radio.cpp index 6c6e556b..60981c70 100644 --- a/firmware/application/radio.cpp +++ b/firmware/application/radio.cpp @@ -108,6 +108,9 @@ void set_direction(const rf::Direction new_direction) { /* TODO: Refactor all the various "Direction" enumerations into one. */ /* TODO: Only make changes if direction changes, but beware of clock enabling. */ + // Hack to fix the CPLD (clocking ?) bug: toggle CPLD SRAM overlay depending on new direction + // Use CPLD's EEPROM config when transmitting + // Use the SRAM overlay when receiving if (direction != new_direction) { if (new_direction == rf::Direction::Transmit) { hackrf::cpld::init_from_eeprom(); diff --git a/firmware/application/ui_alphanum.cpp b/firmware/application/ui/ui_alphanum.cpp similarity index 100% rename from firmware/application/ui_alphanum.cpp rename to firmware/application/ui/ui_alphanum.cpp diff --git a/firmware/application/ui_alphanum.hpp b/firmware/application/ui/ui_alphanum.hpp similarity index 100% rename from firmware/application/ui_alphanum.hpp rename to firmware/application/ui/ui_alphanum.hpp diff --git a/firmware/application/ui_audio.cpp b/firmware/application/ui/ui_audio.cpp similarity index 100% rename from firmware/application/ui_audio.cpp rename to firmware/application/ui/ui_audio.cpp diff --git a/firmware/application/ui_audio.hpp b/firmware/application/ui/ui_audio.hpp similarity index 100% rename from firmware/application/ui_audio.hpp rename to firmware/application/ui/ui_audio.hpp diff --git a/firmware/application/ui_channel.cpp b/firmware/application/ui/ui_channel.cpp similarity index 100% rename from firmware/application/ui_channel.cpp rename to firmware/application/ui/ui_channel.cpp diff --git a/firmware/application/ui_channel.hpp b/firmware/application/ui/ui_channel.hpp similarity index 100% rename from firmware/application/ui_channel.hpp rename to firmware/application/ui/ui_channel.hpp diff --git a/firmware/application/ui_font_fixed_8x16.cpp b/firmware/application/ui/ui_font_fixed_8x16.cpp similarity index 100% rename from firmware/application/ui_font_fixed_8x16.cpp rename to firmware/application/ui/ui_font_fixed_8x16.cpp diff --git a/firmware/application/ui_font_fixed_8x16.hpp b/firmware/application/ui/ui_font_fixed_8x16.hpp similarity index 100% rename from firmware/application/ui_font_fixed_8x16.hpp rename to firmware/application/ui/ui_font_fixed_8x16.hpp diff --git a/firmware/application/ui_geomap.cpp b/firmware/application/ui/ui_geomap.cpp similarity index 100% rename from firmware/application/ui_geomap.cpp rename to firmware/application/ui/ui_geomap.cpp diff --git a/firmware/application/ui_geomap.hpp b/firmware/application/ui/ui_geomap.hpp similarity index 100% rename from firmware/application/ui_geomap.hpp rename to firmware/application/ui/ui_geomap.hpp diff --git a/firmware/application/ui_menu.cpp b/firmware/application/ui/ui_menu.cpp similarity index 100% rename from firmware/application/ui_menu.cpp rename to firmware/application/ui/ui_menu.cpp diff --git a/firmware/application/ui_menu.hpp b/firmware/application/ui/ui_menu.hpp similarity index 100% rename from firmware/application/ui_menu.hpp rename to firmware/application/ui/ui_menu.hpp diff --git a/firmware/application/ui_receiver.cpp b/firmware/application/ui/ui_receiver.cpp similarity index 100% rename from firmware/application/ui_receiver.cpp rename to firmware/application/ui/ui_receiver.cpp diff --git a/firmware/application/ui_receiver.hpp b/firmware/application/ui/ui_receiver.hpp similarity index 100% rename from firmware/application/ui_receiver.hpp rename to firmware/application/ui/ui_receiver.hpp diff --git a/firmware/application/ui_rssi.cpp b/firmware/application/ui/ui_rssi.cpp similarity index 100% rename from firmware/application/ui_rssi.cpp rename to firmware/application/ui/ui_rssi.cpp diff --git a/firmware/application/ui_rssi.hpp b/firmware/application/ui/ui_rssi.hpp similarity index 100% rename from firmware/application/ui_rssi.hpp rename to firmware/application/ui/ui_rssi.hpp diff --git a/firmware/application/ui_spectrum.cpp b/firmware/application/ui/ui_spectrum.cpp similarity index 100% rename from firmware/application/ui_spectrum.cpp rename to firmware/application/ui/ui_spectrum.cpp diff --git a/firmware/application/ui_spectrum.hpp b/firmware/application/ui/ui_spectrum.hpp similarity index 100% rename from firmware/application/ui_spectrum.hpp rename to firmware/application/ui/ui_spectrum.hpp diff --git a/firmware/application/ui_tabview.cpp b/firmware/application/ui/ui_tabview.cpp similarity index 100% rename from firmware/application/ui_tabview.cpp rename to firmware/application/ui/ui_tabview.cpp diff --git a/firmware/application/ui_tabview.hpp b/firmware/application/ui/ui_tabview.hpp similarity index 100% rename from firmware/application/ui_tabview.hpp rename to firmware/application/ui/ui_tabview.hpp diff --git a/firmware/application/ui_textentry.cpp b/firmware/application/ui/ui_textentry.cpp similarity index 100% rename from firmware/application/ui_textentry.cpp rename to firmware/application/ui/ui_textentry.cpp diff --git a/firmware/application/ui_textentry.hpp b/firmware/application/ui/ui_textentry.hpp similarity index 100% rename from firmware/application/ui_textentry.hpp rename to firmware/application/ui/ui_textentry.hpp diff --git a/firmware/application/ui_transmitter.cpp b/firmware/application/ui/ui_transmitter.cpp similarity index 100% rename from firmware/application/ui_transmitter.cpp rename to firmware/application/ui/ui_transmitter.cpp diff --git a/firmware/application/ui_transmitter.hpp b/firmware/application/ui/ui_transmitter.hpp similarity index 100% rename from firmware/application/ui_transmitter.hpp rename to firmware/application/ui/ui_transmitter.hpp diff --git a/firmware/application/ui_audiotx.cpp b/firmware/application/ui_audiotx.cpp deleted file mode 100644 index 20bf4b08..00000000 --- a/firmware/application/ui_audiotx.cpp +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc. - * Copyright (C) 2016 Furrtek - * - * This file is part of PortaPack. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#include "ui_mictx.hpp" - -#include "baseband_api.hpp" -#include "hackrf_gpio.hpp" -#include "audio.hpp" -#include "portapack.hpp" -#include "pins.hpp" -#include "string_format.hpp" -#include "irq_controls.hpp" -#include "portapack_shared_memory.hpp" - -#include - -using namespace ctcss; -using namespace portapack; -using namespace hackrf::one; - -namespace ui { - -void AudioTXView::focus() { - field_frequency.focus(); -} - -void AudioTXView::update_vumeter() { - vumeter.set_value(audio_level); -} - -void AudioTXView::set_tx(bool enable) { - uint32_t ctcss_index; - bool ctcss_enabled; - - if (enable) { - ctcss_index = options_ctcss.selected_index(); - - if (ctcss_index) { - ctcss_enabled = true; - ctcss_index--; - } else - ctcss_enabled = false; - - baseband::set_audiotx_data( - 1536000U / 20, // 20Hz level update - transmitter_model.bandwidth(), - mic_gain_x10, - ctcss_enabled, - (uint32_t)((ctcss_tones[ctcss_index].frequency / 1536000.0) * 0xFFFFFFFFULL) - ); - gpio_tx.write(1); - led_tx.on(); - transmitting = true; - } else { - baseband::set_audiotx_data( - 1536000U / 20, // 20Hz level update - 0, // BW 0 = TX off - mic_gain_x10, - false, // Ignore CTCSS - 0 - ); - gpio_tx.write(0); - led_tx.off(); - transmitting = false; - } -} - -void AudioTXView::do_timing() { - if (va_enabled) { - if (!transmitting) { - // Attack - if (audio_level >= va_level) { - if ((attack_timer >> 8) >= attack_ms) { - decay_timer = 0; - attack_timer = 0; - set_tx(true); - } else { - attack_timer += ((256 * 1000) / 60); // 1 frame @ 60fps in ms .8 fixed point - } - } else { - attack_timer = 0; - } - } else { - // Decay - if (audio_level < va_level) { - if ((decay_timer >> 8) >= decay_ms) { - decay_timer = 0; - attack_timer = 0; - set_tx(false); - } else { - decay_timer += ((256 * 1000) / 60); // 1 frame @ 60fps in ms .8 fixed point - } - } else { - decay_timer = 0; - } - } - } else { - // PTT disable :( - const auto switches_state = get_switches_state(); - if (!switches_state[1]) // Left button - set_tx(false); - } -} - -void AudioTXView::on_tuning_frequency_changed(rf::Frequency f) { - transmitter_model.set_tuning_frequency(f); -} - -AudioTXView::AudioTXView( - NavigationView& nav -) -{ - pins[P6_2].mode(3); // I2S0_RX_SDA ! - - baseband::run_image(portapack::spi_flash::image_tag_mic_tx); - - add_children({ - &labels, - &vumeter, - &options_gain, - &check_va, - &field_va_level, - &field_va_attack, - &field_va_decay, - &field_bw, - &field_frequency, - &options_ctcss, - //&check_rogerbeep, - &text_ptt, - &button_exit - }); - - ctcss_populate(options_ctcss); - options_ctcss.set_selected_index(0); - - options_gain.on_change = [this](size_t, int32_t v) { - mic_gain_x10 = v; - }; - options_gain.set_selected_index(1); // x1.0 - - field_frequency.set_value(transmitter_model.tuning_frequency()); - field_frequency.set_step(receiver_model.frequency_step()); - field_frequency.on_change = [this](rf::Frequency f) { - this->on_tuning_frequency_changed(f); - }; - field_frequency.on_edit = [this, &nav]() { - // TODO: Provide separate modal method/scheme? - auto new_view = nav.push(receiver_model.tuning_frequency()); - new_view->on_changed = [this](rf::Frequency f) { - this->on_tuning_frequency_changed(f); - this->field_frequency.set_value(f); - }; - }; - - field_bw.on_change = [this](uint32_t v) { - transmitter_model.set_bandwidth(v * 1000); - }; - field_bw.set_value(10); - - check_va.on_select = [this](Checkbox&, bool v) { - va_enabled = v; - text_ptt.hidden(v); - set_dirty(); - }; - check_va.set_value(false); - - field_va_level.on_change = [this](int32_t v) { - va_level = v; - vumeter.set_mark(v); - }; - field_va_level.set_value(40); - - field_va_attack.on_change = [this](int32_t v) { - attack_ms = v; - }; - field_va_attack.set_value(500); - - field_va_decay.on_change = [this](int32_t v) { - decay_ms = v; - }; - field_va_decay.set_value(2000); - - button_exit.on_select = [&nav](Button&){ - nav.pop(); - }; - - // Run baseband as soon as the app starts to get audio levels without transmitting (rf amp off) - transmitter_model.set_sampling_rate(1536000U); - transmitter_model.set_rf_amp(true); - transmitter_model.set_baseband_bandwidth(1750000); - transmitter_model.enable(); - - set_tx(false); - - audio::set_rate(audio::Rate::Hz_24000); - audio::input::start(); -} - -AudioTXView::~AudioTXView() { - transmitter_model.disable(); - baseband::shutdown(); -} - -} diff --git a/firmware/application/ui_audiotx.hpp b/firmware/application/ui_audiotx.hpp deleted file mode 100644 index 119b99b3..00000000 --- a/firmware/application/ui_audiotx.hpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc. - * Copyright (C) 2016 Furrtek - * - * This file is part of PortaPack. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __UI_AUDIOTX_H__ -#define __UI_AUDIOTX_H__ - -#include "ui.hpp" -#include "hal.h" -#include "ui_widget.hpp" -#include "ui_navigation.hpp" -#include "ui_font_fixed_8x16.hpp" -#include "message.hpp" -#include "ui_receiver.hpp" -#include "transmitter_model.hpp" -#include "ctcss.hpp" - -namespace ui { - -class AudioTXView : public View { -public: - AudioTXView(NavigationView& nav); - ~AudioTXView(); - - AudioTXView(const AudioTXView&) = delete; - AudioTXView(AudioTXView&&) = delete; - AudioTXView& operator=(const AudioTXView&) = delete; - AudioTXView& operator=(AudioTXView&&) = delete; - - void focus() override; - - // PTT: Enable through KeyEvent (only works with presses), disable by polling :( - bool on_key(const KeyEvent key) { - if ((key == KeyEvent::Left) && (!va_enabled)) { - set_tx(true); - return true; - } else - return false; - }; - - std::string title() const override { return "Microphone TX"; }; - -private: - void update_vumeter(); - void do_timing(); - void set_tx(bool enable); - void on_tuning_frequency_changed(rf::Frequency f); - void on_ctcss_changed(uint32_t v); - - bool transmitting { false }; - bool va_enabled { }; - uint32_t mic_gain_x10 { }; - uint32_t audio_level { 0 }; - uint32_t va_level { }; - uint32_t attack_ms { }; - uint32_t decay_ms { }; - uint32_t attack_timer { 0 }; - uint32_t decay_timer { 0 }; - - Labels labels { - { { 7 * 8, 1 * 8 }, "Mic. gain:", Color::light_grey() }, - { { 7 * 8, 4 * 8 }, "Voice activation:", Color::light_grey() }, - { { 8 * 8, 9 * 8 }, "Level: /255", Color::light_grey() }, - { { 8 * 8, 11 * 8 }, "Attack: ms", Color::light_grey() }, - { { 8 * 8, 13 * 8 }, "Decay: ms", Color::light_grey() }, - { { 7 * 8, 17 * 8 }, "Bandwidth: kHz", Color::light_grey() }, - { { 7 * 8, 19 * 8 }, "Frequency:", Color::light_grey() }, - { { 11 * 8, 21 * 8 }, "CTCSS:", Color::light_grey() } - }; - - VuMeter vumeter { - { 1 * 8, 2 * 8, 5 * 8, 26 * 8 }, - 16 - }; - - OptionsField options_gain { - { 17 * 8, 1 * 8 }, - 4, - { - { "x0.5", 5 }, - { "x1.0", 10 }, - { "x1.5", 15 }, - { "x2.0", 20 } - } - }; - - Checkbox check_va { - { 8 * 8, 6 * 8 }, - 7, - "Enabled", - false - }; - - NumberField field_va_level { - { 14 * 8, 9 * 8 }, - 3, - { 0, 255 }, - 2, - ' ' - }; - NumberField field_va_attack { - { 15 * 8, 11 * 8 }, - 3, - { 0, 999 }, - 20, - ' ' - }; - NumberField field_va_decay { - { 14 * 8, 13 * 8 }, - 4, - { 0, 9999 }, - 100, - ' ' - }; - - NumberField field_bw { - { 17 * 8, 17 * 8 }, - 3, - { 0, 150 }, - 1, - ' ' - }; - FrequencyField field_frequency { - { 17 * 8, 19 * 8 }, - }; - - OptionsField options_ctcss { - { 17 * 8, 21 * 8 }, - 8, - { } - }; - - Checkbox check_rogerbeep { - { 8 * 8, 23 * 8 }, - 10, - "Roger beep", - false - }; - - Text text_ptt { - { 7 * 8, 28 * 8, 16 * 8, 16 }, - "PTT: LEFT BUTTON" - }; - - Button button_exit { - { 18 * 8, 32 * 8, 10 * 8, 40 }, - "Exit" - }; - - MessageHandlerRegistration message_handler_lcd_sync { - Message::ID::DisplayFrameSync, - [this](const Message* const) { - this->update_vumeter(); - this->do_timing(); - } - }; - - MessageHandlerRegistration message_handler_audio_level { - Message::ID::AudioLevel, - [this](const Message* const p) { - const auto message = static_cast(p); - this->audio_level = message->value; - } - }; -}; - -} /* namespace ui */ - -#endif/*__UI_AUDIOTX_H__*/ diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index 82a5af20..0e9a2a87 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -76,6 +76,8 @@ #include "file.hpp" #include "png_writer.hpp" +using portapack::receiver_model; + namespace ui { /* SystemStatusView ******************************************************/ @@ -95,19 +97,20 @@ SystemStatusView::SystemStatusView() { //&button_textentry, &button_camera, &button_sleep, + &image_bias_tee, &sd_card_status_view, }); button_back.id = -1; // Special ID used by FocusManager title.set_style(&style_systemstatus); + if (portapack::persistent_memory::stealth_mode()) + button_stealth.set_foreground(ui::Color::green()); + /*if (!portapack::persistent_memory::ui_config_textentry()) button_textentry.set_bitmap(&bitmap_icon_keyboard); else button_textentry.set_bitmap(&bitmap_icon_unistroke);*/ - - if (portapack::persistent_memory::stealth_mode()) - button_stealth.set_foreground(ui::Color::green()); button_back.on_select = [this](ImageButton&){ if (this->on_back) @@ -132,6 +135,16 @@ SystemStatusView::SystemStatusView() { }; } +void SystemStatusView::refresh() { + if (receiver_model.antenna_bias()) { + image_bias_tee.set_bitmap(&bitmap_icon_biast_on); + image_bias_tee.set_foreground(ui::Color::green()); + } else { + image_bias_tee.set_bitmap(&bitmap_icon_biast_off); + image_bias_tee.set_foreground(ui::Color::light_grey()); + } +} + void SystemStatusView::set_back_enabled(bool new_value) { button_back.set_foreground(new_value ? Color::white() : Color::dark_grey()); button_back.set_focusable(new_value); diff --git a/firmware/application/ui_navigation.hpp b/firmware/application/ui_navigation.hpp index f2504e05..3c843404 100644 --- a/firmware/application/ui_navigation.hpp +++ b/firmware/application/ui_navigation.hpp @@ -78,12 +78,12 @@ private: }; Text title { - { 20, 0, 16 * 8, 1 * 16 }, + { 20, 0, 17 * 8, 1 * 16 }, default_title, }; ImageButton button_stealth { - { 170, 0, 2 * 8, 1 * 16 }, + { 20 * 8, 0, 2 * 8, 1 * 16 }, &bitmap_icon_stealth, Color::light_grey(), Color::dark_grey() @@ -97,19 +97,26 @@ private: };*/ ImageButton button_camera { - { 188, 0, 2 * 8, 1 * 16 }, + { 22 * 8, 0, 2 * 8, 1 * 16 }, &bitmap_icon_camera, Color::white(), Color::dark_grey() }; ImageButton button_sleep { - { 206, 0, 2 * 8, 1 * 16 }, + { 24 * 8, 0, 2 * 8, 1 * 16 }, &bitmap_icon_sleep, Color::white(), Color::dark_grey() }; - + + Image image_bias_tee { + { 26 * 8, 0, 2 * 8, 1 * 16 }, + &bitmap_icon_biast_off, + Color::light_grey(), + Color::dark_grey() + }; + SDCardStatusView sd_card_status_view { { 28 * 8, 0 * 16, 2 * 8, 1 * 16 } }; @@ -117,6 +124,15 @@ private: void on_stealth(); //void on_textentry(); void on_camera(); + void refresh(); + + MessageHandlerRegistration message_handler_refresh { + Message::ID::StatusRefresh, + [this](const Message* const p) { + (void)p; + this->refresh(); + } + }; }; class NavigationView : public View { @@ -166,8 +182,8 @@ public: private: Text text_info { - { 5 * 8, 284, 20 * 8, 16 }, - "shrbrnd-sig-ftk 2017" + { 76, 284, 20 * 8, 16 }, + "GIT " GIT_REVISION }; Button button_done { diff --git a/firmware/common/message.hpp b/firmware/common/message.hpp index ff9866ee..575922c3 100644 --- a/firmware/common/message.hpp +++ b/firmware/common/message.hpp @@ -74,6 +74,7 @@ public: ReplayConfig = 20, ReplayThreadDone = 21, AFSKRxConfigure = 22, + StatusRefresh = 23, TXProgress = 30, Retune = 31, @@ -219,6 +220,14 @@ public: } }; +class StatusRefreshMessage : public Message { +public: + constexpr StatusRefreshMessage( + ) : Message { ID::StatusRefresh } + { + } +}; + class AudioStatisticsMessage : public Message { public: constexpr AudioStatisticsMessage( diff --git a/firmware/graphics/icon_audiotx.png b/firmware/graphics/icon_audiotx.png_unused similarity index 100% rename from firmware/graphics/icon_audiotx.png rename to firmware/graphics/icon_audiotx.png_unused diff --git a/firmware/graphics/icon_biast_off.png b/firmware/graphics/icon_biast_off.png new file mode 100644 index 0000000000000000000000000000000000000000..092b60731989a702bc0c4fe3333908f5848dcfcb GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s796VhdLo9lefA}jVEV#kI z#@6!+aefn7n6(Q|Rcf)lJF?Tkk^Iuu$durf3J YnYt+^qbUCj0|Nttr>mdKI;Vst0IBmN^8f$< literal 0 HcmV?d00001 diff --git a/firmware/graphics/icon_biast_on.png b/firmware/graphics/icon_biast_on.png new file mode 100644 index 0000000000000000000000000000000000000000..595ee4e2e432783c0f38b7270d6fb23d8b29dd2d GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s70zF+ELo9l?208LEC~!Rb zKYv^HR+cMIpLx2pDYUg3GB%v3V%~U-rRhmbhQ>vfq-EU6YO~^50;6yC7pY5o+_@PT7#KWV{an^LB{Ts5I6yCF literal 0 HcmV?d00001 diff --git a/firmware/graphics/icon_keyboard.png b/firmware/graphics/icon_keyboard.png_unused similarity index 100% rename from firmware/graphics/icon_keyboard.png rename to firmware/graphics/icon_keyboard.png_unused diff --git a/firmware/graphics/icon_nordic.png b/firmware/graphics/icon_nordic.png_unused similarity index 100% rename from firmware/graphics/icon_nordic.png rename to firmware/graphics/icon_nordic.png_unused diff --git a/firmware/graphics/icon_numbers.png b/firmware/graphics/icon_numbers.png_unused similarity index 100% rename from firmware/graphics/icon_numbers.png rename to firmware/graphics/icon_numbers.png_unused diff --git a/firmware/graphics/icon_unistroke.png b/firmware/graphics/icon_unistroke.png_unused similarity index 100% rename from firmware/graphics/icon_unistroke.png rename to firmware/graphics/icon_unistroke.png_unused diff --git a/firmware/graphics/icon_whistle.png b/firmware/graphics/icon_whistle.png_unused similarity index 100% rename from firmware/graphics/icon_whistle.png rename to firmware/graphics/icon_whistle.png_unused