mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-30 01:27:24 -04:00
Added Sorting to BLE app (#1527)
* First BLE work * Adding new fsk proc WIP * Reverting ble stuff * Initial compile working * more work. * Adding waterfall for debug * more edits to debug * Work to get widgets to show. * cleanup before attempting diff fsk modulation method * Temporary debug to learn how decimation scales. * Tab view for console and spectrum. Spectrum still not working right. * Fixed spectrum offset. * Added audio sampling rate increments to freqman * Added overriding range for frequency field and working off deviation * BLE cleanup. Got PDU parsing. * Parsing CRC * forgot : * Removing AA again because cluttering UI * fix compile * attempt at throttling. * WIP changes. * Decimating by 4 to handle issue with overloading. * Attempt to parse MAC still needs work. * Small fixes. MAC still wrong. * Fixed invalid indexing on Symbols. * List view of BLE Mac Addresses * Added Channel Option and improved GUI header. * renaming to dB and fixing some warnings. * Advertisements only. * Initial cut of BLE Advertisement scan app. * Copyrights * formatting correctly in association to clang13 * Fixing warning and hiding fsk rx. * spacing * Removing some cmake install files that weren't suppose to be there. * missed some. * Added name to about. * Edits for PR review pt.1 * Refactor ORing with 0 doesn't make sense. * remove parenthesis * More PR Review changes. * Fix compiler error. * PR Review edits. * PR review changes. * Fixes. * Unneeded ; * Update ui_about_simple.cpp * Disabling frequency stepping. * removing unused label * Fixing something that got messed up in merge? * removing file that got added. * editing labels. * Added sort functionality. * removed unused code. --------- Co-authored-by: jLynx <admin@jlynx.net>
This commit is contained in:
parent
80bfcd5eb1
commit
15c338e5b3
5 changed files with 114 additions and 45 deletions
|
@ -88,6 +88,13 @@ static std::pair<typename ContainerType::const_iterator, typename ContainerType:
|
|||
return {start, end};
|
||||
}
|
||||
|
||||
template <typename ContainerType, typename KeySelector, typename SortOrder>
|
||||
void sortEntriesBy(ContainerType& entries, KeySelector keySelector, SortOrder ascending) {
|
||||
entries.sort([keySelector, ascending](const auto& a, const auto& b) {
|
||||
return ascending ? keySelector(a) < keySelector(b) : keySelector(a) > keySelector(b);
|
||||
});
|
||||
}
|
||||
|
||||
namespace ui {
|
||||
|
||||
using RecentEntriesColumn = std::pair<std::string, size_t>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue