[hal] Add SimValue reset() function (#3064)

This enables correct behavior for resetting incremental sensor values like
encoder counts or gyro accumulated angle with WebSockets.
This commit is contained in:
Peter Johnson
2021-01-12 00:38:58 -08:00
committed by GitHub
parent 9c3b51ca0f
commit bc80c55353
20 changed files with 324 additions and 11 deletions

View File

@@ -105,6 +105,12 @@ class SimDeviceSim {
*/
operator HAL_SimDeviceHandle() const { return m_handle; } // NOLINT
/**
* Get all sim devices with the given prefix.
*
* @param prefix the prefix to filter sim devices
* @param callback callback function to call for each sim device
*/
template <typename F>
static void EnumerateDevices(const char* prefix, F callback) {
return HALSIM_EnumerateSimDevices(