Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing parentheses to US_TO_TICKS and TICKS_TO_US macros. #271

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/RampCalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
#define PMF_TICKS_PER_S PMF_CONST_16E6
#define PMF_TICKS_PER_S_DIV_SQRT_OF_2 PMF_CONST_16E6_DIV_SQRT_OF_2
#define PMF_ACCEL_FACTOR PMF_CONST_128E12
#define US_TO_TICKS(u32) (u32 * 16)
#define TICKS_TO_US(u32) (u32 / 16)
#define US_TO_TICKS(u32) ((u32) * 16)
#define TICKS_TO_US(u32) ((u32) / 16)
#elif (TICKS_PER_S == 21000000L)
#define PMF_TICKS_PER_S PMF_CONST_21E6
#define PMF_TICKS_PER_S_DIV_SQRT_OF_2 PMF_CONST_21E6_DIV_SQRT_OF_2
#define PMF_ACCEL_FACTOR PMF_CONST_2205E11
#define US_TO_TICKS(u32) (u32 * 21)
#define TICKS_TO_US(u32) (u32 / 21)
#define US_TO_TICKS(u32) ((u32) * 21)
#define TICKS_TO_US(u32) ((u32) / 21)
#else
#define SUPPORT_PMF_TIMER_FREQ_VARIABLES
#define PMF_TICKS_PER_S pmfl_timer_freq
Expand Down
Loading