Skip to content

Commit c8f953a

Browse files
authored
Merge pull request #26 from sogwms/source
fix type bug
2 parents bc2d842 + dc544b1 commit c8f953a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

encoder/encoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ rt_err_t encoder_disable(encoder_t enc)
4545
return enc->disable(enc);
4646
}
4747

48-
rt_int16_t encoder_read(encoder_t enc)
48+
rt_int32_t encoder_read(encoder_t enc)
4949
{
5050
RT_ASSERT(enc != RT_NULL);
5151

encoder/encoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ rt_err_t encoder_reset(encoder_t enc);
3535
rt_err_t encoder_set_sample_time(encoder_t enc, rt_uint16_t sample_time); /* set sample time */
3636

3737
/** rpm = pulse_count / sample_time(ms) / pulse_revol * 1000 * 60 **/
38-
rt_int16_t encoder_read(encoder_t enc); /* return pulse_count */
38+
rt_int32_t encoder_read(encoder_t enc); /* return pulse_count */
3939
rt_int16_t encoder_measure_cps(encoder_t enc); /* pulse_count per second */
4040
rt_int16_t encoder_measure_rpm(encoder_t enc); /* revolutions per minute */
4141

0 commit comments

Comments
 (0)