From 4b517f17bba0c86a411d03b011b1341115c42763 Mon Sep 17 00:00:00 2001 From: ShunjiHashimoto Date: Mon, 12 Aug 2024 10:34:24 +0900 Subject: [PATCH] =?UTF-8?q?encoder=20init=E3=81=AE=E5=BC=95=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Inc/encoder.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/Inc/encoder.h b/Core/Inc/encoder.h index 6f22553..a1dd058 100644 --- a/Core/Inc/encoder.h +++ b/Core/Inc/encoder.h @@ -18,11 +18,13 @@ typedef struct { } Encoder; // 初期化関数 -void initEncoder(Encoder* encoder, TIM_HandleTypeDef* htim_x, int32_t one_rotation_pulse, bool cw); +void initEncoder(Encoder* encoder, TIM_HandleTypeDef* htim_x, float one_rotation_pulse, bool cw); // 更新関数 void updateEncoder(Encoder* encoder, uint32_t pulse_count); +void resetEncoder(Encoder* encoder); + // delta_pulseを取得する関数 int32_t getDeltaPulse(const Encoder* encoder);