First iteration of menu cleanup

* Broke up the code into more general functions instead of duplicating code
 * Made stuff const and removed variables no longer used
 * Use defines for menu button values
 * Changed the order or things to avoid forward declarations
 * Use array lookup instead of switch-case on some menu options
 * Adjust menu functionification
 * Cleaned up sensor rendering
This commit is contained in:
Mikael Degerfält 2019-06-09 16:47:13 +02:00
parent 435ad106d8
commit e362546e3c
6 changed files with 831 additions and 1428 deletions

View file

@ -40,25 +40,20 @@ extern byte currentRotation;
extern int rotations[4];
extern int parallel; // semitones
extern int breathLoLimit;
extern int breathHiLimit;
extern int portamLoLimit;
extern int portamHiLimit;
extern int pitchbLoLimit;
extern int pitchbHiLimit;
extern int extracLoLimit;
extern int extracHiLimit;
extern int ctouchLoLimit;
extern int ctouchHiLimit;
extern int ttouchLoLimit;
extern int ttouchHiLimit;
extern const int breathLoLimit;
extern const int breathHiLimit;
extern const int portamLoLimit;
extern const int portamHiLimit;
extern const int pitchbLoLimit;
extern const int pitchbHiLimit;
extern const int extracLoLimit;
extern const int extracHiLimit;
extern const int ctouchLoLimit;
extern const int ctouchHiLimit;
extern const int ttouchLoLimit;
extern const int ttouchHiLimit;
extern int touch_Thr;
extern int breathStep;
extern int portamStep;
extern int pitchbStep;
extern int extracStep;
extern int ctouchStep;
extern unsigned long cursorBlinkTime; // the last time the cursor was toggled