Refactored for teensy 4.0, xEvi hardware
- Switched to platformio, ino -> cpp - MPRLS for pressure sensor - Added basic ICM support - Removed widi, battery, other features not supported in xEvi - Removed legacy options/processing - Added LED strip support - Added encoder support - Reworked menu code to use encoders/be more flexible
This commit is contained in:
parent
c58c3f9e46
commit
01d193c9b3
92 changed files with 69119 additions and 73272 deletions
44
NuEVI/src/menu.h
Normal file
44
NuEVI/src/menu.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __MENU_H
|
||||
#define __MENU_H
|
||||
|
||||
#include "wiring.h"
|
||||
|
||||
#define MENU_ROW_HEIGHT 9
|
||||
#define MENU_HEADER_OFFSET 12
|
||||
#define MENU_NUM_ROWS 6
|
||||
#define ADJUST_NUM_ROWS 3
|
||||
#define ADJUST_ROW_HEIGHT 21
|
||||
|
||||
extern const unsigned long debounceDelay; // the debounce time; increase if the output flickers
|
||||
extern const unsigned long buttonRepeatInterval;
|
||||
extern const unsigned long buttonRepeatDelay;
|
||||
extern const unsigned long cursorBlinkInterval; // the cursor blink toggle interval time
|
||||
extern const unsigned long patchViewTimeUp; // ms until patch view shuts off
|
||||
extern const unsigned long menuTimeUp; // menu shuts off after one minute of button inactivity
|
||||
|
||||
struct InputState {
|
||||
bool changed = false;
|
||||
bool btnMenu = false;
|
||||
bool btnVal1 = false;
|
||||
bool btnVal2 = false;
|
||||
bool btnPreset = false;
|
||||
int knobMenu = 0;
|
||||
int knobVal1 = 0;
|
||||
int knobVal2 = 0;
|
||||
int knobPreset = 0;
|
||||
};
|
||||
|
||||
struct MenuScreen {
|
||||
MenuScreen() {};
|
||||
virtual const char *title() { return ""; };
|
||||
virtual void update(InputState input, bool redraw) {};
|
||||
virtual ~MenuScreen() {};
|
||||
};
|
||||
extern const MenuScreen adjustMenu;
|
||||
|
||||
void initDisplay();
|
||||
void showVersion();
|
||||
void displayError(const char *error);
|
||||
void handleMenu(bool draw);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue