Repository navigation
Conversation
f81c71b to
6129cf0
Compare
| if (memcmp(command, "set ui.show_clock", 17) == 0) { | ||
| _prefs.ui_show_clock = atoi(&command[17]) ? 1 : 0; | ||
| savePrefs(); | ||
| sprintf(reply, "> ui.show_clock is now %d", _prefs.ui_show_clock); |
There was a problem hiding this comment.
Can you make each of the replies briefer, like most (and the ones further down). eg just "> now %d"
| if (memcmp(command, "set ui.auto_off_delay", 21) == 0) { | ||
| _prefs.ui_auto_off_delay = atoi(&command[21]); | ||
| savePrefs(); | ||
| sprintf(reply, "> ui.auto_off_delay is now %d seconds", _prefs.ui_auto_off_delay); |
|
|
||
| if (_display != NULL) { | ||
| _display->turnOn(); | ||
| _display->setMaxPartialRefresh(_node_prefs->ui_max_partial); |
There was a problem hiding this comment.
I notice setMaxPartialRefresh() is always called after every turnOn(), which to me indicates that the EPD driver class should have this in its turnOn() impl. And that the ui_max_partial pref is more like config which gets passed to the display instance somehow (at start, and for simplicity could require reboot to apply).
There was a problem hiding this comment.
Yes, ideally I would have grabbed the parameter directly from the prefs, but it is not easily accessible so I found this shortcut to add a method and set it at every turnOn from the loop (not to send it more often). Note that at the moment if the user uses auto_off_delay=0, then the screen is never turned on and the parameter is never applied ... so user needs to turn screen off and on manually for the parameter to be applied.
It could also be sent at start, but I personally don't like to reboot to have parameters set since it forces the user to sync the node after reboot. Tell me what behaviour you prefer and I'll implement it this way ...
About passing parameters, turnOff could also have a blank parameter that could be false by default (instead of having a blankScreen method ... but I didn't want to impact all the display drivers by making the change (maybe it can be done in a subtle way ... I'll see for that)
There was a problem hiding this comment.
I've modified DisplayDriver so turnOn and turnOff accept optional parameters, on turnOn you can specify partial_refresh_count and on turnOff you can give the precision wether you want to blank screen or not
|
Tested on my T-Echo (dev + this PR, companion USB build). All
IMHO: on T-Echo the previous behaviour was better: no periodic full refresh, backlight only while touching, no blanking. The full refreshes (with the freeze) and the lingering backlight are really annoying in daily use, so I'd prefer them off by default. |
|
Thanks very much for the feedback (feedback is always apreciated)
Ok, it should be possible to set full refresh to 0, so it's an error on my side ... will make it int32_t so we can have broader range and negative value (meaning disabled) I will also disable it by default. You're totally right on this one, periodic full refresh is a counter measure to tearing. I was against it when I lived in europe because I didn't see the point (I had no tearing). Now I leave in a tropical country and none of my eink screen work without full refreshes ;) don't know if it is because of temperature or humidity but I need it to get my screens working ... but this should be an opt-in option, not opt-out (and as we have a doc we can explain how to get the best of one's node)
Yes, it should probably, because user can disable backlight on keys, so there is no point in making 0 as always off (the thing is I've been asked to
Yes, this behaviour was the one I set and the one I liked most when I did the UI for techo, so I can only agree with you We can make defaults on TEcho work as before, so users are not lost with the new settings ... |
|
latest commit addresses cli interface responses (as asked by @ripplebiz) and some behaviour discussed with @akalinin-softvelum
and it seems I made a mess again in my PR when rebasing it to resolve conflict ... but it should disapear once the PR is pulled ;) |
6f6a4bd to
f9ec686
Compare
f9ec686 to
d41f20a
Compare
eb285a9 to
61fed4e
Compare
thanks, looks ok to me. |
Some get/set cli commands to tweak display behaviour :
The two first are common to all displays (but second works only if there is enough room).
Other options are for einks, to control backlight and refresh behaviour