SonarGetDistance Method

Gets the distance calculated from the sonar echo after calling Ping(). A value of -1 indicates no echo was received in time. Note that a call to this method will reset the distance to -1. Therefore, the caller should store the value returned in a variable.

Definition

Namespace: RoboTx.Api
Assembly: Robo-Tx.Api (in Robo-Tx.Api.dll) Version: 2.0.0+58b061ffe902bd370f7f9a4c58103d8e1f566889
C#
public int GetDistance()

Return Value

Int32
Distance calculated as a result of an echo received after a sonar ping.

See Also