fixed DataLogger bug
This commit is contained in:
parent
a7e662faf1
commit
61c5bb090f
@ -12,11 +12,11 @@ public:
|
|||||||
|
|
||||||
bool isDifferent(const Entry& other)
|
bool isDifferent(const Entry& other)
|
||||||
{
|
{
|
||||||
const float scale = speed > 0.0f ? 1.0f : 5.0f;
|
const float scale = speed > 0.0f || other.speed > 0.0f ? 1.0f : 5.0f;
|
||||||
return
|
return
|
||||||
std::abs(batteryVoltage - other.batteryVoltage) > 0.1f * scale
|
std::abs(batteryVoltage - other.batteryVoltage) > 0.1f * scale
|
||||||
&& std::abs(batteryOutputCurrent - other.batteryOutputCurrent) > 0.1f * scale
|
|| std::abs(batteryOutputCurrent - other.batteryOutputCurrent) > 0.1f * scale
|
||||||
&& std::abs(speed - other.speed) > 0.1f;
|
|| std::abs(speed - other.speed) > 0.1f;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user