Nitlanguage.org
  • Nitdoc
  • app
  • app_base
  • App
  • enable_gyroscope

private fun enable_gyroscope

app :: App :: enable_gyroscope

  • Doc
  • Linearization

Summary

  • Property definitions

  • android::sensors$app::App$enable_gyroscope

Property definitions

android :: sensors $ 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
Nit tools. Version .