Thread: Clara HD Display time when reading
View Single Post
Old 07-18-2019, 10:53 PM   #210
desterly
Enthusiast
desterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day nowdesterly will be dicovering the secret to cold fusion any day now
 
Posts: 49
Karma: 139260
Join Date: Dec 2016
Device: KV, Forma, Libra Colour
I made a few modifications on mine to see what would happen. This is specific for the forma and buttons (which is what I use)

1) I compiled an updated evtest that has query functionality and dropped it on the device (from here: git://anongit.freedesktop.org/evtest)

2) updated timout_touch() as follows

Code:
timeout_touch() {
    local touched="not"
    read -t "$1" touched < "$2"
    /mnt/onboard/.stuff/kobo-evtest/evtest --query /dev/input/event0 EV_KEY 193
    eventkey=$?
    if [ $eventkey -eq 0 ];
    then
        /mnt/onboard/.stuff/kobo-evtest/evtest --query /dev/input/event0 EV_KEY 194
       eventkey=$?
    fi
    [ "$eventkey" = "10" ]
}
3) modified the button check by adding a test to the return of timeout_touch:

Code:
           timeout_touch $((1 + $cfg_update - ( ($(date +%s)+$cfg_delta) % $cfg_update))) /dev/input/event0
           if [ $? -eq 0 ];
           then
               for i in $cfg_delay
               do
                   sleep $i
                   update
               done
           fi

With these modifications, fbink is ONLY called if the up/down button (193/194) are the KEY_CODES called to event0.

It's still calling timeout_touch constantly with the other KEY_CODE values but at least it isn't calling fbink anymore.

I'll test the battery tonight and report back
desterly is offline   Reply With Quote