These are chat archives for dronekit/dronekit-android

Apr 2016
Apr 18 2016 02:27
@chaviw well I'm back again! I was able to get the new object instantiated in my code, but for the life of me, I can't figure out how to pass the data I need to the created object. In looking at the actual 'msg_att_pos_mocap.class' file, it doesn't look like there is a constructor setup to pass along any data. I basically have the q array, and xyz variables being automatically updated in the app, but still can't understand how to pass them through to the new object so I can use the 'ACTION_SEND_MAVLINK_MESSAGE' to send it to the pixhawk (would this need to be in a loop to keep updating continuously?). I feel like I'm making this much harder than it should be, but I'm just not seeing it and the mechanical engineering degree just isn't helping :). Any additional help would be greatly appreciated. Dinner is on me if we can get this figured out!
Apr 18 2016 02:50
@jwerner37 I have never used this message so I’m not sure if any of this will work. Basically, it looks like that class was not created robustly. You can still easily pass the values because all those variables are public. An example would be:
msg_att_pos_mocap msg = new msg_att_pos_mocap();
msg.x = x;
msg.y = y;
new MavlinkMessageWrapper(msg);