Permalink
Browse files

TS RPI flush hack fix

  • Loading branch information...
gioblu committed Jul 25, 2017
1 parent cc7729e commit 30b94d8820e3a3bab0a5b639f4dd374d9b3312a9
Showing with 9 additions and 8 deletions.
  1. +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();
};

0 comments on commit 30b94d8

Please sign in to comment.