Just got rid of the slight chance of missing the start bit...

This commit is contained in:
EspoTek 2017-05-28 19:53:31 +10:00
parent 5320d6abf7
commit 53e6388f4f
19 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.1.0, 2017-05-24T09:44:57. -->
<!-- Written by QtCreator 4.1.0, 2017-05-28T19:52:59. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

Binary file not shown.

View File

@ -38,7 +38,7 @@ extern struct timeval tv;
#define COLUMN_BREAK VALID_DATA_PER_750
//#define MAX_CONSOLE_BLOCK_COUNT 512
#define SERIAL_BUFFER_LENGTH 2048
#define SERIAL_BUFFER_LENGTH 8192
#endif // DESKTOP_SETTINGS_H

View File

@ -267,7 +267,7 @@ void isoBuffer::updateSerialPtr(double baudRate, unsigned char current_bit)
int distance_between_bits = sampleRate_bit/baudRate;
if(uartTransmitting){
serialPtr_bit += distance_between_bits;
} else serialPtr_bit += distance_between_bits; //Less than one baud period so that it will always see that start bit.
} else serialPtr_bit += (distance_between_bits - 1); //Less than one baud period so that it will always see that start bit.
if (serialPtr_bit > (bufferEnd * 8)){
serialPtr_bit -= (bufferEnd * 8);

Binary file not shown.