mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
fix: serial output for esp32cams and other boards not supporting higher frequency baud rate
This commit is contained in:
parent
811a9f898a
commit
4aebb2de94
@ -8,6 +8,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DCORE_DEBUG_LEVEL=4 ; set the debug level
|
-DCORE_DEBUG_LEVEL=4 ; set the debug level
|
||||||
-DDEBUG_MODE=1 ; Set the debug mode
|
-DDEBUG_MODE=1 ; Set the debug mode
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsAIThinker.build_flags}
|
${pinoutsAIThinker.build_flags}
|
||||||
|
|
||||||
[env:esp32AIThinker_release]
|
[env:esp32AIThinker_release]
|
||||||
@ -17,6 +18,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DDEBUG_MODE=0 ; Set the debug mode
|
-DDEBUG_MODE=0 ; Set the debug mode
|
||||||
-DCORE_DEBUG_LEVEL=1
|
-DCORE_DEBUG_LEVEL=1
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsAIThinker.build_flags}
|
${pinoutsAIThinker.build_flags}
|
||||||
|
|
||||||
[env:esp32M5Stack]
|
[env:esp32M5Stack]
|
||||||
@ -25,6 +27,7 @@ build_type = debug
|
|||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
-DDEBUG_MODE=1
|
-DDEBUG_MODE=1
|
||||||
-DCORE_DEBUG_LEVEL=4
|
-DCORE_DEBUG_LEVEL=4
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESPCAM_M5STACK.build_flags}
|
${pinoutsESPCAM_M5STACK.build_flags}
|
||||||
|
|
||||||
[env:esp32M5Stack_release]
|
[env:esp32M5Stack_release]
|
||||||
@ -33,6 +36,7 @@ build_type = release
|
|||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
-DDEBUG_MODE=0
|
-DDEBUG_MODE=0
|
||||||
-DCORE_DEBUG_LEVEL=1
|
-DCORE_DEBUG_LEVEL=1
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESPCAM_M5STACK.build_flags}
|
${pinoutsESPCAM_M5STACK.build_flags}
|
||||||
|
|
||||||
[env:esp32Cam]
|
[env:esp32Cam]
|
||||||
@ -42,6 +46,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DDEBUG_MODE=1
|
-DDEBUG_MODE=1
|
||||||
-DCORE_DEBUG_LEVEL=4 ; Set the debug mode
|
-DCORE_DEBUG_LEVEL=4 ; Set the debug mode
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESPCam.build_flags}
|
${pinoutsESPCam.build_flags}
|
||||||
|
|
||||||
[env:esp32Cam_release]
|
[env:esp32Cam_release]
|
||||||
@ -51,6 +56,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DDEBUG_MODE=0 ; Set the debug mode
|
-DDEBUG_MODE=0 ; Set the debug mode
|
||||||
-DCORE_DEBUG_LEVEL=1
|
-DCORE_DEBUG_LEVEL=1
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESPCam.build_flags}
|
${pinoutsESPCam.build_flags}
|
||||||
|
|
||||||
[env:esp_eye]
|
[env:esp_eye]
|
||||||
@ -61,6 +67,7 @@ build_type = debug
|
|||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
-DDEBUG_MODE=1 ; Set the debug mode
|
-DDEBUG_MODE=1 ; Set the debug mode
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESP-EYE.build_flags}
|
${pinoutsESP-EYE.build_flags}
|
||||||
|
|
||||||
[env:esp_eye_release]
|
[env:esp_eye_release]
|
||||||
@ -72,6 +79,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DDEBUG_MODE=0 ; Set the debug mode
|
-DDEBUG_MODE=0 ; Set the debug mode
|
||||||
-DCORE_DEBUG_LEVEL=1
|
-DCORE_DEBUG_LEVEL=1
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESP-EYE.build_flags}
|
${pinoutsESP-EYE.build_flags}
|
||||||
|
|
||||||
[env:wrover]
|
[env:wrover]
|
||||||
@ -83,6 +91,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DCORE_DEBUG_LEVEL=4 ; set the debug level
|
-DCORE_DEBUG_LEVEL=4 ; set the debug level
|
||||||
-DDEBUG_MODE=1 ; Set the debug mode
|
-DDEBUG_MODE=1 ; Set the debug mode
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESPWROVER.build_flags}
|
${pinoutsESPWROVER.build_flags}
|
||||||
|
|
||||||
[env:wrover_release]
|
[env:wrover_release]
|
||||||
@ -94,6 +103,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DDEBUG_MODE=0 ; Set the debug mode
|
-DDEBUG_MODE=0 ; Set the debug mode
|
||||||
-DCORE_DEBUG_LEVEL=1
|
-DCORE_DEBUG_LEVEL=1
|
||||||
; CAMERA PINOUT DEFINITIONS
|
; CAMERA PINOUT DEFINITIONS
|
||||||
|
-DSERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
${pinoutsESPWROVER.build_flags}
|
${pinoutsESPWROVER.build_flags}
|
||||||
|
|
||||||
[env:wrooms3QIO]
|
[env:wrooms3QIO]
|
||||||
|
|||||||
@ -54,7 +54,9 @@ void SerialManager::send_frame() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void SerialManager::init() {
|
void SerialManager::init() {
|
||||||
|
#ifndef SERIAL_MANAGER_USE_LOWER_FREQUENCY
|
||||||
Serial.begin(3000000);
|
Serial.begin(3000000);
|
||||||
|
#endif
|
||||||
if (SERIAL_FLUSH_ENABLED) {
|
if (SERIAL_FLUSH_ENABLED) {
|
||||||
Serial.flush();
|
Serial.flush();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user