-
Notifications
You must be signed in to change notification settings - Fork 196
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
Take Snapshots from PhotonClient #940
Take Snapshots from PhotonClient #940
Conversation
Might want to debounce this given the UI can be laggy sometimes and people like to spam. |
photon-core/src/main/java/org/photonvision/vision/frame/consumer/FileSaveFrameConsumer.java
Outdated
Show resolved
Hide resolved
9ac9cd3
to
e1d5609
Compare
…nvision into ui-snapshots
}; | ||
const handleCaptureClick = () => { | ||
if (props.streamType === "Raw") { | ||
useCameraSettingsStore().saveInputSnapshot(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to pass in the correct callback through a prop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather compartmentalize as much logic into the stream viewer component as possible. This icon would only serve this function so adding it as a callback just duplicates code a lot.
@@ -384,7 +384,7 @@ const endCalibration = () => { | |||
color="secondary" | |||
style="width: 100%" | |||
:disabled="!settingsValid" | |||
@click="isCalibrating ? useCameraSettingsStore().takeCalibrationSnapshot(true) : startCalibration()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah this fun hack. We should probably not have one button doing two things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah its chill, the logic makes sense now with better variable names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't that be good for debugging things? Saving the output at a specific moment can help share if anything was wrong and saving the input with no drawings allows us to rerun pipelines on it. Are you referring to the crosshair? |
closes #342
replace #696