Find the accelerometer

I'm having a problem where my accelerometer is calibrated at the angle of the standard browser until I flip the device (& so my request) at least once, after that back to my original orientation working properly.

That's how I'm initializing the system

   orientation_direction_t tDirection;
    int iAngle;
    orientation_get(&tDirection, &iAngle);
    sensor_remap_coordinates(iAngle);

And then on a redirect, I do the following in a loop of events BPS

case NAVIGATOR_ORIENTATION_CHECK:
{
    int iAngle = navigator_event_get_orientation_angle(pEvent);
    sensor_remap_coordinates(iAngle);
    //Signal navigator that we intend to resize
    navigator_orientation_check_response(pEvent, true);
}
break;
case NAVIGATOR_ORIENTATION:
{
    int iAngle = navigator_event_get_orientation_angle(pEvent);
    sensor_remap_coordinates(iAngle);
    if (m_bPresentNeeded)
    {
        DoPresent();
    }
    GraphicsRotateScreen(iAngle);
    navigator_done_orientation(pEvent);
}
break;

If someone could help me with this I would appreciate it a lot

OK, incase if anyone else experiences this problem I'll post my solution here.

If the device and your app is forced to the landscape orientation this wil cause the accelerometer to calibrate correctly.

To resolve this problem, I used the following workaround solution in my entry into force of the app

orientation_direction_t tDirection;
int iAngle;
orientation_get(&tDirection, &iAngle);

// This is here to force alignment to the left if the device is held
// vertically upon startup, this prevents the misalignment bug
if(iAngle % 180 == 0)
    iAngle = 90;

sensor_remap_coordinates(iAngle);

Hope this helps anyone else with this problem

Tags: BlackBerry Developers

