Author Topic: Chkhinge - Any Idea What This Program Does  (Read 4689 times)

nilch

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
    • http://
Chkhinge - Any Idea What This Program Does
« on: August 02, 2005, 09:54:14 am »
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) ?
New no more-C1000 / 5000D (sold my 6000 and 750) | Cacko ROM 1.23 on C1000 | 256 MB CF | 2GB PNY SD card | Socket Networker WiFi CF Card | USB Host cable from StreamlineCPUS | Mini Microphone (for voice recording) |

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Chkhinge - Any Idea What This Program Does
« Reply #1 on: August 02, 2005, 11:49:48 am »
Look in /home/QtPlamtop/qpe.sh for an example of how to use it or try

Code: [Select]
$ chkhinge
$ echo $?

$? is the bash for the exit status of the last program.  In chkhinge's case 0 is landscape and 2 portrait.
« Last Edit: August 02, 2005, 11:50:41 am by Optogeek »
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Chkhinge - Any Idea What This Program Does
« Reply #2 on: August 02, 2005, 11:53:04 am »
...and 3 for closed.
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF

gyver

  • Newbie
  • *
  • Posts: 16
    • View Profile
Chkhinge - Any Idea What This Program Does
« Reply #3 on: August 02, 2005, 05:58:36 pm »
Quote
...and 3 for closed.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=90506\"][{POST_SNAPBACK}][/a][/div]
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.