
- 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
57 lines
No EOL
1.3 KiB
C++
57 lines
No EOL
1.3 KiB
C++
#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));
|
|
}
|
|
}
|
|
} |