Freeplaytech Forum
Turn on/off immediately without delay - Printable Version

+- Freeplaytech Forum (https://forum.freeplaytech.com)
+-- Forum: Freeplay Zero / Freeplay CM3 / Game Pie Advance (https://forum.freeplaytech.com/forumdisplay.php?fid=24)
+--- Forum: Freeplay Zero/CM3 (AKA GPA) Hardware (https://forum.freeplaytech.com/forumdisplay.php?fid=25)
+--- Thread: Turn on/off immediately without delay (/showthread.php?tid=4863)



Turn on/off immediately without delay - maxh123 - 05-07-2019

Does anyone know if its possible to remove the 5s delay to powering on / off the system with software? Or is that due to the hardware config of the power switch?
After the add-on board with the added hotkey, I'd like to remove that delay.

Thanks!


RE: Turn on/off immediately without delay - Flavor - 05-07-2019

Sure.  I wouldn't recommend removing the delay completely, but maybe set it to a lower time.  I don't think you'd want to bump it and have it shut down.

Edit this file /home/pi/Freeplay/Freeplay-Support/shutdown_daemon.py

nano /home/pi/Freeplay/Freeplay-Support/shutdown_daemon.py

It should look like this: https://github.com/TheFlav/Freeplay-Support/blob/master/shutdown_daemon.py and the line you want to edit looks like this.
Code:
pwr_btn_timeout = 4.0   # how many seconds does the power button need to be held



RE: Turn on/off immediately without delay - maxh123 - 05-07-2019

Thanks!! Does this also change the delay when turning on?


RE: Turn on/off immediately without delay - Flavor - 05-07-2019

No. The delay turning it on is completely different. When you first push the ON button, it supplies power to the Raspberry Pi. The Pi starts booting up. When the operating system boots up, it can take over, and it will then turn on the green LED and hold the system ON by itself (until you shut it down).