Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
TS RPI flush hack fix
- Loading branch information
Showing
with
9 additions
and
8 deletions.
-
+9
−8
strategies/ThroughSerial/ThroughSerial.h
|
@@ -138,16 +138,17 @@ class ThroughSerial { |
|
|
|
|
|
void send_string(uint8_t *string, uint8_t length) { |
|
|
start_tx(); |
|
|
for(uint8_t b = 0; b < length; b++) |
|
|
for(uint8_t b = 0; b < length; b++) { |
|
|
send_byte(string[b]); |
|
|
/* On RPI flush fails to wait until all bytes are transmitted |
|
|
here RPI forced to wait blocking using delayMicroseconds */ |
|
|
#if defined(RPI) |
|
|
PJON_DELAY_MICROSECONDS( |
|
|
(1000000 / (_bd / 8)) + _flush_offset |
|
|
); |
|
|
#endif |
|
|
} |
|
|
PJON_SERIAL_FLUSH(serial); |
|
|
/* On RPI flush fails to wait until all bytes are transmitted |
|
|
here RPI forced to wait blocking using delayMicroseconds */ |
|
|
#if defined(RPI) |
|
|
PJON_DELAY_MICROSECONDS( |
|
|
((1000000 / (_bd / 8)) * length) + _flush_offset |
|
|
); |
|
|
#endif |
|
|
end_tx(); |
|
|
}; |
|
|
|
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.