-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/G9_Driver #16
base: develop
Are you sure you want to change the base?
Conversation
Looks like
|
…M_dashboard into feature/G9Driversim
… mock_data test changes
def handle_errors(self, data): | ||
try: | ||
response = g9_driv.read_response() | ||
return {"status":"passes", "message":"No errors thrown at this time."} | ||
|
||
except ValueError as e: | ||
return {"status":"error", "message":str(e)} |
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 is being defined outside the class (self
makes no sense as a param) and not used. I think this should be deleted and implement error handling directly in update_data
def update_interlock(self, name, safety, data): | ||
# means good | ||
if safety & data == 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.
I think there's an issue with this logic here. The ==
operator has higher precedence than &
so this is evaluated as safety & (data == 1)
not (safety & data) == 1
(which is how I think it should be)
Opening this for discussion of initial work on G9 driver code.