{"action":"created","issue":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5420","repository_url":"https://api.github.com/repos/ArduPilot/ardupilot","labels_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5420/labels{/name}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5420/comments","events_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5420/events","html_url":"https://github.com/ArduPilot/ardupilot/issues/5420","id":196639494,"number":5420,"title":"Potential issue in AlexMos driver","user":{"login":"SalahuddinAsh","id":7689015,"avatar_url":"https://avatars.githubusercontent.com/u/7689015?v=3","gravatar_id":"","url":"https://api.github.com/users/SalahuddinAsh","html_url":"https://github.com/SalahuddinAsh","followers_url":"https://api.github.com/users/SalahuddinAsh/followers","following_url":"https://api.github.com/users/SalahuddinAsh/following{/other_user}","gists_url":"https://api.github.com/users/SalahuddinAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/SalahuddinAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SalahuddinAsh/subscriptions","organizations_url":"https://api.github.com/users/SalahuddinAsh/orgs","repos_url":"https://api.github.com/users/SalahuddinAsh/repos","events_url":"https://api.github.com/users/SalahuddinAsh/events{/privacy}","received_events_url":"https://api.github.com/users/SalahuddinAsh/received_events","type":"User","site_admin":false},"labels":[{"id":136051782,"url":"https://api.github.com/repos/ArduPilot/ardupilot/labels/Library","name":"Library","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-20T10:38:43Z","updated_at":"2016-12-24T13:21:19Z","closed_at":null,"body":"#### Issue details\r\nHi everyone, \r\nI'm trying for about 5 days to control an AlexMos gimbal controller using ODroid **(ODroid -> Pixhawk -> AlexMos)**\r\nI've sent the right MAVLink message from ODroid to Pixhawk and monitored the output of Pixhawk to AlexMos by connecting this output to the PC. I found that the output is not correct. \r\nPixhawk just sends empty messages to AlexMos. Something like this\r\n`3e  43   0d   50   02   f5   00   00   00   f5   00   00   00   f5   00   00   00   e1`\r\nYou can notice that the command id is correct which is \"**CMD_CONTROL** = 'c' = 43\"  and the rest of the fields of the message are correct but empty angles!!\r\nI followed the flow of control in the master branch and found it as following:\r\n\r\n#\r\n**command_logic.cpp** \r\nstart_command(cmd) → do_mount_control(cmd) \r\n\t\t\t|\r\n\t\t\t|\r\n\t\tAP_Mount_Backend.cpp \r\n\t\tset_angle_targets(roll, pitch, yaw) // sets the target angles \r\n\t\t\r\n#\r\n**GCS_MAVLink.cpp**\r\nhandleMessage() \r\n\t|\r\n\t|\r\n**AP_Mount_Backend.cpp** \r\ncontrol(pitch, roll, yaw, mount_mode)    →     set_angle_targets(roll, pitch, yaw) // sets the target angles\r\n\r\n#\r\n**ArduCopter.cpp**\r\nupdate_mount()\r\n\t|\r\n\t|\r\n**AP_Mount_Alexmos.cpp**\r\n          update()\t  → \tcontrol_axis(angles, in_degrees) \t→ \tsend_command(cmd, size)\r\n\r\n#\r\nI found that **update()** should call **control_axis()** which should call **send_command()** to really send the command. This doesn’t happen in case of **MAVLINK_TARGETTING** mode. The target values are set but the send_command is not called.\r\n\r\nI found something else. The **DO_MOUNT_CONFIGURE** command is not handled at all. Instead, a deprecated version of it is handled.\r\n\r\nCould someone please tell me if I'm right?\r\nMany thanks"},"comment":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/comments/269084188","html_url":"https://github.com/ArduPilot/ardupilot/issues/5420#issuecomment-269084188","issue_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/5420","id":269084188,"user":{"login":"SalahuddinAsh","id":7689015,"avatar_url":"https://avatars.githubusercontent.com/u/7689015?v=3","gravatar_id":"","url":"https://api.github.com/users/SalahuddinAsh","html_url":"https://github.com/SalahuddinAsh","followers_url":"https://api.github.com/users/SalahuddinAsh/followers","following_url":"https://api.github.com/users/SalahuddinAsh/following{/other_user}","gists_url":"https://api.github.com/users/SalahuddinAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/SalahuddinAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SalahuddinAsh/subscriptions","organizations_url":"https://api.github.com/users/SalahuddinAsh/orgs","repos_url":"https://api.github.com/users/SalahuddinAsh/repos","events_url":"https://api.github.com/users/SalahuddinAsh/events{/privacy}","received_events_url":"https://api.github.com/users/SalahuddinAsh/received_events","type":"User","site_admin":false},"created_at":"2016-12-24T13:21:19Z","updated_at":"2016-12-24T13:21:19Z","body":"I finally figured out the missing part. I should cast hex to float on the RPi side to get the right values. I did this using this snippet of code\r\n```\r\n  char buffer[] = {0x00, 0x00, 0x80, 0x41};\r\n  float f = *(float *)&buffer;\r\n  printf(\"%f\\n\",f);\r\n```"}}
{"actor":{"display_login":"SalahuddinAsh"}}