Results 1 to 8 of 8
  1.    #1  
    Hello All,

    I was happy that Palm updated their API to adjust the accelerometer polling rate from 4Hz to 30 Hz. I started working on my app update (Pedometer) to use this fast accelerometer to get the accurate result. I am pretty much done with my update, however I see some strange things happening in my code (or in accelerometer API!). When I run my code with ONE Mojo.Log() to log the event accelX and accelY, the result is pretty much close. However when I comment that Mojo.Log() statement, the result is completely inaccurate (I see around 40-50% less count!). I could not debug this because whenever I use any Log(), it works just fine.
    I tried another way to print the log in a div. I used a class variable and started appending the log in this variable and then update in the div. When I did that without the Mojo.Log() it worked again with no problem. So Looks like the acceleration handle function needs some longer execution statements.

    Is anyone else had any similar or other issues with the new accelerometer api?

    Also, is our app acceptable in Palm only without Log statements?

    Any response is really appreciated.

    Thanks
    M
  2. #2  
    Quote Originally Posted by solaimadhan View Post

    Also, is our app acceptable in Palm only without Log statements?
    apps in the catalog = 8
    log statements = 0

    if it works, it works... palm will accept it
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  3. #3  
    Try uncommenting the log statement and setting the logLevel to 0.
  4.    #4  
    Hello samkim,

    I tried the framework_config.json, but it did not work for me when I was trying to print the timing, events log etc etc. I put the file in the root folder and I use Eclipse to install the app in to my pre. Let me check by installing from the command line again tomorrow and update here.

    Thanks for your input.
  5.    #5  
    @shanerooni: I use the Mojo.Log.error() for debug as Mojo.Log.info() was not logging anything. So you are saying palm will accept the app with log statements as long as it works?
    Thanks for your info.
  6. #6  
    To clarify, my suggestion was meant to turn off logging while letting the log statement still 'execute', however briefly. Since you don't have a framework_config.json file, logLevel is already 0. Setting logLevel to 0 won't stop errors from being logged, but it would stop Mojo.Log.info(). So my suggestion would be to see if a non-logging Mojo.Log.info() would make your accelerometer reading work. If you've already tried that, then I don't have anything else to contribute. :P
  7. #7  
    Quote Originally Posted by solaimadhan View Post
    @shanerooni: I use the Mojo.Log.error() for debug as Mojo.Log.info() was not logging anything. So you are saying palm will accept the app with log statements as long as it works?
    Thanks for your info.
    i think you meant to say "will accept the app WITHOUT log statements"... that would be correct. i have never used a log statement, and don't really plan on it
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  8. #8  
    solaimadhan, I'm having even weirder issues, but I'm not using Mojo.Log at all. When I try to set fastAccelerometer:true the app chokes and the launcher stops working (it slides up, but I can't launch anything). Hard reset doesn't work - I have to pull the battery. Very weird behavior and I'm not at all sure what is going on.

    I'm wondering if I'm calling setWindowProperties from the wrong place or something. If you're successfully getting 30Hz results I must be doing something wrong..

Tags for this Thread

Posting Permissions