-
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
SMIBHID has a webserver! Closes #248 #249
base: master
Are you sure you want to change the base?
SMIBHID has a webserver! Closes #248 #249
Conversation
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.
Code is massive and looks OK, apart from some PEP8 naming convention violations.
I want to test this myself on my own SMIBHID dev board. Probably wont happen until tomorrow or Wednesday.
smibhid/http/website.py
Outdated
from json import dumps | ||
import uasyncio | ||
|
||
class Web_App: |
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.
PEP8 naming violation - should be WebApp
smibhid/http/website.py
Outdated
self.app.add_resource(wlan_mac, '/api/wlan/mac', wifi = self.wifi, logger = self.log) | ||
self.app.add_resource(version, '/api/version', hid = self.hid, logger = self.log) | ||
|
||
class wlan_mac(): |
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.
again - should be PEP8
smibhid/http/website.py
Outdated
logger.info(f"Return value: {html}") | ||
return html | ||
|
||
class version(): |
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.
PEP8
smibhid/http/webserver.py
Outdated
self.code = code | ||
|
||
|
||
class 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.
PEP8
smibhid/http/webserver.py
Outdated
raise HTTPException(400) | ||
|
||
|
||
class response: |
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.
PEP8
smibhid/http/webserver.py
Outdated
await resp.send(res_str) | ||
|
||
|
||
class webserver: |
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.
PEP8
PEP8 issues adjusted. The webserver module is not mine, but I have adjusted enough of it already to take on and continue adjusting things like class names and have adjusted these as well. |
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.
Happy with the PEP8 changes
@sjefferson99 I want to test this tomorrow/Wednesday before I approve |
There is a merge conflict - please sort it :) @sjefferson99 |
No description provided.