mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-30 09:37:53 -04: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:
parent
60de625c37
commit
497ca3f934
30 changed files with 1206 additions and 705 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue