mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2026-09-25 08:44:06 +08:00
Merge pull request #171 from koztkozt/patch-2
Fix "floating point exception" error
This commit is contained in:
@@ -418,7 +418,14 @@ void *querySlaveDevices(void *arg)
|
||||
|
||||
struct timespec ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = (1000*1000*1000*28)/mb_devices[i].rtu_baud;
|
||||
if (mb_devices[i].protocol == MB_RTU)
|
||||
{
|
||||
ts.tv_nsec = (1000*1000*1000*28)/mb_devices[i].rtu_baud;
|
||||
}
|
||||
else
|
||||
{
|
||||
ts.tv_nsec = 0;
|
||||
}
|
||||
|
||||
//Read discrete inputs
|
||||
if (mb_devices[i].discrete_inputs.num_regs != 0)
|
||||
|
||||
Reference in New Issue
Block a user