Merge pull request #171 from koztkozt/patch-2

Fix "floating point exception" error
This commit is contained in:
Thiago Alves
2022-03-22 11:35:14 -04:00
committed by GitHub
+8 -1
View File
@@ -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)