Add MY_RS485_SOH_COUNT option (#1014)
This commit is contained in:
@@ -225,6 +225,15 @@
|
||||
#define MY_RS485_MAX_MESSAGE_LENGTH (40)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def MY_RS485_SOH_COUNT
|
||||
* @brief Use this in case of collisions on the bus. 3 might be a good setting.
|
||||
*/
|
||||
#ifndef MY_RS485_SOH_COUNT
|
||||
#define MY_RS485_SOH_COUNT (1)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @def MY_RS485_DE_PIN
|
||||
* @brief RS485 driver enable pin.
|
||||
|
||||
@@ -266,7 +266,7 @@ bool transportSend(const uint8_t to, const void* data, const uint8_t len, const
|
||||
#endif
|
||||
|
||||
// Start of header by writing multiple SOH
|
||||
for(byte w=0; w<1; w++) {
|
||||
for(byte w=0; w<MY_RS485_SOH_COUNT; w++) {
|
||||
_dev.write(SOH);
|
||||
}
|
||||
_dev.write(to); // Destination address
|
||||
|
||||
@@ -177,6 +177,7 @@ MY_RS485_BAUD_RATE LITERAL1
|
||||
MY_RS485_MAX_MESSAGE_LENGTH LITERAL1
|
||||
MY_RS485_HWSERIAL LITERAL1
|
||||
MY_RS485_DE_PIN LITERAL1
|
||||
MY_RS485_SOH_COUNT LITERAL1
|
||||
|
||||
# Gateway / MQTT
|
||||
MY_GATEWAY_SERIAL LITERAL1
|
||||
|
||||
Reference in New Issue
Block a user