Skip to content

Commit

Permalink
Force compiling using esp32 board manager version 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed May 19, 2022
1 parent f03f618 commit 04a07a8
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ int serialSpeed = 2000000; // serial port speed
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////// CONFIG SECTION ENDS /////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
#if ESP_ARDUINO_VERSION_MAJOR >= 2
#error "Please use esp32 board manager version 1.x. Versions 2.x and above are unsupported."
#endif

#ifdef THIS_IS_RGBW
float whiteLimit = 1.0f;
Expand Down Expand Up @@ -66,7 +69,7 @@ enum class AwaProtocol
};

// static data buffer for the loop
#define MAX_BUFFER 2048
#define MAX_BUFFER 4096
uint8_t buffer[MAX_BUFFER];
AwaProtocol state = AwaProtocol::HEADER_A;
bool version2 = false;
Expand Down Expand Up @@ -136,14 +139,11 @@ void readSerialData()
stat_good = 0;
stat_frames = 0;

Serial.write("HyperSerialESP32 version 6.\r\nStatistics for the last full 1 second cycle.\r\n");
Serial.write("Frames per second: ");
Serial.print(stat_final_frames);
Serial.write("\r\nGood frames: ");
Serial.print(stat_final_good);
Serial.write("\r\nBad frames: ");
Serial.print(stat_final_frames - stat_final_good);
Serial.write("\r\n-------------------------\r\n");
Serial.println((String)"HyperSerialESP32 version 6.1\r\nStatistics for the last full 1 second cycle."+
(String)"\r\nFrames per second: "+ stat_final_frames +
(String)"\r\nGood frames: "+ stat_final_good +
(String)"\r\nBad frames: " + (int)(stat_final_frames - stat_final_good) +
(String)"\r\n-------------------------");
}

if (state == AwaProtocol::HEADER_A)
Expand Down Expand Up @@ -353,7 +353,7 @@ void setup()
// Init serial port
Serial.begin(serialSpeed);
Serial.setTimeout(50);
Serial.setRxBufferSize(2048);
Serial.setRxBufferSize(MAX_BUFFER);

// Display config
Serial.write("\r\nWelcome!\r\nAwa driver 6.\r\n");
Expand Down

0 comments on commit 04a07a8

Please sign in to comment.