-
Notifications
You must be signed in to change notification settings - Fork 10
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
Basler cam development #164
base: BaslerCam
Are you sure you want to change the base?
Basler cam development #164
Conversation
… the mirror position
… into mirrorfeature
@AhmetCanSolak , Could you help with this request? |
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.
Great start @YangLiujames ! Once conflict details are cleaned, I think I will be able to give a complete review.
|
||
def __del__(self): | ||
self.closecam() | ||
exitcode = 1 |
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.
this line can be omitted
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.
many improvements @YangLiujames thank you, I dropped a couple comments. Once you have some demos implemented let's try to run those demos together on device and see if we run into anything we don't expect so far.
from pypylon import pylon as py | ||
from pypylon import genicam | ||
import sys | ||
exitcode = 0 |
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.
do we need this global variable?
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 was just thinking in case the software crashed and it will close and quit ... From my experience, if things are not closed properly, often restart the computer is required and it is quite annoying. The global variable sort of add a protection in del() if there is a better way. please let me know
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.
if your program crash, there is no guarentee python garbage collector will call __del__
methods :) so it is a false sense of protection in this case. I agree with your concern and we can think what else we can do to address this unclosed devices concerns.
* initial commit, labeler added * glob patterns added
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.
We are getting there, thank you @YangLiujames . I requested some log and name changes.
@property | ||
def image_width(self): | ||
width = self.camera.Width.GetValue() | ||
print("SensorMax Width {} for camera".format(width)) |
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.
could you also switch the print statements with usage of logger
as in mirror device adapter?
@property | ||
def exposure_mode(self): | ||
self.camera.ExposureMode.GetSymbolics() | ||
self.camera.ExposureMode.GetValue() |
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.
you gotta return something here @YangLiujames , I got the value but what does GetSymbolics return here?
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.
The Symbolics return all the available options. For this settings, I changed this function to fix this converns
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 dropped various comments and questions for you @YangLiujames
return min(max(number, lower_bound), upper_bound) | ||
|
||
|
||
class GrabStrategy(Enum): |
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.
maybe rename to BaslerGrabStrategy?
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 think it is ready overall, just the exitcode comment needs to be addressed, otherwise looks good to me @YangLiujames . You can get review from @edyoshikun and @keithchev as well.
No description provided.