trilliumeng / orion-sdk

Public SDK and ICD for Trillium Engineering's Orion Gimbals.
http://www.trilliumeng.com
MIT License
15 stars 15 forks source link

OrionCommOpenNetworkIp(...) appears to return true on failed connection attempt #17

Closed ryanks12 closed 3 weeks ago

ryanks12 commented 1 year ago

From the naming, it looks like the intention of OrionCommOpenNetworkIp(...) is to return whether a connection has successfully been established with a Trillium gimbal, but frequently I've found that this function will return true without a connection being established.

I understand that this function is just returning the socket status, but I think it would be better if it actually checked if there was a valid connection to a gimbal. For now it seems sending some dummy data (using OrionCommSend(...)) to the gimbal is the best way to check if you've connected to a gimbal.

Is this the desired behavior or am I using the SDK wrong?

trilliumbuild commented 3 weeks ago

You are correct. This call just opens up the network to be able to talk with the gimbal. At that point you would request data from the gimbal to verify that the rest of your network is working.