File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Core/src/org/droidplanner/core/MAVLink Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 22<manifest xmlns : android =" http://schemas.android.com/apk/res/android"
33 xmlns : tools =" http://schemas.android.com/tools"
44 package =" org.droidplanner"
5- android : versionCode =" 96 "
5+ android : versionCode =" 97 "
66 android : versionName =" please run version.sh to get the version name" >
77
88 <uses-sdk
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ Our convention for release control is the following (for a release like DPvA.B.C
88All the changes are logged below (preferable with the pull request numbers in parenteses):
99
1010# Releases
11+ ## Droidplanner v2.7.6
12+ * Warn user about all HIGH_SEVERITY messages from the drone (#1066 )
13+
1114## Droidplanner v2.7.5
1215* Fix follow-me for "heading" related follow modes (#1065 )
1316* Complementing German translation (#1059 )
Original file line number Diff line number Diff line change 2222
2323public class MavLinkMsgHandler {
2424
25+ private static final byte SEVERITY_HIGH = 3 ;
2526 private Drone drone ;
2627
2728 public MavLinkMsgHandler (Drone drone ) {
@@ -99,15 +100,13 @@ public void receiveData(MAVLinkMessage msg) {
99100 //also less important things like "erasing logs" and "calibrating barometer"
100101 msg_statustext msg_statustext = (msg_statustext ) msg ;
101102 String message = msg_statustext .getText ();
102- //TODO read anything that is "SEVERITY_HIGH", but only read certain "SEVERITY_LOW"s
103- if ( message . equals ( "Low Battery!" )) {
103+
104+ if ( msg_statustext . severity >= SEVERITY_HIGH ) {
104105 drone .getState ().setWarning (message );
105- }
106- if (message .length () > 7 ) {
107- if (message .substring (0 , 7 ).equals ("PreArm:" )
108- || message .substring (0 , 4 ).equals ("Arm:" )) {
109- drone .getState ().setWarning (message );
110- }
106+ break ;
107+ } else if (message .equals ("Low Battery!" )) {
108+ drone .getState ().setWarning (message );
109+ break ;
111110 }
112111 break ;
113112 }
You can’t perform that action at this time.
0 commit comments