Skip to content

Commit 04a07a8

Browse files
committed
Force compiling using esp32 board manager version 1.x
1 parent f03f618 commit 04a07a8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

version for Neopixels (SK6812 WS2812)/HyperSerialESP32_Neopixel/HyperSerialESP32_Neopixel.ino

+10-10
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ int serialSpeed = 2000000; // serial port speed
1212
////////////////////////////////////////////////////////////////////////////////////////////////////
1313
///////////////////////// CONFIG SECTION ENDS /////////////////////////////
1414
////////////////////////////////////////////////////////////////////////////////////////////////////
15+
#if ESP_ARDUINO_VERSION_MAJOR >= 2
16+
#error "Please use esp32 board manager version 1.x. Versions 2.x and above are unsupported."
17+
#endif
1518

1619
#ifdef THIS_IS_RGBW
1720
float whiteLimit = 1.0f;
@@ -66,7 +69,7 @@ enum class AwaProtocol
6669
};
6770

6871
// static data buffer for the loop
69-
#define MAX_BUFFER 2048
72+
#define MAX_BUFFER 4096
7073
uint8_t buffer[MAX_BUFFER];
7174
AwaProtocol state = AwaProtocol::HEADER_A;
7275
bool version2 = false;
@@ -136,14 +139,11 @@ void readSerialData()
136139
stat_good = 0;
137140
stat_frames = 0;
138141

139-
Serial.write("HyperSerialESP32 version 6.\r\nStatistics for the last full 1 second cycle.\r\n");
140-
Serial.write("Frames per second: ");
141-
Serial.print(stat_final_frames);
142-
Serial.write("\r\nGood frames: ");
143-
Serial.print(stat_final_good);
144-
Serial.write("\r\nBad frames: ");
145-
Serial.print(stat_final_frames - stat_final_good);
146-
Serial.write("\r\n-------------------------\r\n");
142+
Serial.println((String)"HyperSerialESP32 version 6.1\r\nStatistics for the last full 1 second cycle."+
143+
(String)"\r\nFrames per second: "+ stat_final_frames +
144+
(String)"\r\nGood frames: "+ stat_final_good +
145+
(String)"\r\nBad frames: " + (int)(stat_final_frames - stat_final_good) +
146+
(String)"\r\n-------------------------");
147147
}
148148

149149
if (state == AwaProtocol::HEADER_A)
@@ -353,7 +353,7 @@ void setup()
353353
// Init serial port
354354
Serial.begin(serialSpeed);
355355
Serial.setTimeout(50);
356-
Serial.setRxBufferSize(2048);
356+
Serial.setRxBufferSize(MAX_BUFFER);
357357

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

0 commit comments

Comments
 (0)