Skip to content

Commit

Permalink
Fixed invalid reporting of follow me radius.
Browse files Browse the repository at this point in the history
  • Loading branch information
m4gr3d committed Feb 24, 2015
1 parent 43824a8 commit 1a0eadd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public void onReceive(Context context, Intent intent) {
if (AttributeEvent.FOLLOW_UPDATE.equals(action)) {
final FollowState followState = getDrone().getAttribute(AttributeType.FOLLOW_STATE);
if (followState != null) {
spinner.setSelection(adapter.getPosition(followState.getMode()));
final FollowType followType = followState.getMode();
spinner.setSelection(adapter.getPosition(followType));
onFollowTypeUpdate(followType, followState.getParams());
}
}
}
Expand Down Expand Up @@ -219,8 +221,6 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
if (drone.isConnected()) {
drone.enableFollowMe(type);
}

onFollowTypeUpdate(type, null);
}

@Override
Expand Down

0 comments on commit 1a0eadd

Please sign in to comment.