Similar Questions

  • Satellite P850 - wonder about the accelerometer pilot description

    I was delighted to see an accelerometer for the P850 pilot in the driver downloads.

    I was also happy or sad to find that it was really a hard throttle.
    There must be a correction of the description, or the correct driver should be loaded.

    I assume you mean the [utilities accelerometer | http://www.toshiba.eu/innovation/download_driver_details.jsp?service=EU&selCategory = 2 & selFamily = 2 & selSeries = 152 & selProduct = 7507 selSh ortMod = null & language = 13 & selOS = all & selType 216 = & year = upload & monthupload = & dayupload = & useDate = null & mode = allMachines & search = & action = search & macId = & country = a he's & selectedLanguage = 13 & type = 216 & page = 1 & ID = 88083 & OS ID = 46 & driverLanguage = 42]

    Description says:
    + These utilities are a set of utilities of material working with motion detectors built into your machine. With the accelerometer, your machine will be able to detect the position you hold your computer at any given time. You can set the machine to perform a specific function when the device is tilted quickly left or right, either at the front or back. You can also take control of the cursor in some applications and move by leaning the PC in a certain direction. +

  • Rotation based on the accelerometer?

    Hi all!

    I am trying to find a way to rotate a clip based on the accelerometer. So, basically, the object could face the right direction when moving. Could someone point me to a tutorial or just give me a helping hand it understand?

    Thanks in advance!

    Var accelerometer: accelerometer = new Accelerometer();

    accelerometer.addEventListener (AccelerometerEvent.UPDATE, accelerometerF, false, 0, true);

    function accelerometerF(e:AcceleromterEvent):void {}

    You can use e.accelerationX, e.accelerationY, e.accelerationZ

    }

  • How to find the key

    Is there a quick way to find the key of a song or instrumental that has been imported to the logic?

    No, you need a little music for this. I guess you could find it difficult to play with a keyboard and hear/guess the agreements/key?

    Here would be my suggestion for a workaround - if it is an entire song, as you indicate in your question:

    -To get agreements on a Web site

    -See if you can find the original version of keys (that would be easy, right?)

    - Then play these chords along your song imported. If they sound not right, transpose your up and down by steps MIDI track until it sounds right. -> Get your agreements and the key.

    If your song doesn't have agreements to seek, find parts of the song where you lift clear of bass notes (not too much battery), EQ everything, taking Tuner in pop in the track and see if you can pick up the dominant notes. That should lead you to your key of song.

  • Cannot find the library of photos on iMovie sidebar

    I work in iMovie and I can't find the photo library on my sidebar iMovie. How to retrieve

    In the preferences of Photos make sure your library is the library system. It must be indicated as grey. Then open photos before opening iMovie and it should appear.

  • How the batch of photos of change in Version 2.0 of Photos... impossible to find the function.

    How the batch of photos of change in Version 2.0 of Photos... impossible to find the function.  If it has been deleted to "improve" the Photo experience?

    Lot, what exactly will change?

    Titles, Descriptions and capture date - Yes.

    Select the images you want to change the title or the description and to set-up the info (command-i) pane.  Enter the title or the description in the appropriate field and he will be assigned to all selected pictures.

    If you want to batch, change the title with sequential use attached many Applescripts provided by users in the Photos for Mac user tips section.

    Batch change/correction of dates is provided by the Image ➙ setting Date and time menu option:

  • Cannot find the volume of the speaker on the Iphone 6 IOS 10

    I have updated to IOS 10 on my Iphone 6. I can't find the volume control Chair that used to be in the control center. I have two control centres and in none.

    Hello

    In the Panel, there are 2 screens, drag to the right for the music and the left for the parameters. It will be the slider at the bottom of the music.

    Thanks again

    Will be

  • I haven't been able to find the map "recently removed" photos. Who can help me?

    I cann't find the item 'lately or recently removed' (in Dutch: both doors) in the Foto card / Albums. Who can help me?

    Go to the albums page, it's there.

  • Hello help, Mac can't find the printer

    Hi all

    'BonjourPSsetup.exe not supported under OS X' I am puzzled.

    To create a roaming network, I added as an express to my Time Capsule airport and doing so changed the name of the network. (Original name was a little too identifiable) now MacBook WiFi can not find the printer, it allows.  (cause he's probably looking for the former name of network). Went to Apple's support for assistance. Found several posts with instructions. All direct me to download the Printer Wizard Hello.  When I do, I get the above error.

    Also, went to:

    Applications - printers and Scanners - add

    List of shows:

    Name: Series HP Photosmart C4385

    Type: USB

    Cannot change the type of USB to Hello

    SYSTEM-

    El Capitan 10.11.6

    MacBookPro, MacMini, iPad.

    Express connected to the Airport via CAT 6.

    MacMini use USB for printer

    HP Photosmart C4385

    Thanks in advance,

    Mike

    Resolved to my situation. Find the HP original installation disk. Uninstalled and reloaded. Fact

  • I did the most recent iOS 10 updated, just heard on the news that Yahoo has been hacked.  I changed my Yahoo email but can't find the field to change on my devices.  It is simply not there, what is happening?

    I did the most recent iOS 10 updated, just heard on the news that Yahoo has been hacked.  I changed my password to Yahoo mail but can't find the field to change the password on my devices.  It is simply not there, what is happening?

    For some reason any change automatically if change you it online. Today, I changed my password through my office and I went to change the mail and she had already changed.

    You can try to delete your account your unit off and add it again.

  • How to find the list of individual songs in iTunes?

    I used to be able to find the complete list of songs in my iTunes. Now, all I see is a list of playlists on the left side. I can't find anyway to get it to list all of my songs. Only when I put in something again I see the song list in the item, such as an audio book, for example.

    I want to check my list to see exactly what I have, but can't see any song, unless it is in a playlist. How can I see a list of all my songs?

    In the sidebar under 'Library', a secondary to edit click the list that you see there. Add songs.

  • can not find the album on ipod

    I have an ipod nano and ripped an album from a CD.  I can't find the album or one of the songs on the ipod, but they appear when I connect it to a PC or a Tablet

    but they appear when I connect it to a PC or a Tablet

    You are looking at the content of the iPodas shown in iTunes on the computer When you select iPod in the iTunes window?  Or do you mean that the album appears in your library iTunes music, but not on your iPod?

  • How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    See if this application works for you > https://itunes.apple.com/us/app/image-size/id670766542?mt=8

  • Upgrade: numbers can not find the field to change!

    Sorry if I am dense here, I'm sure that there is an obvious answer, anyone here know, but I can't imagine it or find info already online.

    I just upgraded from Cougar to El Capitan.  Then, I upgraded a previous numbers spreadsheet to edit it in El Capitan.  After the installation, I printed it and a field I can't see anywhere on the new version, or find any path, spell on the print-out (immediately above the table and text on 2 lines).

    I think that this field used to be editable in Mountain Lion in a sidebar on the left, but I don't remember the name of it so I can't find how to access in an upgraded version.  I don't know, however, is not the name of the table or sheet name because I can see where to edit those.

    Can someone please help me find the way to access this hidden field so that I can change it?

    In advance, thank you very much for sharing your skills and your ideas.

    Jackie

    I just answered my own question!   After hours of searching in the Inspector, I had an idea more now after I had posted this question here, of course.

    In the case where it is useful to all of you who don't know already (jumped several major improvements to the operating system, so I'm exceptionally behind with new features/functions): it can be seen and edited in the print dialog box.  The 'invisible' text appears and zoom in for a better view, you can change it.

    Sorry to have bothered you and thank you for your time.

    Jackie

  • Half of my Word document disappeared.  How can I find the history of the document so I can revert to a saved version the earlier?

    Half of my Word document disappeared while I was working on it.  I tried to use the back arrow to recover, but Word is closed.  How can I find the history of the document so I can revert to a saved version the earlier?

    I hope that you have a Time Machine backup that you can use to revert to a previous version.  If it is then maybe you shared the document with someone else by e-mail and get get an old copy of your sent e-mail.

Maybe you are looking for

  • Why the Photos app saves multiple copies of pictures?

    Why the Photos app saves multiple copies of pictures?

  • P10 - 554 crashes randomly

    My Toshiba Notebook P10-554 (1 1/2 year new) who must operate 24/7 seems to have developed a problem with the following symptoms: Problem: after that run well for a while that the LCD will completely empty (black), turns off PCMCIA WLAN card, DVD pla

  • PC HP Pavilion 11 x 360: power problem

    Hi again, I have a little problem on my Pavillion X 360, especially when I used it on battery - let the power of the battery is below 20%, so I connect to my laptop on AC power with cable and adapter supplied with this laptop - the problem, it's my s

  • How to create a link to Facebook in my outgoing email?

    How to create a link to Facebook in my outgoing email?

  • S3-391 BIOS UEFI update possible?

    Hello. I have a S3-391-6497 that came with Windows 7. It currently has BIOS 1.29. If I level to UEFI 2.17, it would feature Fast Boot of Windows 8 ? (I'm aware that he has need of GPT partitions and perhaps other technical adjustments) Thank you.