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:
Brian Hrebec 2023-08-27 11:52:08 -05:00
parent c58c3f9e46
commit 01d193c9b3
92 changed files with 69119 additions and 73272 deletions

57
NuEVI/src/test.cpp Normal file
View file

@ -0,0 +1,57 @@
#include "hardware.h"
uint8_t oldButtons = 0;
uint16_t oldKeys = 0;
uint16_t oldUtil = 0;
bool plotCap = false;
void handleTestMode() {
uint8_t buttons = buttonState();
if (buttons != oldButtons) {
oldButtons = buttons;
Serial.print("Buttons:");
Serial.println(buttons, HEX);
}
for (int i = 0; i < 4; i++) {
int k = readKnob(i);
if (k != 0) {
Serial.print("Knob");
Serial.print(i);
Serial.print(":");
Serial.println(k);
}
}
uint16_t keys = keysTouched();
if (keys != oldKeys) {
Serial.print("Keys:");
Serial.println(keys, HEX);
}
uint16_t util = utilTouched();
if (util != oldUtil) {
Serial.print("Util:");
Serial.println(util, HEX);
}
if (buttons == 0x01) {
plotCap = !plotCap;
}
if (plotCap) {
for (int i = 0; i < 12; i++) {
Serial.print(">key");
Serial.print(i);
Serial.print(":");
Serial.println(readTouchKey(i));
}
for (int i = 0; i < 12; i++) {
Serial.print(">util");
Serial.print(i);
Serial.print(":");
Serial.println(readTouchUtil(i));
}
}
}