View Single Post
Old 07-19-2011, 01:42 AM   #23
khmann
Enthusiast
khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.
 
Posts: 43
Karma: 1658
Join Date: Jul 2011
Device: b006
fixflash2

OK, so before I even hit submit on the last post I started a couple hours ago, I had whipped up a new technique. This is sync'd to actual page updates, so there are no timing issues. However, since I abandoned key-press altogether, nothing is done to improve the menus. Perhaps somebody can help me write a script that simultaneously monitors both keyboard and logs? I'm playing with two simultaneous scripts now, but that's a little much...

add to /etc/syslog-ng/syslog-ng.conf and /etc/init.d/syslog-ng stop and start.

log { source(src); filter (f_eink); destination(eink); };
filter f_eink { facility(kern) ; };
destination eink {
pipe("/tmp/eink.pipe"
);
};

----------

#!/bin/sh
# fixflash2a (alpha)

mkfifo /tmp/eink.pipe

# must do this for now because "head -1" is not really good enough
echo 0 > /sys/devices/platform/eink_fb.0/skip_buffers_equal

reFresh3 () {
echo 19 0 > /proc/eink_fb/update_display
echo 0 > /sys/devices/platform/eink_fb.0/override_upd_mode
echo 18 0 > /proc/eink_fb/update_display
echo 1 > /sys/devices/platform/eink_fb.0/override_upd_mode
# echo 19 2 > /proc/eink_fb/update_display # menus usable, will need refresh
echo 19 4 > /proc/eink_fb/update_display # menus no good, but much clearer
}

while :; do
match=0
key="$(head -n 1 /tmp/eink.pipe)"
reFresh3
done


-------------------

wow, good quality display, and twice as fast as FF1. No timing issues! Any suggestions about how to also implement key detect to help clean up the menus, or better ways to handle "scheduling" refreshes based on pipe content, or maybe even just a nice "sanity" check of the input - matching all 'kern' messages is probably not the smartest...

Last edited by khmann; 07-19-2011 at 02:20 AM.
khmann is offline   Reply With Quote