Information générale
Catégorie:
Codage, syntaxe et commandes
>>>>
>>>>All now working smoothly (literally). I'm currently recalculating the average every time a new orientation event comes in. Processor seems to cope (g) and it makes for a very realistic damping effect.
>>>>
>>>>Had a few moments panic but it turned out the device compass needed recalibrating - was getting some *very* strange results beforehand tho.
>>>>
>>>
>>>Sure it wasn't on your way from the pub to home ?
>>
>>No. Just tried it coming back from the pub. Worked perfectly. Just led me into the ditch a couple of times :-}
>
>Could have been the beer
>
>>>
>>>>Thanks for the input and suggestions......
>>>
>>>Anytime - refreshed a bit of math
>
>
>
>Come to think of it
>
>> I'm currently recalculating the average every time a new orientation event comes in
>
>Isn't that a bit of an overkill - if you have to display it every second (or 5 seconds) ?
Sorry, wasn't clear enough. I'm also updating the display when I recalculate. The effect is very smooth but I might tinker with reducing the frequency of the average/display cycle. The Nexus handles it easily but I'm wondering whether devices with less processing power might struggle. There's also a bit more to do whan actually displaying the direction since I have to also take into account the screen orientation.....
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement