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

Modification to the storbe in Tactical program #35

Open
DiHydro opened this issue Aug 10, 2013 · 2 comments
Open

Modification to the storbe in Tactical program #35

DiHydro opened this issue Aug 10, 2013 · 2 comments

Comments

@DiHydro
Copy link
Contributor

DiHydro commented Aug 10, 2013

If the strobe had a bit of jitter, around +- 4 milliseconds, it would be even more disorienting. I had tried to implement this with random(-2,5) but it didn't seem to work quite as well as I hoped.

@dhiltonp
Copy link
Owner

The library updates 120 times per second. When you call update, it spins until any extra time is consumed. In the update it reads from all of the sensors, and sets the light to be the brightness requested.

The library could be modified to immediately turn on the light by running adjust_light() at the end of set_light(), but I don't want to make that change without thinking more about it. I have a few other things that are higher priority, but feel free to make the change on your copy and submit a merge request after making sure it plays nicely with the existing programs.

@dhiltonp
Copy link
Owner

dhiltonp commented Sep 6, 2013

So, there should be 2 changes necessary:

Add adjust_light() to line 320 in libraries/hexbright/hexbright.cpp
Add delayMicroseconds(random(3500)) right before the set_light (line 72) in programs/tactical/tactical.ino.

This should work, but I don't have a good tool to test jitter right now. It would be great if you would apply those two changes and verify that it works.

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

No branches or pull requests

2 participants