merge Junkers Tx logic

This commit is contained in:
proddy
2019-05-26 12:23:50 +02:00
parent 65bd9b96d4
commit 1d7310411f
8 changed files with 76 additions and 41 deletions

View File

@@ -16,11 +16,12 @@
#define EMS_MAXBUFFERS 10 // 4 buffers for circular filling to avoid collisions
#define EMS_MAXBUFFERSIZE 32 // max size of the buffer. packets are max 32 bytes
// this is how long we drop the Tx signal to create a 11-bit Break of zeros (BRK)
// At 9600 baud, 11 bits will be 1144 microseconds
// the BRK from Boiler master is roughly 1.039ms, so accounting for hardware lag using around 2078 (for half-duplex) - 8 (lag)
#define EMSUART_TX_BRK_WAIT 2070
#define EMSUART_BIT_TIME 104 // bit time @9600 baud
#define EMSUART_TX_BRK_WAIT 2070 // the BRK from Boiler master is roughly 1.039ms, so accounting for hardware lag using around 2078 (for half-duplex) - 8 (lag)
#define EMSUART_BIT_TIME 104 // bit time @9600 baud
#define EMSUART_TX_WAIT_BYTE EMSUART_BIT_TIME * 10 // Time to send one Byte (8 Bits, 1 Start Bit, 1 Stop Bit)
#define EMSUART_TX_WAIT_BRK EMSUART_BIT_TIME * 11 // Time to send a BRK Signal (11 Bit)
#define EMSUART_TX_WAIT_GAP EMSUART_BIT_TIME * 7 // Gap between to Bytes
#define EMSUART_TX_LAG 8 // Assumed Lag
#define EMSUART_recvTaskPrio 1
#define EMSUART_recvTaskQueueLen 64