i started develop a Crazyflie lib and GUI in Java.
Based on the Android Client i started change the source code to use usb4java library for communication.
Now i can share my projects starting with the lib over https://bitbucket.org/ahuber1/crazyflie-lib.
The main class to use it is se.bitcraze.crazyflie.Crazyflie.
There are already some things to do from now like finish scan for devices.
Currently always the first device found are used.
Parameters and Logging ToC are read from it at every connect.
Parameters are read at connect and can be written and re-read if need.
Logging Groups can be registered and you can add multiple listeners for each group (sample available in src/test/java).
Code: Select all
try {
crazyflie.connect("radio://1:1M");
Logging logging = crazyflie.getLogging();
crazyflie.addLoggingListener(new LogListener() {
@Override
public void valuesReceived(String name,
Map<String, Object> values) {
log.info("Got {}: {}", name, values.toString());
}
},"acc","gyro");
logging.addGroup("acc", 10, "acc.x", "acc.y", "acc.z", "acc.zw");
logging.addGroup("gyro", 10, "gyro.x", "gyro.y", "gyro.z");
Thread.sleep(3000);
} finally {
crazyflie.disconnect();
}
I will also preparing my GUI Project to bitbucket, it does already have Controller Support based on JInput lib.
I have attached a image how it currently looks like.
There are no special features available, the plan was first to get it flying Any comments are Welcome
Andreas