HTCSensors library for HTC Diamond

agraham

Expert
Licensed User
Longtime User

Attachments

  • HTCSensors1.0.zip
    18.5 KB · Views: 428
Last edited:

Mr_Gee

Active Member
Licensed User
Longtime User
you are the man, sorry i didn't get around to posting the spb file with the functions of your previous version, ill do that when i get my pc back
 

csandman

Member
Licensed User
G-sensor lib for HTC Touch HD too?

I can't get it working on my Touch HD? Startup of library seems not to work. Anybody out there with any ideas?

Merry Christmas and a happy new year
csandman
 

CryoGenID

Active Member
Licensed User
Longtime User
Hello!

This is an awesome dll!
Thanks a lot for writing it!

But I have a question:
Are you planning (which I could use very well *g*) on implementing
a possibility to change the backlight intensity?
(Like this program here does: Lumos@XDA-Devs

Thanks a lot for your help!

Best regards,

Chris
 

CryoGenID

Active Member
Licensed User
Longtime User
Agraham,

thanks for your reply!
What a pity, that would have been perfect...

But anyway: Thanks a lot for the HTCSensors-Library :sign0060:

Best regards,

Chris
 

bob_zollo

New Member
Licensed User
just getting started

Hi ... Can you tell me what version of Basic4PPC is needed to use the HTCSensors library?

I have 6.01 and when I tried to load the demo program, I got an error that this file was created under a newer version.

I'm simply trying to detect if the keyboard is slid-out on an HTC Touch Pro 2. Not trying anything fancy. An old B4PPC program I wrote looks bad when the screen rotates due to keyboard being slid-out, so I figure if I can detect it being open or closed, then I can redraw the screen correctly.

Any suggestions?

Thanks
 
D

Deleted member 103

Guest
Hi agraham,

can you please add this code in your library(Class HTCGSensor)?

HTML:
public void ChangeOrientation(int DisplayOrientation)
{
    switch (DisplayOrientation) {
        case ScreenOrientation.Portrait:
            SystemSettings.ScreenOrientation = Microsoft.WindowsCE.Forms.ScreenOrientation.Angle0;
            break;
        case ScreenOrientation.Landscape:
            SystemSettings.ScreenOrientation = Microsoft.WindowsCE.Forms.ScreenOrientation.Angle90;
            break;
        case ScreenOrientation.ReversePortrait:
            SystemSettings.ScreenOrientation = Microsoft.WindowsCE.Forms.ScreenOrientation.Angle180;
            break;
        case ScreenOrientation.ReverseLandscape:
            SystemSettings.ScreenOrientation = Microsoft.WindowsCE.Forms.ScreenOrientation.Angle270;
            break;
    }
}

so it is possible to change the orientation of the screen.


Ciao,
Filippo
 
D

Deleted member 103

Guest
It was only a suggestion from me.

So I personally think that's the functional fits right into this library. In this library is tested whether the orientation of the device has changed, and then you can change the orientation of the screen.
Thus, one can achieve with just a library everything you want.;)
 

UTISS.DEV05

New Member
Licensed User
htcsensor - GetGVector

hi,
is GetGVector included in the HTCSensor library?
If not how can i create a library from the .cs file?

thanks!
 

agraham

Expert
Licensed User
Longtime User
If by GetGVector you mean a function that returns the actual measurement of G in m/s2 or feet/s2 for x, y and z then then you just need to scale the values of TiltX etc appropriately. As you can see from the help entry for GetRawSensorData 1G is nominally 1000 Tilt units but the measurement is actually very imprecise and the actual value may vary for each axis.
 
Top