am32-firmware / AM32

GNU General Public License v3.0
175 stars 37 forks source link

Update main.c #7

Closed KennethSimpson closed 7 months ago

KennethSimpson commented 7 months ago

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.