disabled broken feetech passthrough code
parent
a3610e643d
commit
bcb5f25579
|
|
@ -17,7 +17,7 @@ uint8_t payload[MAX_PAYLOAD_SIZE]; // Global or static
|
||||||
|
|
||||||
#define MODE_NORMAL 0
|
#define MODE_NORMAL 0
|
||||||
#define MODE_FEETECH 1
|
#define MODE_FEETECH 1
|
||||||
uint8_t mode = MODE_FEETECH;
|
uint8_t mode = MODE_NORMAL;
|
||||||
|
|
||||||
#define CMD_ID_REQUEST 0x01
|
#define CMD_ID_REQUEST 0x01
|
||||||
#define CMD_FILE_LIST 0x02
|
#define CMD_FILE_LIST 0x02
|
||||||
|
|
@ -85,9 +85,9 @@ uint16_t getSineWaveValue(unsigned long centiseconds) {
|
||||||
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
Serial.setRxBufferSize(8192); // Must be set BEFORE Serial.begin()
|
||||||
Serial.begin(1000000);
|
Serial.begin(1000000);
|
||||||
//Serial1.begin(1000000, SERIAL_8N1, CH0_RX_PIN, CH0_TX_PIN);
|
//Serial1.begin(1000000, SERIAL_8N1, CH0_RX_PIN, CH0_TX_PIN)
|
||||||
Serial.setRxBufferSize(1024);
|
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
Serial.println(i);
|
Serial.println(i);
|
||||||
delay(500);
|
delay(500);
|
||||||
|
|
@ -131,7 +131,7 @@ void setup() {
|
||||||
|
|
||||||
|
|
||||||
// PLAY ANIMATION
|
// PLAY ANIMATION
|
||||||
//anim.loadFromFile("/test.anim");
|
// anim.loadFromFile("/animation.anim");
|
||||||
// currentAnimation = &anim;
|
// currentAnimation = &anim;
|
||||||
// currentAnimation->setActive(true);
|
// currentAnimation->setActive(true);
|
||||||
// playMode = PLAY_ONCE;
|
// playMode = PLAY_ONCE;
|
||||||
|
|
@ -964,20 +964,20 @@ void sniffByte(uint8_t b) {
|
||||||
bool flip = false;
|
bool flip = false;
|
||||||
unsigned long lastSend = 0;
|
unsigned long lastSend = 0;
|
||||||
void loop() {
|
void loop() {
|
||||||
if (mode == MODE_FEETECH) {
|
// if (mode == MODE_FEETECH) {
|
||||||
if (Serial.available()) {
|
// if (Serial.available()) {
|
||||||
char c = Serial.read();
|
// char c = Serial.read();
|
||||||
Serial1.write(c);
|
// Serial1.write(c);
|
||||||
sniffByte((uint8_t)c); // sniff traffic PC → UART
|
// sniffByte((uint8_t)c); // sniff traffic PC → UART
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Forward data from Serial1 (UART device) to Serial (PC)
|
// // Forward data from Serial1 (UART device) to Serial (PC)
|
||||||
if (Serial1.available()) {
|
// if (Serial1.available()) {
|
||||||
char c = Serial1.read();
|
// char c = Serial1.read();
|
||||||
Serial.write(c);
|
// Serial.write(c);
|
||||||
}
|
// }
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
runNodeAnimation();
|
runNodeAnimation();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue