Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 7th, 2010, 07:42 PM
Registered User
 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Chapter 10: Compass

There is a typo for the compass. In Compass.java it should read as such
Code:
private final SensorListener sensorListener = new SensorListener() {
	  public void onSensorChanged(int sensor, float[] values) {
	    updateOrientation(values[SensorManager.DATA_Z], 
	                      values[SensorManager.DATA_Y], 
	                      values[SensorManager.DATA_X]);
	  }
I was having an issue with the compass just wiggling. Then I noticed it actually moved when "rolled." The Z and X axis were swapped when feeding into the updateOrientation function.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10: Compass Omen_20 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 April 7th, 2010 07:13 PM
Chapter 10, listing 10-10-app kiwibrit BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 2 August 18th, 2009 04:21 AM
Chapter 10 JimSchubert BOOK: Ruby on Rails for Microsoft Developers 1 May 17th, 2009 11:35 PM
Chapter 4 Compass background color eags BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 January 10th, 2009 01:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.