Question
How do I check if a Buddy is assigned through the SDK?
Answer
The correct way to check if a Buddy sensor is currently assigned is to get the sensor handle of the Buddy and then get the serial number of the handle. The Buddy is NOT assigned if the serial number is 0. If the Buddy is assigned the serial number is the serial number of the physical sensor.
//retrive buddy sensor handle buddySensor = Go2System_BuddySensor(system); //obtain buddy sensor serial number sensorID = Go2Sensor_Id(buddySensor); if (sensorID 0) { //buddy is assigned! }
Comments
0 comments
Please sign in to leave a comment.