Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
f2fab1e6
Commit
f2fab1e6
authored
Jul 03, 2022
by
Eric Duminil
Browse files
BUGFIX: Actually detect if sensor isn't connected
parent
177843c3
Pipeline
#7039
passed with stage
in 2 minutes and 51 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/src/lib/S8_UART/s8_uart.cpp
View file @
f2fab1e6
...
@@ -561,6 +561,7 @@ uint8_t S8_UART::serial_read_bytes(uint8_t max_bytes, uint32_t timeout_ms) {
...
@@ -561,6 +561,7 @@ uint8_t S8_UART::serial_read_bytes(uint8_t max_bytes, uint32_t timeout_ms) {
nb
=
mySerial
->
readBytes
(
buf_msg
,
max_bytes
);
nb
=
mySerial
->
readBytes
(
buf_msg
,
max_bytes
);
readed
=
true
;
readed
=
true
;
}
}
delay
(
50
);
//NOTE: ESP crashes without this delay, possibly because it calls readBytes too many times, too fast
end_t
=
millis
();
end_t
=
millis
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment