Ok I promised to give more in depth overview of the device, so here is a little story of my time with a Pyra prototype.
TL;DR : The pyra is an awesome device. The pyra community is as awesome as the device. Following closely the pyra developpement is an enlightening experience !
Initially what ED expected me to work on was 2 things :
1) a deamon that read the volum-wheel value and set the audio volum accordingly.
2) improve the input system
When I got the device, I immediately looked into 1st task. and quickly discovered I'm having and hardware issue with that volum wheel. What a huge bummer !
Actually the deamon kind of exist already :
https://dev.pyra-handheld.com/packages/pyra-scripts/blob/master/scripts/letux/volumed
But as you can see in it's code, it's far from optimal. The fact that this is a shell script is not the worst part : it wake up every 0.1s to check for volum wheel value changes. That's very bad for battery life. Luckyly there's a way to do it better : IIO device support for trigger, so the deamon could only wke up if the wheel is moved. see :
https://wiki.analog.com/software/linux/docs/iio/iio#trigger_and_software_ring_buffer_support
Even if I cant read the value of my wheel (because of an hardware failure, remember I'm having an old prototype board) I'll try to test the IIO triggers and build the deamon anyway. But since there's a high chance of failure, this have slipped on the bellow of my todo list.
So, I moved to next task. The keyboard definition was (like on the pandora) an Xmodmap file that needed to be loaded somehow. A bit hackish. For some reason I changed my DM to slim, and then the Xmodmap wasn't loaded. So I converted that map to a complete keyboard definition (
https://dev.pyra-handheld.com/packages/pyra-config/commit/d36b631ac298823e0d60390d734ddc7e6084e655). One less hack to go
Then for the follow up of this task I needed to disable the mouse on nubs feature, and quickly discovered how badly calibrated was the touchscreen. One IRC discussion later, ED confirmed me that this was an issue we had to look into, so I was starting to work on a calibrator for the touchscreen. Why yet an other calibration tools, you're going to ask. Easy enough, Debian by default use libinput for all input device. It's a good move so Xorg and wayland use the same input system. The problem is : xinput_calibrator doesn't support libinput. Its configuration system is rather smart : it use a transformation matrix that should transform touch coordinates to screen coordinates.
After some times fighting myself with maths, I finally build some formulae and sent my code to Atc so he could test and eventually package it. Result of aTc tests : not working properly on his unit... While discussing about this with aTc, I whined about the screen that bend in the corners. That doesnt help calibrating properly. ED stepped in to say that none of the dev prototypes have the pading required behind the screen to stop that bending.
Having seen some videos of the pyra assembly, I though I may be able to add the padding myself. I have to say, I'm realy shitty when it come to hardware. The only time I opened my Wii, I bricked it, so opening the pandora was clearly not an option. But I tried anyway with the pyra. 3 screws to remove. folded 4 pieces of papers the height I needed and closed the top part back. turning on the pyra crossing finger... and the screen was flickering. I was all omg ! Reopened the top part, to discover that the screen link was badly in place. Put everything correctly in place, closed the top part. and booting it back : fully working and no more bending !
If I can do it, youll be able to do it too. The pyra is realy user servicable !
But code wise it was still a mess. So I started to look around for better maths and quickly I dicovered that someone wrote an other calibration tools for libinput touchscreen (
https://github.com/reinderien/xcal/). After a rather long chat with its author (yeah, open-source community is that awesome), we agreed that there was something wrong on the pyra touchscreen drivers. So I was back on IRC with that information. I've been given complete instructions to rebuild the pyra kernel and that specific part (the dtbs). Beside we discussed what might be the culprit in the driver configuration. Before I finally managed to build this correctly, aTc had beaten me to it, he build better drivers configuration that he provided me. With these configurations, and the paddings in place I was now able to correctly work on a better version of xinput_calibrator. After googling some more, I found this :
https://math.stackexchange.com/ques...atrix-from-4-projected-points-with-javascript. And tried to implement it. But the math wasnt working : the produced matrix still need to be "Dehomogenizated" which I've failed at doing. So I'm currently working to use the same algorithm as xcal.
While I've shared some link in here, I'm sparing you some of the most complex maths stuff I readed to understand what was going on. If someone is a bit currious, I would suggest you to read what TI provide as
documentation of the touchscreen to build this matrix. Full of math !
What a ride so far. I've learned many things already and that's only the begining. All the dev team have been very helpfull so far and very supportive of my attempts to help.
Beside, since, I'm now syndicated the all the dev channels, I'm more in touch with all the dev ongoing, and it's an awesome experience. I've readed some chats way over my head on many things already. And seing how all the issues (like that 4GB memory issue) is being worked on (aka as a great team work) is an heart warming experience.
I've so much more projects in mind to help the pyra on many sides. So keeps tuned.