Hello Guys,
I am trying to send command to my pixhawk using pymavlink to generate pwm signals at 16 channels of the pixhawk.
def test_send(self, i):
self.fc.mav.command_long_send(
self.fc.target_system, self.fc.target_component,
311,
0,
4,
0,
0,
0,
i,
0,
0)
response = self.fc.recv_match(type='COMMAND_ACK', blocking=True)
print(i, ": ", response)
for i in range(1,17):
fcobj.test_send(i) #class object calling the above function
Output:
1 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
2 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
3 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
4 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
5 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
6 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
7 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
8 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
9 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
10 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
11 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
12 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
13 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
14 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
15 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
16 : COMMAND_ACK {command : 311, result : 3, progress : 0, result_param2 : 0, target_system : 255, target_component : 0}
is there any other command than this to generated signals to run motors?
Or I have not written the send commnad in proper format?
Already referred this MAV_CMD_ACTUATOR_TEST and MAV_CMD_CONFIGURE_ACTUATOR