mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-30 01:27:24 -04:00
Recon/FreqMan set limit in load_freqman_file_ex (#1098)
* changed a hardcoded value by a define, changed the order for the database clean so it happens first, changed load_freqman_file_ex so it can take a max num of freqs as a parameter with a default to FREQMAN_MAX_PER_FILE * added a swap and a set_db to clear as much as possible before the loading of a category * added a define for Recon max per files * remove unneeded comment
This commit is contained in:
parent
2fd3bf0136
commit
f66f438487
5 changed files with 23 additions and 22 deletions
|
@ -36,6 +36,7 @@
|
|||
#define FREQMAN_MAX_PER_FILE 60 // Maximum of entries we can read. This is a hardware limit
|
||||
// It was tested and lowered to leave a bit of space to the caller
|
||||
#define FREQMAN_MAX_PER_FILE_STR "60" // STRING OF FREQMAN_MAX_PER_FILE
|
||||
#define FREQMAN_READ_BUF_SIZE 96 // max freqman line size including desc is 90, +6 for a bit of space
|
||||
|
||||
using namespace ui;
|
||||
using namespace std;
|
||||
|
@ -96,7 +97,7 @@ using freqman_db = std::vector<freqman_entry>;
|
|||
|
||||
std::vector<std::string> get_freqman_files();
|
||||
bool load_freqman_file(std::string& file_stem, freqman_db& db);
|
||||
bool load_freqman_file_ex(std::string& file_stem, freqman_db& db, bool load_freqs, bool load_ranges, bool load_hamradios);
|
||||
bool load_freqman_file_ex(std::string& file_stem, freqman_db& db, bool load_freqs, bool load_ranges, bool load_hamradios, uint8_t limit);
|
||||
bool get_freq_string(freqman_entry& entry, std::string& item_string);
|
||||
bool save_freqman_file(std::string& file_stem, freqman_db& db);
|
||||
bool create_freqman_file(std::string& file_stem, File& freqman_file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue