app :: App :: enable_gyroscope
private fun enable_gyroscope
do
gyroscope.asensor = sensormanager.get_default_sensor(new ASensorType.gyroscope)
if gyroscope.asensor.address_is_null then
print "Gyroscope sensor unavailable"
else
if eventqueue.enable_sensor(gyroscope.asensor) < 0 then print "Gyroscope enabling failed"
eventqueue.set_event_rate(gyroscope.asensor, gyroscope.event_rate)
end
end
lib/android/sensors.nit:294,2--303,4