Replies: 1 comment 1 reply
-
| 
         Hello, what you are referring to is the Command protocol, which is a service built upon Mavlink messages. After you send a command (COMMAND_INT), in order to find the associated response (COMMAND_ACK) in a noisy environment, i think you can use a combination of TargetSystem, TargetComponent and Command as key: 	for evt := range node.Events() {
		if frm, ok := evt.(*gomavlib.EventFrame); ok {
			if ack, ok := frm.Message().(*common.MessageCommandAck); ok {
				if ack.TargetSystem == MY_TARGET_SYSTEM && ack.TargetComponent == MY_TARGET_COMPONENT && ack.Command == COMMAND_COMMAND {
					...
				}
			}
		}
	}This is somehow error prone with respect to a request-response system in which the request contains a unique ID that can be used as key, but they designed the protocol in this way, and there's no other option right now.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking for such a means, but it seems there is no. In case I would like to send a cmd and wait for a certain time for an ack/nack there is a way to associate the cmd sent to the ack received by the cmd ID itself. But what if there are several parallel messages of the same kind on the way?
Beta Was this translation helpful? Give feedback.
All reactions