REVrobotics / SPARK-MAX-Examples

Example code for SPARK MAX
BSD 3-Clause "New" or "Revised" License
104 stars 104 forks source link

Update global "allowedErr" instead of local "allE" #8

Closed bartkerfeld closed 4 years ago

bartkerfeld commented 4 years ago

Personally, I don't understand why bother updating these global variables at all (they don't seem to be used again anywhere). However, if that's the decision, then this last one's assignment needs to be flipped.

ryanj1234 commented 4 years ago

Good catch!

The "global" variables are really just to keep track of changes so we don't write every Smart Motion parameter every single loop. Instead we write them when there is a change from the dashboard.

Thanks for the fix!