Closed takov751 closed 7 months ago
Hi, so it's been a long time since I've worked on this so my memory is rather hazy...
Did you make sure to call fb.Init()
before attempting to print anything?
Thanks for the quick reply.
Yes i did called init(), but in function main. So do i need to call init in this function as well? So is it init, open and close fb in this function every time it is called or there's a more efficient way?
Nah, I think Init()
only needs to be called once. Again, memory is hazy, apologies. @NiLuJe might have an idea, although this library is now using a very old version of FBink so...
After i include init in function it's working now, however i will have to find some solution to not mess with memory. So it seems i need to start doing some asynchronous stuff. I am watching kobo input events and trying to trigger printing based on touch and network events.
I am trying to turn my kobo reader into a streamdeck/ dashboard unit maybe use it for some home assistant stuff
Solved by running fbink module as a goroutine and i have prepared 2 channels for text and image url to be watched continuously. So now it's working . Thanks for your work and time and for @NiLuJe for all the extreme effort that makes repurposing these devices way more easier.
So project kobodeck/kobodash incoming
Assuming Init
maps to fbink_init
, you do need to call it at least once. In C, The FBInkConfig
struct that it takes can then be duplicated if you need multiple sets of configs, but I couldn't say whether that's doable with the Go wrappers of that ;).
Regardless, it's safe to Init multiple times anyway (it certainly is in C, again, assuming there's nothing internal/opaque being done in the Go objects there). (e.g., some config fields require an init to "take", so calling it multiple times needs to be safe ;)).
Greetings,
I am trying to use this library PrintRBGA function with a function that returns *image.RGBA . Any ideas ? running on kobo Glo HD. returns error: