so that target detection and speed can be evaluated with one serial send (since the answer provides both already).
This reduces the load on the UART port and ensures that the received data is from the same sampling frame. Otherwise it could be that between getTargetState() and getSpeed() the module updated its values.
so that target detection and speed can be evaluated with one serial send (since the answer provides both already).
This reduces the load on the UART port and ensures that the received data is from the same sampling frame. Otherwise it could be that between
getTargetState()
andgetSpeed()
the module updated its values.Example usage:
Tested on a Sparkfun ESP32 Thing with the real hardware module. Arduino IDE with espressif 2.0.6.
Old functions are left for backwards compatibility.