mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-08 20:01:53 +00:00
Refactor freqman_db parsing (#1244)
* WIP freqman changes/memory perf/stash * Split ui tone_key function out for testing. * Add more tests and fix bugs. * Use default max_entries in recond * Set limit back to 90 for now
This commit is contained in:
@@ -23,10 +23,9 @@
|
||||
#ifndef __TONE_KEY_H_
|
||||
#define __TONE_KEY_H_
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
|
||||
using namespace ui;
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace tonekey {
|
||||
|
||||
@@ -34,15 +33,14 @@ namespace tonekey {
|
||||
#define TONE_DISPLAY_TOGGLE_COUNTER 3
|
||||
#define F2Ix100(x) (int32_t)(x * 100.0)
|
||||
|
||||
typedef int32_t tone_index;
|
||||
|
||||
using tone_index = int32_t;
|
||||
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(tone_index index);
|
||||
|
||||
std::string fx100_string(uint32_t f);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user