![]() |
#46 |
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
|
@Mavireck: That was kind of the idea behind the dump/restore API
![]() At least as a backend for that kind of thing, possibly coupled with print_raw_data for more esoteric use-cases. I vaguely recall seeing you use the dump/restore API before, so I'm curious as to what led you to stick to print_raw_data for this? (That's a perfectly valid solution, mind you, just asking in case something can be done to make the dump/restore stuff more approachable/practical ![]() |
![]() |
![]() |
![]() |
#47 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 18290
Join Date: Jul 2016
Location: France
Device: Kobo H2O (broken), Kobo H2O Edition 2 v1 (stolen), Kobo Clara 2E
|
Quote:
I can't see if a way to improve it, it is just that I needed something much more powerful than only dumps and restores ![]() For my dashboard, I needed at some point to update an image which was partially hidden by another one. The problem is, I did not quite have an easy way of knowing how the area they occupy intersected each other. (and it is more and more of an issue if you have a lot of items on screen). Instead of coding it manually for every single situation, I sat for a few hours to make KSSM, which does all that for you ![]() In short, dumping and restoring works great as long as your app remains small, but after that it gets more and more complicated. If you don't believe me, have a look at the test file, with the 3 rectangles thing. If you can, try it. It is extremely easy to use, but I could not think of an easy and general way to do the same thing with dumps and restores ![]() Also please note that it is still widely WIP, one day ago it was only in my head ![]() Last edited by Mavireck; 08-28-2019 at 01:32 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#48 |
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
|
@Mavireck: True, I definitely get that for more complex setups, it can get hairier
![]() (And, no matter the state of the code, seeing what people do with it is a great way for me to tweak stuff, hence my pesky questions ;p). That said, you do have access to a dump's width/height & position, so it should be usable for clipping detection, too. (Unless I'm missing something obvious, in which case, do remind me ![]() Looking at the code, I can somewhat understand that once you start chopping rectangles up in little bits, being able to crop stuff starts coming in handy ![]() That was indeed left to the user (and it can get a bit tricky when you want to do it in-place with only a memory buffer on hand), so I added support for that to the dump/restore API, since it was already messing with pixel formats and memory buffers internally, and the "metadata" needed to do it right was mostly already all there ![]() EDIT: ... Which I've just fixed ;p. Not quite sure if it's more usable this way than via an FBInkRect to handle the crop settings... Last edited by NiLuJe; 08-28-2019 at 02:18 PM. |
![]() |
![]() |
![]() |
#49 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 18290
Join Date: Jul 2016
Location: France
Device: Kobo H2O (broken), Kobo H2O Edition 2 v1 (stolen), Kobo Clara 2E
|
Quote:
![]() I will think about it, to see if I can improve the code clarity or performance using cropped dumps. But as far as simplicity and clarity are concerned, I think print_raw_data is more than enough for my use ![]() |
|
![]() |
![]() |
![]() |
#50 |
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
|
@Mavireck: Fair enough
![]() EDIT: I forgot to mention that print_raw_data *does* honor is_inverted (unlike restore) ![]() (While with is_nightmode, the data is written as-is, and only inverted at refresh time by the EPDC, without affecting the fb). EDIT²: In some circumstances, you can also do a batch of prints with no_refresh enabled (so they don't actually trigger an eInk refresh, but are written to the fb), and finish the batch with a manual refresh call (thinking of printing a stack from bottom to top here, for instance ![]() Last edited by NiLuJe; 08-28-2019 at 03:48 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#51 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 18290
Join Date: Jul 2016
Location: France
Device: Kobo H2O (broken), Kobo H2O Edition 2 v1 (stolen), Kobo Clara 2E
|
Quote:
About is_inverted and is_nigthmode, is there one which is faster than the other? As for the no_refresh, I forgot about it, so I did it completely differently : my change The advantage being that if one day I am to port this to another device or another library, it will be easier (because I use less-specific functions). I do at some point planned to separate what is general (the stack manager logic) from what is device-specific (FBInk functions, refreshs etc...). That should make it easier if one day I want to port my apps to android for instance, or whatever device. |
|
![]() |
![]() |
![]() |
#52 |
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
|
Technically, leaving it to the EPDC (i.e., nightmode) should always be faster
![]() In practice, software inversion is fairly cheap in most cases (especially on a Kobo, since they're never @ 8bpp on their own). |
![]() |
![]() |
![]() |
#53 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 876
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
What a fascinating series of posts. I've been thinking about GUI toolkits on Kobo's for a while now, investigating different strategies.
Ideally, something like littlevgl, Dear Imgui, or nuklear could be quite nice to use, although they all have their pros and cons. Littlevgl looks easily portable to different devices, but its event handling seems to be tied to a refresh rate/polling mechanism. Dear Imgui looks nice, but it's C++ and designed for OpenGL, although there is a software rasterizer that has been developed for it. Nuklear also looks quite nice. It too is OpenGL, with a software rasterizer that has been written. It's a single header library, which makes for easy deployment. Main issue is the font handling seems very convoluted to get started with. Another thing I've been mulling is the idea of making my own toolkit, very much like KSSM here (although probably in Go). |
![]() |
![]() |
![]() |
#54 |
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
|
Yeah, I vaguely looked at nuklear (at a glance, for a simple "what could be done" PoV), and, AFAICT, we'd "just" need basic primitive drawing capabilities for the software rasterizer (i.e., lines, circles, polygons & co. Currently, FBInk makes do with flat filled rectangles only). Didn't look at the font handling at all, though
![]() I don't have any urgent need for a GUI anywhere myself, but that was interesting stuff to look at ![]() Last edited by NiLuJe; 08-28-2019 at 06:08 PM. |
![]() |
![]() |
![]() |
#55 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 18290
Join Date: Jul 2016
Location: France
Device: Kobo H2O (broken), Kobo H2O Edition 2 v1 (stolen), Kobo Clara 2E
|
Quote:
To be honest, I have no idea how to deal to make them work together with FBInk... That is way beyond my skills 😉 What stopped you from making your own toolkit? If you had already thought about it, what major changes would you do? |
|
![]() |
![]() |
![]() |
#56 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 876
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
And of course, once my brain started to think about toolkits, it wanted to go the whole hog with layouts and widgets and event handling... |
|
![]() |
![]() |
![]() |
#57 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 197
Karma: 38050
Join Date: Oct 2013
Location: Anywhere I am sent!!!
Device: Kobo Touch
|
Quote:
Looking forward to the next dashboard release. |
|
![]() |
![]() |
![]() |
#58 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 18290
Join Date: Jul 2016
Location: France
Device: Kobo H2O (broken), Kobo H2O Edition 2 v1 (stolen), Kobo Clara 2E
|
AN UPDATE
I got my hands on a KoboMini yesterday. Although I realized some fonts files were corrupted (??), therefore crashing the app, it worked well on the mini out of the box, except for a few missized icons (oh and touch input is not working too ![]() https://github.com/Mavireck/Kobo-Das...eases/tag/v1.6 Have fun! And as I said earlier, September has started, so I will be absent for about 10 months. (You may therefore consider this project to be discontinued) A quick note about KSSM (which has become PSSM instead) The dashboard is not based on PSSM yet. I have made a PSSM version of my Python Launcher, but I was ahaving some trouble with my tag system, which I will remove. I will instead use a nested tree-like structure for the stack. But that is going to be for next year. Last edited by Mavireck; 09-01-2019 at 04:25 PM. |
![]() |
![]() |
![]() |
#59 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 197
Karma: 38050
Join Date: Oct 2013
Location: Anywhere I am sent!!!
Device: Kobo Touch
|
where does Api key and location go???
also a shame you will have to discontinue it... Looking great so far |
![]() |
![]() |
![]() |
#60 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 18290
Join Date: Jul 2016
Location: France
Device: Kobo H2O (broken), Kobo H2O Edition 2 v1 (stolen), Kobo Clara 2E
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle weather dashboard | matopeto | Kindle Developer's Corner | 23 | 02-17-2025 10:33 PM |
How to use a Kindle DX as information dashboard | peanutman | Kindle Developer's Corner | 1 | 05-05-2017 05:31 AM |
Kindle as a motorcycle dashboard? | elektrinis | Kindle Developer's Corner | 22 | 03-16-2016 01:25 PM |
Macinstosh Dashboard Opens Security Vulnerabilities | Bob Russell | Lounge | 0 | 05-09-2005 11:40 AM |