mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 08:07:37 +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:
@@ -34,6 +34,10 @@ using Dim = int16_t;
|
||||
constexpr uint16_t screen_width = 240;
|
||||
constexpr uint16_t screen_height = 320;
|
||||
|
||||
/* Dimensions for the default font character. */
|
||||
constexpr uint16_t char_width = 8;
|
||||
constexpr uint16_t char_height = 16;
|
||||
|
||||
struct Color {
|
||||
uint16_t v; // rrrrrGGGGGGbbbbb
|
||||
|
||||
@@ -328,7 +332,7 @@ struct Bitmap {
|
||||
const uint8_t* const data;
|
||||
};
|
||||
|
||||
enum class KeyEvent {
|
||||
enum class KeyEvent : uint8_t {
|
||||
/* Ordinals map to bit positions reported by CPLD */
|
||||
Right = 0,
|
||||
Left = 1,
|
||||
@@ -356,6 +360,11 @@ Point polar_to_point(float angle, uint32_t distance);
|
||||
|
||||
Point fast_polar_to_point(int32_t angle, uint32_t distance);
|
||||
|
||||
/* Default font glyph size. */
|
||||
constexpr Size char_size{char_width, char_height};
|
||||
|
||||
bool key_is_long_pressed(KeyEvent key);
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
#endif /*__UI_H__*/
|
||||
|
Reference in New Issue
Block a user