Răsfoiți Sursa

Fix the broadcast constant (255 -> 0)

Page 23 of Modbus_Messaging_Implementation_Guide_V1_0b
Stéphane Raimbault 15 ani în urmă
părinte
comite
daa6d20894
2 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 2 0
      NEWS
  2. 1 1
      src/modbus.h.in

+ 2 - 0
NEWS

@@ -6,6 +6,8 @@ libmodbus 2.1.1 (2010-XX-XX)
 - Error conventions of POSIX systems and error recover
 - Versioning infrastructure.
   Inspired by the Clutter project and the work done by Florian Forster.
+- Fix the broadcast constant (255 -> 0)
+  Reported by David Olivari
 
 libmodbus 2.1.0 (2010-03-24)
 ============================

+ 1 - 1
src/modbus.h.in

@@ -38,7 +38,7 @@ extern "C" {
 #endif
 
 #define MODBUS_TCP_DEFAULT_PORT   502
-#define MODBUS_BROADCAST_ADDRESS  255
+#define MODBUS_BROADCAST_ADDRESS    0
 
 /* Slave index */
 #define HEADER_LENGTH_RTU           1