diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt index db2f2963..ed73b622 100644 --- a/firmware/CMakeLists.txt +++ b/firmware/CMakeLists.txt @@ -28,7 +28,7 @@ set(CHIBIOS_PORTAPACK ${PROJECT_SOURCE_DIR}/chibios-portapack) set(HACKRF_FIRMWARE_FILENAME hackrf_one_usb_ram.dfu) set(HACKRF_FIRMWARE_IMAGE ${PROJECT_SOURCE_DIR}/${HACKRF_FIRMWARE_FILENAME}) -set(HACKRF_CPLD_SVF_FILENAME hackrf_cpld_portapack.svf) +set(HACKRF_CPLD_SVF_FILENAME hackrf_cpld_default.svf) set(HACKRF_CPLD_SVF_PATH ${PROJECT_SOURCE_DIR}/${HACKRF_CPLD_SVF_FILENAME}) set(EXTRACT_CPLD_DATA ${PROJECT_SOURCE_DIR}/tools/extract_cpld_data.py) diff --git a/firmware/application/ui_soundboard.cpp b/firmware/application/ui_soundboard.cpp index b7d58739..36e51c9c 100644 --- a/firmware/application/ui_soundboard.cpp +++ b/firmware/application/ui_soundboard.cpp @@ -208,16 +208,16 @@ SoundBoardView::SoundBoardView( c = 0; for (auto& path : file_list) { if (reader->open(u"wav/" + path.native())) { - if (reader->channels() == 1) { + if ((reader->channels() == 1) && (reader->bits_per_sample() == 8)) { sounds[c].size = reader->data_size(); - sounds[c].sample_duration = reader->data_size() / (reader->bits_per_sample() / 8); + sounds[c].sample_duration = reader->data_size(); // / (reader->bits_per_sample() / 8); sounds[c].sample_rate = reader->sample_rate(); - if (reader->bits_per_sample() > 8) + /*if (reader->bits_per_sample() > 8) sounds[c].sixteenbit = true; else - sounds[c].sixteenbit = false; + sounds[c].sixteenbit = false;*/ sounds[c].ms_duration = reader->ms_duration(); - sounds[c].path = path; + sounds[c].path = u"wav/" + path.native(); c++; if (c == 105) break; // Limit to 105 files (5 pages) } @@ -233,7 +233,7 @@ SoundBoardView::SoundBoardView( &field_frequency, &number_bw, &text_kHz, - //&options_ctcss, + &options_ctcss, &text_page, &text_duration, &pbar, @@ -242,7 +242,7 @@ SoundBoardView::SoundBoardView( &button_exit }); - /*ctcss_options.emplace_back(std::make_pair("None", 0)); + ctcss_options.emplace_back(std::make_pair("None", 0)); for (c = 0; c < CTCSS_TONES_NB; c++) ctcss_options.emplace_back(std::make_pair(ctcss_tones[c].PL_code, c)); @@ -252,7 +252,7 @@ SoundBoardView::SoundBoardView( options_ctcss.on_change = [this](size_t, OptionsField::value_t v) { this->on_ctcss_changed(v); }; - options_ctcss.set_selected_index(0);*/ + options_ctcss.set_selected_index(0); const auto button_fn = [this](Button& button) { tx_mode = NORMAL; diff --git a/firmware/application/ui_soundboard.hpp b/firmware/application/ui_soundboard.hpp index dcf9798d..805f96d7 100644 --- a/firmware/application/ui_soundboard.hpp +++ b/firmware/application/ui_soundboard.hpp @@ -83,7 +83,7 @@ private: uint32_t _ctcss_freq { 0 }; - int8_t audio_buffer[1024]; + int8_t audio_buffer[2048]; Style style_a { .font = font::fixed_8x16, diff --git a/firmware/portapack-h1-havoc.bin b/firmware/portapack-h1-havoc.bin index d9607170..c57783fa 100644 Binary files a/firmware/portapack-h1-havoc.bin and b/firmware/portapack-h1-havoc.bin differ