mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-25 15:20:31 -04:00
Digit Mode for frequency field (#1298)
* Remove 'auto' step mode * Support per-digit edits on the freq field. * Swizzle instead of raw accessor * Fix debug ui after swizzle
This commit is contained in:
parent
e2bca9aebb
commit
3514a9a608
11 changed files with 230 additions and 95 deletions
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "irq_controls.hpp"
|
||||
#include "sine_table.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
|
@ -102,4 +103,14 @@ Point fast_polar_to_point(int32_t angle, uint32_t distance) {
|
|||
(int16_sin_s4(((1 << 16) * (-angle - 90)) / 360) * distance) / (1 << 16));
|
||||
}
|
||||
|
||||
bool key_is_long_pressed(KeyEvent key) {
|
||||
if (key < KeyEvent::Back) {
|
||||
// TODO: this would make more sense as a flag on KeyEvent
|
||||
// passed up to the UI via event dispatch.
|
||||
return switch_is_long_pressed(static_cast<Switch>(key));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue