Commit graph

28 commits

Author SHA1 Message Date
Miles Alan
45c571727c Cleanup logic for notification LED setting; increase default call volume 2020-08-22 16:16:26 -05:00
Julian P Samaroo
a24d966b7e Fix = to == in screenlock 2020-07-30 18:39:14 -05:00
Maarten van Gompel
113f756eb1 Adding a wrapper around sxmo_screenlock, with lock/unlock hooks. Allow setting a target state for sxmo_screenlock, and cleanup on sigterm. Added lock/suspend options to the power menu.
Should be applied after my prior patches from today.
2020-07-26 10:31:57 -05:00
Miles Alan
f3275b7cd7 After exiting suspend blink LED while in temporary suspend pending state 2020-07-21 21:40:56 -05:00
Miles Alan
92e048a153 Screenlock: Recognize keyrelease rather than keydown to avoid inadvertent exits
E.g. so now you distinctively have to press down the powerbutton three times
rather than holding (which is easy to do inadvertently in pocket) to exit
screenlock.
2020-07-15 21:47:50 -05:00
Miles Alan
d713b19199 Use sxmo_statusbarupdate.sh script instead of direct calls duplicated logic 2020-07-12 11:38:31 -05:00
Miles Alan
10705f08cd Update statusbar on waking up from deep sleep so battery % & time accurate 2020-07-12 11:32:04 -05:00
Miles Alan
383c52380f 5s timeout for StateSuspendPending 2020-07-11 09:53:15 -05:00
Miles Alan
a35ca3f39f screenlock - Sort functions alphabetically; add declarations; and fix warnings 2020-07-09 21:17:11 -05:00
Miles Alan
b51644baca screenlock - Implement StateSuspendPending so exiting CRUST requires 3 clicks
If you don't triple click after exiting deep sleep after 10s, use select() with
timeout to kick back into deep sleep.
2020-07-09 20:51:50 -05:00
Anjandev Momi
a245f46914 screenlock: enable rtc wakeup source
Please apply to the crust feature branch. The rtc wakeup clock is useful cause it allows
users to script programs. If I put my phone into deep sleep, none of the scripts
I put in my cronjob will run.

For example, if I have an alarm script:

https://git.sr.ht/~anjan/sxmo-userscripts/tree/master/alarm.sh

It is supposed to run at 7:00 am but since I put my phone in deep sleep before going to sleep,
the script doesnt play sound to wake me up.

Enabling the rtc wakeup clock enables using programs like rtcwake as a wrapper around
your cronjobs to wake up the phone at a time and excecute the command you put in cron.

For info on how to use rtcwake, see:
https://wiki.postmarketos.org/wiki/Nokia_N900_(nokia-n900)#Setting_the_hardware_alarm_clock

Not sure if we should patch busybox cron to use rtcwake automatically or whether we should
trust the user to use rtcwake properly and document it. However, I am certain that the rtc
wakeup source should be enabled for this usecase.

Signed-off-by: Miles Alan <m@milesalan.com>
2020-07-09 20:51:30 -05:00
Miles Alan
cf4cd1b8df Retain brightness when entering screenlock 2020-07-09 20:51:30 -05:00
Miles Alan
7b3be0453a Disable buggy bluetooth driver before entering suspend 2020-07-09 20:51:30 -05:00
Miles Alan
aa8513ba84 Use direct open/write/close instead of stdlib calls for device IO 2020-07-09 20:51:30 -05:00
Miles Alan
37941f6ba8 Always reconfigure wakeup sources before entering suspend 2020-07-09 20:51:30 -05:00
Miles Alan
be6737e68f Always wake up from suspend to StateNoInput 2020-07-09 20:51:30 -05:00
Miles Alan
4d9d1ec45d Modify screenlock to suspend on triple pressing volume down button
Led indicators as follows:
  Blue: Screenlocked
  Purple: Screenlocked and Screenoff
  Red: CRUST suspend
2020-07-09 20:51:30 -05:00
Miles Alan
fb44e88552 Support headphone (linejack) mic input in audio routing program 2020-06-09 22:09:27 -05:00
Miles Alan
4c39cd16b0 Add missing option for echomic -z to megi's audioroute program 2020-06-09 18:57:30 -05:00
Miles Alan
660506b1e3 Set LED for screenlock before grabbing focus (e.g. register on PP button hold immediately) 2020-06-08 22:32:57 -05:00
Miles Alan
1ac5e64193 Tab indent C programs for consistency 2020-06-08 22:30:23 -05:00
Miles Alan
41714c8c96 Attempt to fix screenlock - only show led after screen is already locked 2020-06-07 10:05:46 -05:00
Miles Alan
b37138c845 Fix pine indicator leds paths for latest pmOS setup and add white (flash) 2020-05-17 18:59:43 -05:00
Miles Alan
e5877059ff Lots of bugfixes related to calling/modem and various script fixes 2020-05-11 20:55:47 -05:00
Miles Alan
22d974f22f Cleanup calling - mostly working; misc cleanup scripts; add vibrate program 2020-05-11 20:54:54 -05:00
Miles Alan
ae983ef8c8 Various progess on calling & texting; reorganize scripts dirs by category 2020-04-25 07:55:22 -05:00
Miles Alan
ed09f2b8b3 New scripts: sxmo_{youtube,weather,rss,camera}.sh; Implement screenlock
Various minor script bugfixes
2020-04-03 21:08:10 -05:00
Miles Alan
8ae9fbdb1c Initial commit 2020-03-15 18:42:35 -05:00