![]() |
#211 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Fair warning if your device is already is USBNet mode: Nickel will happily switch to the "Connected" black screen, but will crash and burn a horrible death on *exiting* it ^^.
(Perfectly safe in a stock USBMS state, though). |
![]() |
![]() |
![]() |
#212 | |
Connoisseur
![]() Posts: 56
Karma: 74
Join Date: Oct 2010
Device: Kindle 3
|
Quote:
So, made some progress.. have a chessboard being drawn using calls to fbink_cls for the squares, and fbink_print_raw_data for the pieces extracted from a PNG sprite sheet using PIL. Also have basic touch input working with libevdev. Didn't realise it even had the ability to "grab" the input built in! Sweet. What's the deal when it comes to best practice drawing stuff to screen. I'm guessing that ideally you want to only draw stuff to screen that has changed to avoid unnecessary flickering, and that fbink doesn't do anything clever in this regard? Does fbink_cls do something special at a hardware level? Is it more efficient than printing an equivalent image for example? |
|
![]() |
![]() |
![]() |
#213 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
The EPDC itself will do some amount of magic, but, generally, yeah, only repaint/refresh damaged areas.
That's only for *refreshes* though. Painting will always paint ![]() As far as FBInk is concerned, you can draw without refreshing the screen, which is useful when you have a bunch of small things to draw in a short amount of time that you only really care about displaying at once. That usually involves setting the no_refresh flag in your FBInkConfig instance, and then doing a manual fbink_refresh call at the end of the batch, with the appropriate region to encompass all your new stuff. |
![]() |
![]() |
![]() |
#214 |
Connoisseur
![]() Posts: 56
Karma: 74
Join Date: Oct 2010
Device: Kindle 3
|
Is there a way to toggle force_wifi and turn wifi on or off programatically?
Also if force_wifi is on and the device is put to sleep, does the wifi stay on and drain the battery? Or does sleep actually put the whole device to sleep? Last edited by Acorn; 01-25-2021 at 12:42 PM. |
![]() |
![]() |
![]() |
#215 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Acorn: NickelDBus can probably do it, I think?
And, yes, force wifi prevents suspend, which will murder a battery in less than an afternoon ![]() |
![]() |
![]() |
![]() |
#216 |
Connoisseur
![]() Posts: 56
Karma: 74
Join Date: Oct 2010
Device: Kindle 3
|
Yeah, been experiencing that! Turn it on to do some tinkering over SSH and forget to turn it off. Want to find a way to turn it on with a long timeout or something.. or find some other way to make sure internet is kept on, but only while my app is open and active. I guess ideally if you put the device to sleep while my app was running it should turn off wifi and not drain your battery.
|
![]() |
![]() |
![]() |
#217 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Yeah, NickelDBus can do what you want regarding WiFi. Look at wfmConnectWireless and nsForceWifi.
As a bonus, you can also listen for the the various wireless manager signals to know whether or not the connection succeeded (for example wmNetworkConnected). |
![]() |
![]() |
![]() |
#218 |
Connoisseur
![]() Posts: 56
Karma: 74
Join Date: Oct 2010
Device: Kindle 3
|
Oh awesome, will have a play with that! Any idea how I could make sure force wifi is off when the device is put to sleep? Is there a way to listen for that?
|
![]() |
![]() |
![]() |
#219 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
You pass a string to nsForceWifi to enable, disable, or toggle.
|
![]() |
![]() |
![]() |
#220 |
Connoisseur
![]() Posts: 56
Karma: 74
Join Date: Oct 2010
Device: Kindle 3
|
Yep, looking at the examples in the docs I managed to figure that out. Still not sure how to listen for / react to the device going to sleep though.
|
![]() |
![]() |
![]() |
#221 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
|
![]() |
![]() |
![]() |
#222 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Let's continue the NickelDBus conversation to the NDB thread.
|
![]() |
![]() |
![]() |
#223 |
Member
![]() Posts: 19
Karma: 10
Join Date: Feb 2014
Device: pw, pw2
|
Quick question:
What is the correct way to print a string that is starting with a dash, e.g. "-1°C"? With FBInk v1.23.1 I'm getting a parsing error regardless of how I try to escape the string. |
![]() |
![]() |
![]() |
#224 |
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Code:
fbink -- -1 |
![]() |
![]() |
![]() |
#225 |
Member
![]() Posts: 19
Karma: 10
Join Date: Feb 2014
Device: pw, pw2
|
Thanks a lot
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Small tool for filling book library in Kobo Aura | Paxerus | Kobo Developer's Corner | 2 | 12-31-2013 07:05 PM |
Small print | Broadback | Conversion | 12 | 12-12-2011 02:31 PM |
Small Tool to change book order (PRS-x50) | goaspy | Sony Reader | 113 | 10-14-2011 03:28 PM |
small print | breezeman | Introduce Yourself | 13 | 07-03-2011 09:02 AM |