Browse Source

Disable battery swap point display

Number calc doesn't work so hiding for now
QGC4.4
DonLakeFlyer 7 years ago
parent
commit
ba2b94b9d8
  1. 3
      src/MissionManager/MissionController.cc
  2. 4
      src/PlanView/PlanToolBar.qml

3
src/MissionManager/MissionController.cc

@ -1084,6 +1084,9 @@ void MissionController::_updateBatteryInfo(int waypointIndex) @@ -1084,6 +1084,9 @@ void MissionController::_updateBatteryInfo(int waypointIndex)
_missionFlightStatus.hoverAmpsTotal = (_missionFlightStatus.hoverTime / 60.0) * _missionFlightStatus.hoverAmps;
_missionFlightStatus.cruiseAmpsTotal = (_missionFlightStatus.cruiseTime / 60.0) * _missionFlightStatus.cruiseAmps;
_missionFlightStatus.batteriesRequired = ceil((_missionFlightStatus.hoverAmpsTotal + _missionFlightStatus.cruiseAmpsTotal) / _missionFlightStatus.ampMinutesAvailable);
// FIXME: Battery change point code pretty much doesn't work. The reason is that is treats complex items as a black box. It needs to be able to look
// inside complex items in order to determine a swap point that is interior to a complex item. Current the swap point display in PlanToolbar is
// disabled to do this problem.
if (waypointIndex != -1 && _missionFlightStatus.batteriesRequired == 2 && _missionFlightStatus.batteryChangePoint == -1) {
_missionFlightStatus.batteryChangePoint = waypointIndex - 1;
}

4
src/PlanView/PlanToolBar.qml

@ -283,13 +283,15 @@ Rectangle { @@ -283,13 +283,15 @@ Rectangle {
}
Item { width: 1; height: 1 }
/*
FIXME: Swap point display is currently hidden since the code which calcs it doesn't work correctly
QGCLabel { text: qsTr("Swap waypoint:"); font.pointSize: _dataFontSize; }
QGCLabel {
text: _batteryChangePointText
font.pointSize: _dataFontSize
Layout.minimumWidth: _mediumValueWidth
}
*/
}
}

Loading…
Cancel
Save