mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-12 01:29:29 +00:00
Added CTCSS in Soundboard
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#include "file.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
|
||||
class SoundBoardView : public View {
|
||||
public:
|
||||
SoundBoardView(NavigationView& nav);
|
||||
@@ -72,6 +72,8 @@ private:
|
||||
sound sounds[100];
|
||||
uint8_t max_sound;
|
||||
uint8_t max_page;
|
||||
|
||||
uint32_t _ctcss_freq;
|
||||
|
||||
int8_t audio_buffer[1024];
|
||||
|
||||
@@ -107,6 +109,7 @@ private:
|
||||
void refresh_buttons(uint16_t id);
|
||||
void play_sound(uint16_t id);
|
||||
void prepare_audio();
|
||||
void on_ctcss_changed(uint32_t v);
|
||||
uint16_t fb_to_uint16(const std::string& fb);
|
||||
uint32_t fb_to_uint32(const std::string& fb);
|
||||
|
||||
@@ -119,7 +122,7 @@ private:
|
||||
};
|
||||
|
||||
NumberField number_bw {
|
||||
{ 13 * 8, 4 },
|
||||
{ 11 * 8, 4 },
|
||||
3,
|
||||
{1, 150},
|
||||
1,
|
||||
@@ -127,12 +130,71 @@ private:
|
||||
};
|
||||
|
||||
Text text_kHz {
|
||||
{ 16 * 8, 4, 3 * 8, 16 },
|
||||
{ 14 * 8, 4, 3 * 8, 16 },
|
||||
"kHz"
|
||||
};
|
||||
|
||||
OptionsField options_ctcss {
|
||||
{ 18 * 8, 4 },
|
||||
6,
|
||||
{
|
||||
{ "None ", 0 },
|
||||
{ "XZ 000", 67000 },
|
||||
{ "WZ 001", 69400 },
|
||||
{ "XA 039", 71900 },
|
||||
{ "WA 003", 74400 },
|
||||
{ "XB 004", 77000 },
|
||||
{ "WB 005", 79700 },
|
||||
{ "YZ 006", 82500 },
|
||||
{ "YA 007", 85400 },
|
||||
{ "YB 008", 88500 },
|
||||
{ "ZZ 009", 91500 },
|
||||
{ "ZA 010", 94800 },
|
||||
{ "ZB 011", 97400 },
|
||||
{ "1Z 012", 100000 },
|
||||
{ "1A 013", 103500 },
|
||||
{ "1B 014", 107200 },
|
||||
{ "2Z 015", 110900 },
|
||||
{ "2Z 016", 114800 },
|
||||
{ "2B 017", 118800 },
|
||||
{ "3Z 018", 123000 },
|
||||
{ "3A 019", 127300 },
|
||||
{ "3B 020", 131800 },
|
||||
{ "4Z 021", 136500 },
|
||||
{ "4A 022", 141300 },
|
||||
{ "4B 023", 146200 },
|
||||
{ "MIL ", 150000 },
|
||||
{ "5Z 024", 151400 },
|
||||
{ "5A 025", 156700 },
|
||||
{ "-- 040", 159800 },
|
||||
{ "5B 026", 162200 },
|
||||
{ "-- 041", 165500 },
|
||||
{ "6Z 027", 167900 },
|
||||
{ "-- 042", 171300 },
|
||||
{ "6A 028", 173800 },
|
||||
{ "-- 043", 177300 },
|
||||
{ "6B 029", 179900 },
|
||||
{ "-- 044", 183500 },
|
||||
{ "7Z 030", 186200 },
|
||||
{ "-- 045", 189900 },
|
||||
{ "7A 031", 192800 },
|
||||
{ "-- 046", 196600 },
|
||||
{ "-- 047", 199500 },
|
||||
{ "M1 032", 203500 },
|
||||
{ "8Z 048", 206500 },
|
||||
{ "M2 033", 210700 },
|
||||
{ "M3 034", 218100 },
|
||||
{ "M4 035", 225700 },
|
||||
{ "9Z 049", 229100 },
|
||||
{ "-- 036", 233600 },
|
||||
{ "-- 037", 241800 },
|
||||
{ "-- 038", 250300 },
|
||||
{ "0Z 050", 254100 }
|
||||
}
|
||||
};
|
||||
|
||||
Text text_page {
|
||||
{ 22 * 8, 4, 3 * 8, 16 },
|
||||
{ 25 * 8, 4, 3 * 8, 16 },
|
||||
"-/-"
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user