diff --git a/src/boards/Main/Sensors/HILSensors.h b/src/boards/Main/Sensors/HILSensors.h index 4b5d478a3b6dab91a70362893445f6313c414a03..09fa66912253303dd6a062c0ca261c728437c89e 100644 --- a/src/boards/Main/Sensors/HILSensors.h +++ b/src/boards/Main/Sensors/HILSensors.h @@ -101,7 +101,10 @@ private: { auto ts = miosix::getTime(); auto tsSensorData = getModule<MainHIL>()->getTimestampSimulatorData(); - auto simulationPeriod = getModule<MainHIL>()->getSimulationPeriod(); + long long simulationPeriod = + static_cast<long long>( + getModule<MainHIL>()->getSimulationPeriod()) * + 1e6; assert(ts >= tsSensorData && "Actual timestamp is lesser then the packet timestamp"); diff --git a/src/boards/Motor/Sensors/HILSensors.h b/src/boards/Motor/Sensors/HILSensors.h index 25d9645074281406e4b98d07d5d88ae0a00ebe5f..ac16b64824ab94653fd6a40b881d467135ddd423 100644 --- a/src/boards/Motor/Sensors/HILSensors.h +++ b/src/boards/Motor/Sensors/HILSensors.h @@ -57,7 +57,10 @@ private: { auto ts = miosix::getTime(); auto tsSensorData = getModule<MotorHIL>()->getTimestampSimulatorData(); - auto simulationPeriod = getModule<MotorHIL>()->getSimulationPeriod(); + long long simulationPeriod = + static_cast<long long>( + getModule<MotorHIL>()->getSimulationPeriod()) * + 1e6; assert(ts >= tsSensorData && "Actual timestamp is lesser then the packet timestamp"); diff --git a/src/boards/Payload/Sensors/HILSensors.h b/src/boards/Payload/Sensors/HILSensors.h index 46b2dae87493c9195c4f9a26661655f5df5e1340..b2d39e8c8b202bf3866c9c7dac3fa692fc9440a3 100644 --- a/src/boards/Payload/Sensors/HILSensors.h +++ b/src/boards/Payload/Sensors/HILSensors.h @@ -80,7 +80,10 @@ private: auto ts = miosix::getTime(); auto tsSensorData = getModule<PayloadHIL>()->getTimestampSimulatorData(); - auto simulationPeriod = getModule<PayloadHIL>()->getSimulationPeriod(); + long long simulationPeriod = + static_cast<long long>( + getModule<PayloadHIL>()->getSimulationPeriod()) * + 1e6; assert(ts >= tsSensorData && "Actual timestamp is lesser then the packet timestamp");