OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Chkhinge - Any Idea What This Program Does
nilch
post Aug 2 2005, 05:54 AM
Post #1





Group: Members
Posts: 668
Joined: 3-December 03
From: US
Member No.: 1,034



There is a executable called 'chkhinge' sitting in /home/QtPalmtop/bin

Is there any idea what this program does and where it is called from ?
Can this in any way be used to test for wether the clamshell hinge is turned or not (in portrait or landscape) ?
Go to the top of the page
 
+Quote Post
Optogeek
post Aug 2 2005, 07:49 AM
Post #2





Group: Members
Posts: 48
Joined: 3-February 04
From: Edinburgh, Scotland
Member No.: 1,681



Look in /home/QtPlamtop/qpe.sh for an example of how to use it or try

CODE
$ chkhinge
$ echo $?


$? is the bash for the exit status of the last program. In chkhinge's case 0 is landscape and 2 portrait.
Go to the top of the page
 
+Quote Post
Optogeek
post Aug 2 2005, 07:53 AM
Post #3





Group: Members
Posts: 48
Joined: 3-February 04
From: Edinburgh, Scotland
Member No.: 1,681



...and 3 for closed.
Go to the top of the page
 
+Quote Post
gyver
post Aug 2 2005, 01:58 PM
Post #4





Group: Members
Posts: 16
Joined: 31-July 05
Member No.: 7,749



QUOTE(Optogeek @ Aug 2 2005, 05:53 PM)
...and 3 for closed.
*

Couldn't resist the urge to test :
if you press the little button closest to the keyboard which is pressed when the shell is closed while running this in a console (you can't type anything on the keyboard when this button is pressed) :
"while true; do clear; chkhinge; echo $?; sleep 1; done" you'll get "1" : a bit is set when a button is pressed, the closest is the less significant bit, the other is the most significant.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th December 2014 - 05:41 PM