mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 00:53:34 +08:00
0001-some-fixes-for-FreeMODBUS-and-MODBUS-example.patch from Freddi Chopin
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5372 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -217,7 +217,7 @@ static inline int modbus_initialize(void)
|
||||
/* Enable FreeModBus */
|
||||
|
||||
mberr = eMBEnable();
|
||||
if (mberr == MB_ENOERR)
|
||||
if (mberr != MB_ENOERR)
|
||||
{
|
||||
fprintf(stderr, "modbus_main: "
|
||||
"ERROR: eMBEnable failed: %d\n", mberr);
|
||||
@@ -267,6 +267,8 @@ static void *modbus_pollthread(void *pvarg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
/* Then loop until we are commanded to shutdown */
|
||||
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user