Skip to content
Snippets Groups Projects
Commit 88b9cc92 authored by fortissBot's avatar fortissBot
Browse files

Laser range finder: maximum value 4 digits

refs 7886
parent a4c63bea
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ GEN_TYPE_int lrf_read() {
// free buffer
uart_flush();
char bytes[5];
char bytes[6];
int n_read = 0;
char value[3];
......@@ -48,7 +48,7 @@ GEN_TYPE_int lrf_read() {
// looks like a blocking call and actually is but is always very fast
// since it only has to read the queue
while (1) {
n_read = uart_receive(&bytes, 5, 0);
n_read = uart_receive(&bytes, 6, 0);
for (i = 0; i < n_read; i++) {
if (bytes[i] != 0xd && bytes[i] != 0xa) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment