-
Notifications
You must be signed in to change notification settings - Fork 130
DPS mode & Settings Screen #240
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
base: master
Are you sure you want to change the base?
Conversation
Maximum power can be defined and a warning icon will be displayed if output power exceeds 80%. Power will cut if it exceeds 100% and a flashing icon will display. Reset by pressing power button once.
While the deactivate callback clears the tft display, because of uui.c's way of changing screens, another call to enable(false) is called. Any draws in enable() will cause artifacts on the next screen. All draws should be done inside the tick callback instead.
fixed the rot m1/m2 event added 3rd row to display to test
Third item will not change if in select mode Screen cannot change is locked if power is on to prevent inadvertant data/state loss Colon rendering should be less glitchy
This should only be included if the CV option is enabled.
Use the settings screen to adjust the brightness instead
The UI was excessively redrawn when screens change with the call to uui_refresh. This causes UI elements to flicker. Instead, each screen will need to refresh only what is necessary on activation The settings screen no longer flicker when moving through pages as only the table portion is blanked with a tft_fill call rather than tft_clear.
|
That is one impressive PR. I will have a look at and make sure you did not spend all that time for nothing ;) |
Removed the lock screen option which had no effect Configuration reset triggered through the reset option rather than the key combination which is prone to accidental triggering Popup message will show when settings are saved or reset
A bunch of events were triggeringg past_save. This change will only trigger a write when power is turned on or when presets are saved to reduce flash wear.
V/A buttons focuses voltage/current directly. Preset bars are set on screen activation if values match Boolean values rendered by uui_number no longer show numeric values
This issue resulted in recalls failing after a reset.
|
Hi, this is awesome! Many thanks |
|
Hi Conor, I noticed the presets weren't working with my initial PR. The problem was the past data was saving with incorrect IDs and should have been fixed with commit d52b0f2. Did you test with that commit in place? If so, I'll try to replicate it on my end, though I haven't had issues with presets since that commit. The screen should be saving the voltage+current values during the Thanks for the feedback. Cheers |
If insufficient voltage is provided for the set voltage, a warning bar will be displayed next to the voltage value. This will override the constant voltage / constant current mode as it stops functioning properly in this state.
|
Hi thanks for the fast reply! |
|
Just to confirm the behavior you're experiencing, Conor: After setting a voltage+current value to something non-zero, when you hit set+m1 or set+m2, the values reset back to 0 with the m1 bar displayed? There isn't anything to building/flashing and I doubt it's something that you're doing incorrectly. I'll try replicating your issue after erasing the flash again. I had it glitch out with similar behavior as you described during development and it's possible it's working for me because I had presets saved previously. Also, I just noticed the automated build failed from a commit I made last weekend which pushed the program size over the available flash size. I'm sure there's lots of places to optimize which I'll do when I get some free time. |
|
Yes this exactly what I experienced. |
Possibly when nothing is initialized, past read will fail which causes the logic to not write the new value. I confirmed this behavior by erasing the flash and then attempting to save the last power setting which failed.
|
I was able to replicate some of the mentioned issues after erasing the flash and then re-flashing again. Could you please try again with opendps_DPS5005.zip or build from my latest commit on this PR. You can also clear the flash before reflashing in case that's an issue. Just remember to also re-flash the bootloader. Cheers. |
|
Sorry for the late reply, saving the voltage and current after power off works now. when pressing m2 (or m1) + set it just switches to m1 or m2 respectively without saving as a preset. |
|
Can someone build this for dps3005 for me pretty please? I dont have a build env setup for this at the moment. |
Hello everyone!
I hope you are all doing well. I recently wanted to rebuild OpenDPS for my devices but had some difficulty getting all my separate PRs to work in a satisfactory manner. I spent some time over the past couple days getting what I had working previously on the latest master branch as well as further refining the settings screen and some UI rendering to reduce visual glitchiness when changing screens.
Due to the fact that my previous PRs were never merged after sitting for a very long time and the dependencies between some of my desired changes, I've opted to merge my PRs into one instead. Hopefully those that are interested in trying out my DPS mode will have an easier time by being able to just merge one PR.
Features
DPS Mode (based on #166)
Settings (based on #184)
In the settings screen, you may adjust:
Popup messages when settings are saved or reset. Eg:
There are other changes in this PR that may require additional review by kanflo.
I have tested this PR with most features enabled with the exception of serial/wifi connectivity. Everything appears as it should and seems to function OK. For my own purposes, I have been using is compiled with most features disabled:
Feedback is welcomed as always. Please feel free to cherry pick the desired changes to merge into this repo as I'm aware not all the changes here might be desirable to everyone.