wip:
This commit is contained in:
@@ -80,6 +80,15 @@ esp_err_t zh_encoder_set(zh_encoder_handle_t *handle, double position)
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t zh_encoder_get(const zh_encoder_handle_t *handle, double *position)
|
||||
{
|
||||
ZH_ENCODER_LOGI("Encoder get position started.");
|
||||
ZH_ENCODER_CHECK(handle->is_initialized == true, ESP_FAIL, "Encoder get position failed. Encoder not initialized.");
|
||||
*position = handle->encoder_position;
|
||||
ZH_ENCODER_LOGI("Encoder get position completed successfully.");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t zh_encoder_reset(zh_encoder_handle_t *handle)
|
||||
{
|
||||
ZH_ENCODER_LOGI("Encoder reset started.");
|
||||
|
||||
Reference in New Issue
Block a user