View Single Post
Old 02-19-2019, 11:28 PM   #2
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
the K4NT has a different command for rtc, found after much trail and error.
Code:
lipc-set-prop -i  com.lab126.powerd rtcWakeup 100
however this can only be set when the kindle is in the readyToSuspend state which it enters for a few seconds before sleeping.

this can be trigger by writing a backround script to detect a kindle in readyToSuspend and optionaly wakeup state to have it run a script and reset th wakeup clock.

for example:
backround script
Code:
#!/bin/sh

# location of your program
PROGRAM=/mnt/us/program.sh
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8


do_program()
{
	if [[ -f "$PROGRAM" ]]; then
	  # run program function to set picture
	  $PROGRAM do
	fi
}

run_program()
{
	if [[ -f "$PROGRAM" ]]; then
	  # run program function to reset wakup rtc
	  $PROGRAM run
	fi
}

lipc-wait-event -m com.lab126.powerd goingToScreenSaver,readyToSuspend | while read event; do
	case "$event" in
		goingToScreenSaver*)
			do_program;;
		readyToSuspend*)
			run_program;
	esac
done;
program script
Code:
#!/bin/sh

do()
{
	# set picture using fbink or eips
}

run()
{
	do
	# set to your delay between picture changes
	DELTA=$(( `date +%s` + 300 ))
	lipc-set-prop -i  com.lab126.powerd rtcWakeup $DELTA
}

# Main
case "${1}" in
	"run" )
		${1}
	;;
	"do" )
		${1}
	;;
	* )
		run
	;;
esac

return 0
yparitcher is offline   Reply With Quote