mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 05:59:51 +00: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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user