Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ba2b94b9
Commit
ba2b94b9
authored
Dec 13, 2017
by
DonLakeFlyer
Browse files
Disable battery swap point display
Number calc doesn't work so hiding for now
parent
8f4f23c1
Changes
2
Show whitespace changes
Inline
Side-by-side
src/MissionManager/MissionController.cc
View file @
ba2b94b9
...
...
@@ -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
;
}
...
...
src/PlanView/PlanToolBar.qml
View file @
ba2b94b9
...
...
@@ -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
}
*/
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment