Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: serial output for esp32cams and other boards not supporting higher frequency baud rate #69

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ESP/ini/boards.ini
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ build_type = debug
build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=4
-DDEBUG_MODE=1
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROVER.build_flags}
upload_flags = --no-stub

Expand All @@ -113,6 +114,7 @@ build_type = release
build_flags = ${env.build_flags}
-DDEBUG_MODE=0
-DCORE_DEBUG_LEVEL=1
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROVER.build_flags}
upload_flags = --no-stub

Expand All @@ -125,6 +127,7 @@ build_flags = ${env.build_flags}
-DDEBUG_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DETVR_EYE_TRACKER_USB_API
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROVER.build_flags}

[env:wrooms3QIOUSB_release]
Expand All @@ -136,6 +139,7 @@ build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DETVR_EYE_TRACKER_USB_API
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROVER.build_flags}

[env:wrooms3]
Expand All @@ -144,6 +148,7 @@ build_type = debug
build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=4
-DDEBUG_MODE=1
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROOM.build_flags}

[env:wrooms3_release]
Expand All @@ -152,6 +157,7 @@ build_type = release
build_flags = ${env.build_flags}
-DDEBUG_MODE=0
-DCORE_DEBUG_LEVEL=1
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROOM.build_flags}

[env:wrooms3USB]
Expand All @@ -161,6 +167,7 @@ build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=4
-DDEBUG_MODE=1
-DETVR_EYE_TRACKER_USB_API
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROOM.build_flags}
upload_flags = --no-stub

Expand All @@ -171,6 +178,7 @@ build_flags = ${env.build_flags}
-DDEBUG_MODE=0
-DCORE_DEBUG_LEVEL=1
-DETVR_EYE_TRACKER_USB_API
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3WROOM.build_flags}
upload_flags = --no-stub

Expand All @@ -182,6 +190,7 @@ build_flags = ${env.build_flags}
-DDEBUG_MODE=1
#-DARDUINO_USB_MODE=1
#-DARDUINO_USB_CDC_ON_BOOT=1
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3XIAOSENSE.build_flags}

[env:xiaosenses3_USB]
Expand All @@ -191,6 +200,7 @@ build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=4
-DDEBUG_MODE=1
-DETVR_EYE_TRACKER_USB_API
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3XIAOSENSE.build_flags}
upload_flags = --no-stub

Expand All @@ -200,6 +210,7 @@ build_type = release
build_flags = ${env.build_flags}
-DDEBUG_MODE=0
-DCORE_DEBUG_LEVEL=1
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3XIAOSENSE.build_flags}

[env:xiaosenses3_USB_release]
Expand All @@ -209,5 +220,6 @@ build_flags = ${env.build_flags}
-DDEBUG_MODE=0
-DCORE_DEBUG_LEVEL=1
-DETVR_EYE_TRACKER_USB_API
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutsESPS3XIAOSENSE.build_flags}
upload_flags = --no-stub
2 changes: 2 additions & 0 deletions ESP/lib/src/io/Serial/SerialManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ void SerialManager::send_frame() {
#endif

void SerialManager::init() {
#ifndef SERIAL_MANAGER_USE_HIGHER_FREQUENCY
Serial.begin(3000000);
#endif
if (SERIAL_FLUSH_ENABLED) {
Serial.flush();
}
Expand Down
Loading