-
Notifications
You must be signed in to change notification settings - Fork 25
Add calibration example #76
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
Open
sterlinghirsh
wants to merge
46
commits into
Volst:master
Choose a base branch
from
sterlinghirsh:add-calibration-example
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add calibration example #76
sterlinghirsh
wants to merge
46
commits into
Volst:master
from
sterlinghirsh:add-calibration-example
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My laser (via helios) would stay on when I'd shut down the program, so I added a shutdown handler for safety and convenience. I didn't add it for any other devices since I don't have any to test, but it should be a simple change to add it.
Add Shutdown Handler
This lets us load the package for unsupported devices without crashing. There are probably more incompatibilities, but the windows DACs were the ones causing a problem for me.
There's some other problems with this example but those changes will come later.
Add device selector
This was causing a typescript issue for me because ilda-reader and draw both use a Point interface. They're different but they both overlap on r, g, and b, which is all we care about.
Clamp points
It was off by one, so you could get an out-of-bounds value. This immediately fixed at least one example that draws a bounding box.
This was flipping both X and Y, but only Y needed to be flipped. This became apparent when using the svg-path example when the text was backwards.
Fix helios resolution
This makes the animation a bit less jerky by using the actual time since the last frame to determine movement.
They're called balls, might as well use a Circle.
Improve balls
Add transformer to convert all points to monochrome
It's a bit simpler since these functions are just mapping a function on points.
Add makeTransformer() and use with clamp and monochrome
It's a little more clear that it will take a Point from core and turn it into a helios point.
I'm not able to achieve the expected pps on my device. I think it's because writing in small chunks has more overhead.
Helios rework drawing
Nothing has changed yet, but this will make the diff easier to read
Get rid of the old stuff and and add the new stuff. It will talk to a webpage with a websocket and change settings in real time.
Just works on helios for now.
This lets us show stats and sync settings both ways.
It's a bit redundant since we're displaying them through the web UI
This is stuff like max speed and acceleration for each frame for all time.
It wasn't that useful to have stats assume we're starting from the middle since it would always cause a big acceleration spike at the start.
This will let us pass more parameters to shapes as we draw.
This allows blankingAmount and maxWaitAmount to be changed.
Contributor
Author
|
I realize this is a big change, since I think this is the full diff from my fork. Feel free to leave feedback if you feel like it, though I understand if you don't have time to work on this project for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes the structure of drawing shapes a bit so that instead of just receiving a resolution, Shape.draw() accepts a SceneOptions object, which contains resolution, fps, blankingPoints, maxWaitPoints. This replaces the constants RESOLUTION, BLANKING_AMOUNT, and MAX_WAIT_AMOUNT and lets us update the values without restarting the program.
This change adds a calibration interface (
examples/calibration). This lets you update parameters like pps, resolution, blanking points, and max wait points in real time from a web UI. The UI also displays stats and performance output. For example:Further work: