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

Update main.c #7

Closed
wants to merge 1 commit into from
Closed

Update main.c #7

wants to merge 1 commit into from

Conversation

KennethSimpson
Copy link
Collaborator

Changes to add LUT use
Use of Clamp, MIN, MAX to reduce code space
Some minor logic changes to reduce code use and (IMO) make it easier to read

NOTE: Changed the pid calculation routine to return int32_t. It was using float, but no float types are used so it was a waste. Since int32_t is used for internal variables, it makes sense to use it, and you can then at least down-cast it to smaller types.

Changes to add LUT use
Use of Clamp, MIN, MAX to reduce code space
Some minor logic changes to reduce code use and (IMO) make it easier to read

NOTE: Changed the pid calculation routine to return int32_t. It was using float, but no float types are used so it was a waste.  Since int32_t is used for internal variables, it makes sense to use it, and you can then at least down-cast it to smaller types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant