Products
-
-
- Accessories
- Breakout boards
This page has deprecated and will be archived. Please go to https://www.bitcraze.io/.
This should give a rough overview over the current state of the Android client architecture and also an outlook on what's planned in future versions.
As in every Android application there is a MainActivity
class. It is the heart of the application.
It defines the main screen which is used when controlling the Crazyflie.
The main screen currently consists of two parts:
FlightDataView
)DualJoystickView
)
The preferences (PreferencesActivity
) can be accessed from the main screen.
It has the following structure:
The IController
interface defines the basic methods that every controller implementation should support like
getting values for thrust, roll, pitch, yaw and enabling/disabling the controller.
Currently the following controllers are implemented:
The touch controller (TouchController
) uses the onscreen controls. Unfortunately it is the most difficult way to control the Crazyflie because there is no haptic feedback.
The gyroscope controller (GyroscopeController
) is a subclass of the touch controller. It uses the gyroscope/accelerometer sensors to control roll and pitch values.
It would be possible to also control yaw and thrust with the sensors, but it is not really a senseful and reliable way to control the Crazyflie.
The gamepad controller (GamepadController
) deals with gamepads or joysticks (like a PS3 or XBox controller).
The mapping of the axes and buttons can be changed in the preferences (Controller settings → Gamepad axis and button mapping).
One of the main goals of the design is to separate the UI from the Crazyflie library.
Currently the crazyflielib (se.bitcraze.crazyflielib
package) is still included in the Android client.
In the future, a standalone Java library, that does not contain any Android specific code, should be used instead.