Moai SDK  1.5 revision 1 (MoaiEdition)
MOAICompassSensor Class Reference
Inheritance diagram for MOAICompassSensor:
MOAISensor

List of all members.

Function List

  getHeading
  setCallback

Function Documentation

Returns the current heading according to the built-in compass.


function getHeading ( MOAICompassSensor self )
Parameters:
self ( MOAICompassSensor )
Returns:
heading ( number )

Sets or clears the callback to be issued when the heading changes.


function setCallback ( MOAICompassSensor self [, function callback ] )
Parameters:
self ( MOAICompassSensor )
callback ( function ) Optional. Default value is nil.
Returns:
nil