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

49
NuEVI/src/led.cpp Normal file
View file

@ -0,0 +1,49 @@
#include <Arduino.h>
#include "hardware.h"
#include "globals.h"
#include "config.h"
void singleLED(int n, int color) {
}
void ledFullMeter(byte indicatedValue, int color){
}
void ledHalfMeter(int n, byte indicatedValue, int color){
}
void ledQuarterMeter(int n, byte indicatedValue, int color){
}
void statusLedOn() {
digitalWrite(statusLedPin, HIGH);
}
void statusLedOff() {
digitalWrite(statusLedPin, LOW);
}
void statusLed(bool state) {
digitalWrite(statusLedPin, state);
}
void statusLedFlip() {
digitalWrite(statusLedPin, !digitalRead(statusLedPin));
}
void statusLedFlash(uint16_t delayTime) {
statusLedOff();
delay(delayTime/2);
statusLedOn();
delay(delayTime/2);
}
void statusLedBlink() {
statusLedFlash(300);
statusLedFlash(300);
}
void updateSensorLEDs() {
ledHalfMeter(1, state.breathCCVal, 0x00FF00);
ledQuarterMeter(3, state.biteVal, 0x0000FF);
}