Advertisement
Bartosz_Popielarczyk

Untitled

Jul 26th, 2022
1,170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -(IBAction)onPrepareButtonClicked:(id)sender {
  2.     [self.flightController setIsVirtualStickAdvancedModeEnabled:true];
  3.     NSLog(@"Virtual Stick available: %s", self.flightController.isVirtualStickControlModeAvailable ? "True" : "False");
  4.     NSLog(@"Virtual Stick advanced enabled: %s", self.flightController.isVirtualStickAdvancedModeEnabled ? "True" : "False");
  5.     if (self.flightController.isVirtualStickControlModeAvailable && self.flightController.isVirtualStickAdvancedModeEnabled)
  6.     {
  7.         [self.flightController setRollPitchControlMode:DJIVirtualStickRollPitchControlModeVelocity];
  8.         [self.flightController setYawControlMode:DJIVirtualStickYawControlModeAngle];
  9.         [self.flightController setVerticalControlMode:DJIVirtualStickVerticalControlModePosition];
  10.         [self.flightController setRollPitchCoordinateSystem:DJIVirtualStickFlightCoordinateSystemBody];
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement