mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 17:17:28 -04:00
Display CTCSS tone freq in Audio, Recon, and Level apps (#1231)
* Generate CTCSS messages at fixed rate regardless of tone freq * Generate CTCSS messages at fixed rate regardless of tone freq * Function for generating CTCSS description strings * Function for generating CTCSS description strings * Increase width of CTCSS text to include tone freq * Increase width of CTCSS text field to include frequency * Use CTCSS tone freq when saving HAM freqs to freq file * Use function in tone_key.cpp for displaying CTCSS string * Use function in tone_key.cpp for CTCSS descr strings * Use function in tone_key.cpp for CTCSS descr strings * Clang test * Clang * Clang * Support for reading CTCSS tones from FreqMan file * Clang * Clean up and eliminate floating point * Clean up and eliminate floating point * Corrected CTCSS field length * Corrected CTCSS field length * Clang
This commit is contained in:
parent
44dd8fd083
commit
80c769b97d
12 changed files with 174 additions and 126 deletions
|
@ -30,17 +30,22 @@ using namespace ui;
|
|||
|
||||
namespace tonekey {
|
||||
|
||||
#define TONE_FREQ_TOLERANCE_CENTIHZ (4 * 100)
|
||||
#define TONE_DISPLAY_TOGGLE_COUNTER 3
|
||||
#define F2Ix100(x) (int32_t)(x * 100.0)
|
||||
|
||||
typedef int32_t tone_index;
|
||||
|
||||
using tone_key_t = std::vector<std::pair<std::string, float>>;
|
||||
using tone_key_t = std::vector<std::pair<std::string, uint32_t>>;
|
||||
|
||||
extern const tone_key_t tone_keys;
|
||||
|
||||
void tone_keys_populate(OptionsField& field);
|
||||
float tone_key_frequency(const tone_index index);
|
||||
float tone_key_frequency(tone_index index);
|
||||
|
||||
std::string tone_key_string(const tone_index index);
|
||||
std::string tone_key_string_by_value(uint32_t value);
|
||||
std::string tone_key_string(tone_index index);
|
||||
std::string tone_key_value_string(tone_index index);
|
||||
std::string tone_key_string_by_value(uint32_t value, size_t max_length);
|
||||
tone_index tone_key_index_by_value(uint32_t value);
|
||||
|
||||
} // namespace tonekey
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue