|
|
|
@ -12,11 +12,11 @@ public:
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
std::abs(batteryVoltage - other.batteryVoltage) > 0.1f * scale |
|
|
|
|
&& std::abs(batteryOutputCurrent - other.batteryOutputCurrent) > 0.1f * scale |
|
|
|
|
&& std::abs(speed - other.speed) > 0.1f; |
|
|
|
|
|| std::abs(batteryOutputCurrent - other.batteryOutputCurrent) > 0.1f * scale |
|
|
|
|
|| std::abs(speed - other.speed) > 0.1f; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|