How to send a constant thrust to Crazyflie?
Posted: Tue Jul 08, 2014 3:09 am
I am using android application and try to modify the source code.
As I understand this code line is used to send commands to Crazyflie:
mCrazyradioLink.send(new CommanderPacket(mController.getRoll(), mController.getPitch(), mController.getYaw(), (char) (mController.getThrust()/100 * MAX_THRUST), mControls.isXmode()));
To test this code line, I change value for roll, pitch and yaw to 0:
mCrazyradioLink.send(new CommanderPacket(0, 0, 0, (char) (mController.getThrust()/100 * MAX_THRUST), mControls.isXmode()));
Everything works as expected, just thrust works when I use joysticks on android.
Then I change thrust variable to constance (50), I expect that after connecting, the Crazyflie should fly up. But nothing happens.!!
mCrazyradioLink.send(new CommanderPacket(0, 0, 0, (char) (50/100 * MAX_THRUST), mControls.isXmode()));
Could you plz tell me the reason?
As I understand this code line is used to send commands to Crazyflie:
mCrazyradioLink.send(new CommanderPacket(mController.getRoll(), mController.getPitch(), mController.getYaw(), (char) (mController.getThrust()/100 * MAX_THRUST), mControls.isXmode()));
To test this code line, I change value for roll, pitch and yaw to 0:
mCrazyradioLink.send(new CommanderPacket(0, 0, 0, (char) (mController.getThrust()/100 * MAX_THRUST), mControls.isXmode()));
Everything works as expected, just thrust works when I use joysticks on android.
Then I change thrust variable to constance (50), I expect that after connecting, the Crazyflie should fly up. But nothing happens.!!
mCrazyradioLink.send(new CommanderPacket(0, 0, 0, (char) (50/100 * MAX_THRUST), mControls.isXmode()));
Could you plz tell me the reason?