These are chat archives for dronekit/dronekit-android

21st
Sep 2016
NbagusW
@NbagusW
Sep 21 2016 17:13
@pablomar13 it works , but it ways to change the mode without condition. Im newbie in java, and i didnt know how to works condition like in python.like while condition in : while vehicle.mode.name=="GUIDED": (do something).
in java how can we make a action in condition Guided like that python? thanks for helping me .. hope u can help me again.
NbagusW
@NbagusW
Sep 21 2016 17:53
This message was deleted
pablomar13
@pablomar13
Sep 21 2016 18:38
@NbagusW to get the vehicle mode you are in try the method : public void onDroneEvent(String event, Bundle extras) { switch (event) { case AttributeEvent.STATE_VEHICLE_MODE: vehicleState = this.drone.getAttribute(AttributeType.STATE); VehicleMode vehicleMode = vehicleState.getVehicleMode();
then you can do whatever condition with the variable vehicleMode
for example: if (vehicleMode==COPTER_GUIDED) {do whatever}
NbagusW
@NbagusW
Sep 21 2016 18:41
@pablomar13 Thanks for the details :D ill try it too,but now i realize too,that the Action or to do can run in void on Success :/ , sorry for my bad java :smile:
NbagusW
@NbagusW
Sep 21 2016 18:58
@pablomar13 its Works ,thanks very much. Hope everyone has kindness like u :D
pablomar13
@pablomar13
Sep 21 2016 19:47
@NbagusW no problem. Good luck.