Skip to content

fix: Clear FPGA Cart X/Y/Theta accumulators in clearEncoders#2

Closed
h-brenne wants to merge 1 commit into
Sonobotics:mainfrom
h-brenne:fix/clear_fpga_cart
Closed

fix: Clear FPGA Cart X/Y/Theta accumulators in clearEncoders#2
h-brenne wants to merge 1 commit into
Sonobotics:mainfrom
h-brenne:fix/clear_fpga_cart

Conversation

@h-brenne
Copy link
Copy Markdown
Contributor

What?

Clear FPGA Cart X/Y/Theta accumulators in addition to raw Encoder 1 and 2 counters in clearEncoders.

Why?

This is the behavior I would expect when using the Cart accumulators, allowing reset to zero before collecting a path. Could consider separating into clearEncoders and a clearCartAccumulators depending on the intended use cases.

@SONOBOTICS-paddy
Copy link
Copy Markdown
Contributor

This command doesn't actually clear any accumulators:

self.clearCounterEnable([0, 0, 0, 0, 0, 0, 0, 0])
self.clearCounterEnable([0, 0, 0, 0, 1, 1, 1, 0])

Only the first bit completes the general encoder and accumulator reset, so if it is 0 it resets whereas it being 1 initialises it again. The other bits aren't considered and therefore, using this command effectively has no further impact on the accumulators.

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.

2 participants