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