Starting work on the open source firmware for the V3,
I've got a good idea what GPIO does what, even if I can only replicate the existing firmware others would be free to add features of their own.
So far, I can set the Fan speed and I can read the RP2040 internal temperature sensor. The power button is a bit tricky I'm not sure how I will read the different combinations of presses.
In stock firmware a press of the button while off will turn on the power to the pi. While on a press does nothing, a double tap will reboot a long press will ask for power off, and a very long press will cut power now. the problem is that the long press is 3 - 5 seconds and anything longer is cut power now. The controller will send a pulse of some length to denote what button press it detected.
I'm thinking that the button presses are okay but the very long press should be longer, On my laptops you have to hold that button for 30 seconds or more to force power off. This seems reasonable to me and I could make that length programmable. The biggest change I want to make is the way the daemon knows what to do. Rather than a pulse width telling the Pi what to do, I'll raise that pin high to denote there is an event that needs to be read, then the daemon on the Pi can read the event register to see what to do.
I just need a good way to code for detect button patterns.
I've got a good idea what GPIO does what, even if I can only replicate the existing firmware others would be free to add features of their own.
So far, I can set the Fan speed and I can read the RP2040 internal temperature sensor. The power button is a bit tricky I'm not sure how I will read the different combinations of presses.
In stock firmware a press of the button while off will turn on the power to the pi. While on a press does nothing, a double tap will reboot a long press will ask for power off, and a very long press will cut power now. the problem is that the long press is 3 - 5 seconds and anything longer is cut power now. The controller will send a pulse of some length to denote what button press it detected.
I'm thinking that the button presses are okay but the very long press should be longer, On my laptops you have to hold that button for 30 seconds or more to force power off. This seems reasonable to me and I could make that length programmable. The biggest change I want to make is the way the daemon knows what to do. Rather than a pulse width telling the Pi what to do, I'll raise that pin high to denote there is an event that needs to be read, then the daemon on the Pi can read the event register to see what to do.
I just need a good way to code for detect button patterns.
Statistics: Posted by DarkElvenAngel — Tue Apr 16, 2024 1:19 am