Message |
|
Perfect, all clear, thanks!
|
|
|
I am still working on a sketch based on the 'takeOverDisplay' example, where the menu function remains in the background and by default I display a screen I created.
I tried to exploit the encoder value read during the execution of the function called by the 'takeOverDisplay' callback to be able to view other screens.
in particular I am going to make a partial update of the screen that allows me to view the temperature of other areas of the house every time I rotate the encoder, based on the value read and recalling different functions. I noticed that every time the 'takeOverDisplay' function is called (for example exiting the menu), the encoder value is always 50.
Can I rely on this value?
is it a default value you set?
at the moment, for how I set up the sketch, everything is great, but I would like to be sure that this value remains the same.
Other question:
There’s a timer that takes me back to my screen ( or takeOverDisplay) . How can I set it, if is possible to set?
|
|
|
ok, I've tested the "simplest" one and it work!
Now I work on it, thanks!
really great work!!
|
|
|
Hi,
I'm working with ESP32, ILI9341 and rotary encoder around takeOverDisplay example.
I'm trying to take menu ready to use in background and one or some other display window to visualize other things by default ( for example temperature and time always visible and when I click encoder, I start menu).
With one default window I have no problem,I have add a window design in "myDisplayFunction" of the eample, so when I use the CALLBACK_FUNCTION, I return to my default screen.
Now I want to scroll between some other two window with encoder (outside of menu function) and go to Menu only when I press encoder button for 5 sec (for example).
My question is:
there's a way to use encoder outside of Menu function for other purpose? For example, if I press button short I turn on the backlight, if I move encoder I switch between two other screen, if I press button for lon time I will start Menu.
how can I manage encoder button for a long time pressed? there's a built in function or I must create by myself?
thanks
|
|
|
in 2.0 you can even create your own display driver in a handful of lines of code, it's just a case of implementing a really simple drawing interface for most cases
I'll take a look
the Linux version is about to get even more UX improvements.
so happy about that!!
|
|
|
As long as it works for you then all is good.
Ok thanks!
|
|
|
as described in the title ...
is there the possibility of creating a space that is always visible in the lower part of the screen?
and maybe you can always view the date and time, even in the various submenus?
I was thinking of creating a 'mask' to apply above the various menus, but if a title band is created, perhaps it can also be created in the lower part.
maybe there is already some dedicated function?
however, I would like to keep the date and time on the same line, only visible (not editable) and possibly editable within a submenu. like many thermostat or boiler or heat pump displays that I find myself working with, it might make sense (to me! ??).
Thanks in advance!
|
|
|
I used your solution
setChanged(True)
it seems more correct .
setEditing (true)
needs
setEditing (false)
otherwise I get stuck (if I remember correctly!).
|
|
|
I find out now the correct function! thank you!
I modify and verify immediately.
when I call 'menuOra.setEditing (true)' I get an automatic positioning of the gray bar on the corresponding menu and an update of the time as desired.
I must, however, declare it 'false' immediately afterwards so as not to be 'blocked'. I haven't parsed the library and I'm probably not using it right, but it works!
In MenuItem class Reference , setEditing(bool active) description is ‘sets this item as the currently being edited, so that the renderer shows it as being edited’.
what do you think about it?
|
|
|
I've solved in this way ( please tell me if is the right way):
taskManager.scheduleFixedRate(1000,[] {
printLocalTime();
if(sTime == 0){
Serial.println("UPDATE TIME FROM task");
menuOra.setTime(TimeStorage(hTime,mTime));
menuData.setDate(DateStorage(dayTime,monthTime,(yearTime+1900)));
menuOra.setEditing(true);
menuData.setEditing(true);
menuOra.setEditing(false);
menuData.setEditing(false);
}
});
task run every second and control time, if senconds = 0, I can update field.
|
|
|
Thank's for you answer
I've forgot to write that I'm under Arduino core..
So I've solved in this way about setTime :
menuOra.setTime(TimeStorage(hTime,mTime));
where hTime and mTime are:
hTime = timeinfo.tm_hour;
mTime = timeinfo.tm_min;
from a 'struct tm' based on 'time.h' library of Esp32 Arduino core example.
But now the problem is to refresh display ( possibly partially) and/or update time in real time.
I've tested a schedule but nothing change.
something like this in setup(), before setupMenu() :
taskManager.scheduleFixedRate(1000,[] {
menuOra.setTime(TimeStorage(hTime,mTime));});
time is updated only if I move encoder and generate interrupt.
There's a way to update time without move encoder ?
thanks
|
|
|
Hi,
first of all.. great work!!
I'm working with esp32 and ILI9341 tft display, I've tested tcMenuDesigner on Linux and it work well, thanks.
I'm trying to get correct time and date on display but I've some problem to understand the correct way.
I'm using 'time.h' lib, so I have time and date in byte format or String format(if needed) , but it's not clear (for me!) how to implement in sketch, function to get correct time and date .
Could you provide a very basic example explanation of it?
thanks
|
|
|