mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-18 07:12:03 +00:00
Use a common function for finding Tone Key index from received Tone Frequency (#1218)
* Common function for finding CTCSS tone index from freq
This commit is contained in:
@@ -30,7 +30,7 @@ using namespace ui;
|
||||
|
||||
namespace tonekey {
|
||||
|
||||
typedef int16_t tone_index;
|
||||
typedef int32_t tone_index;
|
||||
|
||||
using tone_key_t = std::vector<std::pair<std::string, float>>;
|
||||
|
||||
@@ -40,8 +40,8 @@ void tone_keys_populate(OptionsField& field);
|
||||
float tone_key_frequency(const tone_index index);
|
||||
|
||||
std::string tone_key_string(const tone_index index);
|
||||
tone_index tone_key_index_by_string(char* str);
|
||||
// tone_index tone_key_index_by_value( int32_t freq );
|
||||
std::string tone_key_string_by_value(uint32_t value);
|
||||
tone_index tone_key_index_by_value(uint32_t value);
|
||||
|
||||
} // namespace tonekey
|
||||
|
||||
|
Reference in New Issue
Block a user