Skip to content

Conversation

@HalfVoxel
Copy link
Contributor

I spent the last 2 hours being confused about why my code didn't work, until I figured out that I had assumed that ticks was the total number of ticks in the command, not the spacing between the ticks. Hopefully, better documentation will ensure no other people fall into the same trap.

@gin66
Copy link
Owner

gin66 commented Jun 21, 2024

Thanks for this improvement. Could you please retain this line in the patch ?

//	ticks is multiplied by (1/TICKS_PER_S) in s

BTW: Issue #86 is kept open for more detailed explanation. Perhaps can refer to that, too ?

@HalfVoxel
Copy link
Contributor Author

I'm not quite sure what you mean to say with that comment? Does it just mean "there are TICKS_PER_S ticks each second"?

@gin66
Copy link
Owner

gin66 commented Jun 21, 2024

TICKS_PER_S is for most uC 16.000.000 (using standard frequency with esp32) and is for Sam Due 21.000.000. Consequently, 16000 ticks for most uC translates into 1ms, but for Sam Due is 0.76ms.
This statement just explains, how to translate ticks into time.

@HalfVoxel
Copy link
Contributor Author

I improved the comments a bit.

@gin66 gin66 merged commit a454fa5 into gin66:master Jun 22, 2024
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