From da7abac9822d2004012bf6da9d803d3b37dc30fa Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 7 May 2017 19:30:48 -0700 Subject: [PATCH] Only mobile limits line length --- src/Vehicle/Vehicle.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 63a0c5e8f..6d3823a9f 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -1671,10 +1671,12 @@ void Vehicle::_rallyPointManagerError(int errorCode, const QString& errorMsg) void Vehicle::_addNewMapTrajectoryPoint(void) { if (_mapTrajectoryHaveFirstCoordinate) { - // Keep three minutes of trajectory + // Keep three minutes of trajectory on mobile due to perf impact of lines +#ifdef __mobile__ if (_mapTrajectoryList.count() * _mapTrajectoryMsecsBetweenPoints > 3 * 1000 * 60) { _mapTrajectoryList.removeAt(0)->deleteLater(); } +#endif _mapTrajectoryList.append(new CoordinateVector(_mapTrajectoryLastCoordinate, _coordinate, this)); _flightDistanceFact.setRawValue(_flightDistanceFact.rawValue().toDouble() + _mapTrajectoryLastCoordinate.distanceTo(_coordinate)); } -- 2.22.0