Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 742 → Rev 743

/trunk/compass.c
90,13 → 90,11
 
void Compass_Init(void)
{
if(UART_VersionInfo.HWMajor >= 30) NCMAG_Compass_use_Orientation = 1; else NCMAG_Compass_use_Orientation = 0;
 
switch(Compass_Device)
{
case COMPASS_NONE:
UART1_PutString("\r\n Looking for compass");
if(UART_VersionInfo.HWMajor >= 20)
if(UART_VersionInfo.HWMajor > 20)
{
if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG;
}
/trunk/main.h
14,7 → 14,7
 
#define VERSION_MAJOR 2
#define VERSION_MINOR 14
#define VERSION_PATCH 0
#define VERSION_PATCH 1
// 0 = A
// 1 = B
// 2 = C
/trunk/ncmag.c
1185,6 → 1185,7
{
NCMAG_SensorType = TYPE_LSM303D;
NCMAG_ConfigureSensor();
NCMAG_Compass_use_Orientation = 1;
retval = 1;
}
else
1199,8 → 1200,16
if(!retval)
{
// search internal sensor afterwards
if(UART_VersionInfo.HWMajor >= 30) UART1_PutString(" main I2C-Bus ");
else UART1_PutString(" internal sensor ");
if(UART_VersionInfo.HWMajor >= 30)
{
UART1_PutString(" main I2C-Bus ");
NCMAG_Compass_use_Orientation = 1;
}
else
{
UART1_PutString(" internal sensor ");
NCMAG_Compass_use_Orientation = 0;
}
Compass_I2CPort = NCMAG_PORT_INTERN;
}
else
1207,6 → 1216,7
{
UART1_PutString(" external sensor ");
Compass_I2CPort = NCMAG_PORT_EXTERN;
NCMAG_Compass_use_Orientation = 1;
}
//-------------------------------------------
NCMAG_Present = 0;
1316,6 → 1326,7
{
sprintf(msg, "\n\r Warning: calibrated orientation was %d !",Calibration.Version >> 4);
UART1_PutString(msg);
//NCMAG_IsCalibrated = 0; // force new calibration!
}
}
}