![]() |
#31 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 175
Karma: 863
Join Date: Oct 2009
Location: Germany, Karlsruhe
Device: Iliad v2, DR800S (inlove)
|
As we need only a partial update I'd go for [2], I doubt you can do this with [1].
Or alternatively I'd wrap the label with GtkEventBox, sysd/display.c hints this explicitly. |
![]() |
![]() |
![]() |
#32 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
I suppose problem comes from that device doesn't know which part to update, but I'm not sure because full refresh didn't work either... So by now we must use CoolDragon's menu_show/menu_hide idea to refresh the clock ![]() ![]() Iņigo |
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Addict
![]() ![]() Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
I know nothing about GTK programming. The only thing that is similar to what we need seems to be the battery gauge: it will update when certain threshold is reached. Maybe there is similar trick that can be applied to the clock?
Another thought is: given the fact it actually updates when the menu bar is pressed, it is actually capable of doing a local refresh, but just ignoring some events. Is it possible to register some other events to the clock widget? |
![]() |
![]() |
![]() |
#34 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
OK, trying to forget the clock refresh fiasco I've just finished the changes to make notepad application to behave as the DR1000 one, that is, not to close the current note when opening another note or document.
I need to test more and clean the code. Maybe tomorrow. My intention is to finish this and create a new binary package this weekend with the improved notepad and the clock. Any idea, comment or suggestion? Iņigo |
![]() |
![]() |
![]() |
#35 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
Battery uses images selecting among different icons (5?) depending on the battery level. I studied the code but it doesn't do anything special, change the image and do a gtk_widget_show() only. I think that the image shown in screen remains static until a new full refresh is performed, showing the new image. That makes sense because battery doesn't drop from 50% to 25% in a small time frame, so any event will happen eventually. I also thought in forcing an event like menu show/hide but didn't found anything easy to launch. We would need some esoteric arguments, such as context and some others... |
|
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Hi Iņigo,
I think it has to do with the idle/suspend behaviour. After 5 seconds of idle behaviour (I.e. no 'busy background' and no windows-events for 5 seconds) a suspend mode is triggered, which stops the cpu-clock (as far as I understand the code/script correctly). I assume that the cpu wakes up from this when a button is pressed, stylus is used, battery is empty, usb is connected, ... These are all 'externally' triggered events that (presumably) trigger an interrupt to wake-up the CPU (i.e. start cpu-clock). The purpose of this all is to limit power consumption. The downside is that the timers like you use them will not fire until an external event occurs. Can you try to set the timeout to smaller then 5 seconds? That would 'confirm' my ideas on the internal workings of the firmware/hardware. You already told that the clock is not even updated when you turn-pages, that would contradict with my idea above... As another experiment you could show mm:ss instead of hh:mm and update every second, 2s, 5s, 10s, 30s to see if you get updates at all. |
![]() |
![]() |
![]() |
#37 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Could this help? Found it in notepad_ipc.cpp:
Code:
static void ipc_menu_update_toolbar(void) { eripc_send_varargs(eripcClient->context, NULL, NULL, ERIPC_BUS_SESSION, DBUS_SERVICE_POPUP_MENU, "updatesFinished", ERIPC_TYPE_INVALID); } |
![]() |
![]() |
![]() |
#38 | |
Addict
![]() ![]() Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#39 |
Addict
![]() ![]() Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Still, works on QEMU, but not on device.
|
![]() |
![]() |
![]() |
#40 |
Addict
![]() ![]() Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
A little improvement:
If I replace the code in statusbar_timeout_clock() from: Code:
sprintf(now_str, "<big>%2.2d:%2.2d</big>", local->tm_hour, local->tm_min); gtk_label_set_markup(GTK_LABEL(label), now_str); Code:
sprintf(now_str, "%2.2d:%2.2d", local->tm_hour, local->tm_min); gtk_button_set_label(GTK_BUTTON(g_menu_button), _(now_str)); Also, there is something true with regard to Mackx's "suspend" theory: turning pages does NOT ALWAYS re-draw the clock if the time between page turning is long enough (like several minutes), but if you turn pages fast enough (maybe less than 5 seconds ![]() Last edited by CoolDragon; 08-26-2010 at 04:20 PM. |
![]() |
![]() |
![]() |
#41 | ||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Hi everybody,
Even the simple label update works on qemu. That's why I think the problem is related to the e-ink technology and refresh implementation. Quote:
Quote:
Anyway, I think I'll leave the code as it is now... perhaps waking device juts to update the clock would drain the battery. And as a simple show menu refresh the clock I don't think is so awful to live with it. Uhmmm... I didn't notice the eripcClient is a global variable that can be used anywhere... interesting! |
||
![]() |
![]() |
![]() |
#42 | |
Addict
![]() ![]() Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#43 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
EDIT: adding a name for the widget (gtk_widget_set_name() ?) could help to identify only this label in the style file. Last edited by Iņigo; 08-26-2010 at 04:50 PM. |
|
![]() |
![]() |
![]() |
#44 |
Addict
![]() ![]() Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
OK, now your markup becomes handy. Just wrap the string with <tt> and </tt>.
By the way, <big></big> seems a little bit too big, the default size (nothing specified) is the same as gtk_button_set_label() |
![]() |
![]() |
![]() |
#45 |
Addict
![]() ![]() Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
This seems to further justify Mackx's hypothesis: on the real device, if you tap on the separator(blank space between toolbar icons and status icons), the clock will update very nicely (just the changed digits, nothing else).
So what's the easy way to trigger this event in statusbar_timeout_clock()? |
![]() |
![]() |
![]() |
Tags |
devel, dr800+, features |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 ANN: DR800+. Port of some DR1000 features to the DR800 | Iņigo | iRex | 274 | 04-05-2013 02:24 PM |
DR800 usbnet (USB networking to make development easier) for DR800 | GregorRichards | iRex | 40 | 07-20-2011 09:38 PM |
DR800 Plugin development for DR800/DR1000 | yuri_b | iRex Developer's Corner | 0 | 09-18-2010 09:46 AM |
DR800 | parryl | iRex | 1 | 08-06-2010 03:00 PM |