Go to Post Have no fear, ancient and brilliant coaches of yore were consulted. - JamesCH95 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2011, 19:02
Osprey1 Osprey1 is offline
Registered User
FRC #1318
Team Role: Photography
 
Join Date: Feb 2011
Rookie Year: 2011
Location: United State of America
Posts: 3
Osprey1 is an unknown quantity at this point
NXT Compass Invalid Manufacturer Exception

When we plugged in our compass to the I2C port on the digital sidecar, we got an Invalid Manufacturer Exception. We double checked the connection and everything seems right. We then installed a jumper configuration on the sidecar and now everything on the robot stops when the compass object is created. Is anyone else getting this error? Did you fix it?
  #2   Spotlight this post!  
Unread 10-02-2011, 11:33
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: NXT Compass Invalid Manufacturer Exception

What language are you using?
  #3   Spotlight this post!  
Unread 10-02-2011, 12:23
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: NXT Compass Invalid Manufacturer Exception

Quote:
Originally Posted by Osprey1 View Post
Is anyone else getting this error? Did you fix it?
We are, and no we haven't fixed it, it's an issue with the WPI library.

Quote:
Originally Posted by Robototes2412 View Post
What language are you using?
This happens in C++.

I believe it might be due to the typo found in HiTechnicCompass.cpp. I haven't tried correcting this typo to see if it works without throwing an exception but this is probably the issue.
Quote:
Originally Posted by WPILibC++Rev2259
Code:
HiTechnicCompass::HiTechnicCompass(UINT32 slot)
	: m_i2c (NULL)
{
	DigitalModule *module = DigitalModule::GetInstance(slot);
	if (module)
	{
		m_i2c = module->GetI2C(kAddress);
	
		// Verify Sensor
		const UINT8 kExpectedManufacturer[] = "HiTechnc";
		const UINT8 kExpectedSensorType[] = "Compass ";
		if ( ! m_i2c->VerifySensor(kManufacturerBaseRegister, kManufacturerSize, kExpectedManufacturer) )
		{
			wpi_fatal(CompassManufacturerError);
			return;
		}
		if ( ! m_i2c->VerifySensor(kSensorTypeBaseRegister, kSensorTypeSize, kExpectedSensorType) )
		{
			wpi_fatal(CompassTypeError);
		}
	}
}
It shouldn't affect compass operations though.
  #4   Spotlight this post!  
Unread 11-02-2011, 01:58
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: NXT Compass Invalid Manufacturer Exception

So at least for the HiTechnic compass that I have, that's exactly what the sensor outputs. If yours reports something different, please let me know so I can update the libraries.

For a quick test, just use I2C directly to query those 2 registers just like the library does and then print it out and post it here.

Thanks,
-Joe
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 23:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi