-
Notifications
You must be signed in to change notification settings - Fork 1
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
Gw dev #1
Conversation
@omonrise , can you also have a look, my C++ skills are not great ;) |
@GreenWizard2015 , so my understanding is that you modularized everything and created structs to contain the information in a more transparent and better defined way. I can see that we now have 2 modules:
I which you contain the logic of pouring the tea and setting up the Wifi connection and webserver respectively. @omonrise is going to give this a thorough look tomorrow as he is better with C++ then I am. I will test this PR on the device itself, to see whether we have any integration issues. @GreenWizard2015 I found an interesting page regarding unit-tests here: https://docs.platformio.org/en/latest/advanced/unit-testing/index.html Maybe something you would like to review. |
Ideally, I'd like to test the entire work cycle, but I'm not certain if the effort will be justified. I'll read through the documentation and then decide. |
Test on physical Device:
I cant find the device in my network, it seems that the device is not connecting to WiFi any more.. I am missing a lot of logging too... From what I can tell, we have something go wrong in the |
Found the issue! Its line 61 with
Commenting that out, resolved the issue. The loop is probably infinite somehow.
|
API works in practise too! |
My review:
For some reference: https://www.freecodecamp.org/news/http-request-methods-explained/ |
…emoved unused dependency.
Indeed, in the original code, there was only a firmware version check, WITHOUT halting operations. Personally, I find both versions of the code odd. If the firmware version does not match the library version, there's no guarantee of correct functioning, and it would be prudent to stop operation. On the other hand, this check seems pointless to me, since, for now, we definitely know whether the system is working or not. I would either completely remove this check or make it more stringent to ensure proper operation
For me, this device is like a satellite flying billions of kilometers away from Earth :) Its software needs to be as simple as possible.
I suggest the following changes:
|
Makes sense to me. Let me reply in kind:
|
I was planning to make the UI external. I have similar experience. I've created UI using ReactJS, where the user specifies the local IP of the device and interacts with it. The UI itself can be hosted in any way, for example, on Versel. That's why I'm trying to make the API simple and flexible, moving all non-critical logic to the UI.
Yes, this will require complicating the code, a state machine, and will add edge cases. However, I believe the functionality being added is worth these efforts. I'll take care of it after the PR is accepted (unfortunately, I don't know how to properly start working before the PR is accepted). |
Branch is merged. Please make a |
Lets Review!