Skip to content

Commit 1a0eadd

Browse files
committed
Fixed invalid reporting of follow me radius.
1 parent 43824a8 commit 1a0eadd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Android/src/org/droidplanner/android/fragments/mode/ModeFollowFragment.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public void onReceive(Context context, Intent intent) {
4848
if (AttributeEvent.FOLLOW_UPDATE.equals(action)) {
4949
final FollowState followState = getDrone().getAttribute(AttributeType.FOLLOW_STATE);
5050
if (followState != null) {
51-
spinner.setSelection(adapter.getPosition(followState.getMode()));
51+
final FollowType followType = followState.getMode();
52+
spinner.setSelection(adapter.getPosition(followType));
53+
onFollowTypeUpdate(followType, followState.getParams());
5254
}
5355
}
5456
}
@@ -219,8 +221,6 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
219221
if (drone.isConnected()) {
220222
drone.enableFollowMe(type);
221223
}
222-
223-
onFollowTypeUpdate(type, null);
224224
}
225225

226226
@Override

0 commit comments

Comments
 (0)