Guest User

data route setup

a guest
Apr 27th, 2017
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. accelModule.packedAcceleration().addRouteAsync(source -> source.stream((data, env) -> {
  2. final Acceleration value = data.value(Acceleration.class);
  3. Log.i(TAG, "accel: " + value);
  4. })).continueWith(task -> {
  5. metaModules.accelModule.packedAcceleration().start();
  6. metaModules.accelModule.start();
  7. return null;
  8. });
  9.  
  10. gyroModule.packedAngularVelocity().addRouteAsync(source -> source.stream((data, env) -> {
  11. final AngularVelocity value = data.value(AngularVelocity.class);
  12. Log.i(TAG, "Gyro: " + value);
  13. })).continueWith(task -> {
  14. metaModules.gyroModule.packedAngularVelocity().start();
  15. metaModules.gyroModule.start();
  16. return null;
  17. });
RAW Paste Data