1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

LP-120 Auxmag wizard initial support

This commit is contained in:
Laurent Lalanne 2015-10-31 14:03:59 +01:00
parent 3b2795e2b4
commit 89b992176e
7 changed files with 2166 additions and 928 deletions

View File

@ -234,6 +234,9 @@ void ConnectionDiagram::setupGraphicsScene()
case VehicleConfigurationSource::GPS_UBX: case VehicleConfigurationSource::GPS_UBX:
elementsToShow << QString("%1OPGPS-v8-ublox").arg(prefix); elementsToShow << QString("%1OPGPS-v8-ublox").arg(prefix);
break; break;
case VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG:
elementsToShow << QString("%1generic-ublox-mag").arg(prefix);
break;
default: default:
break; break;
} }

View File

@ -70,6 +70,12 @@ void GpsPage::setupSelection(Selection *selection)
"OPGPS-v9", "OPGPS-v9",
SetupWizard::GPS_PLATINUM); SetupWizard::GPS_PLATINUM);
selection->addItem(tr("U-Blox Based + Magnetometer"),
tr("Select this option for the generic U-Blox chipset based GPS + I2C Magnetometer.\n\n"
"GPS is connected to MainPort and two wires I2C to FlexiPort."),
"generic-ublox-mag",
SetupWizard::GPS_UBX_FLEXI_I2CMAG);
selection->addItem(tr("U-Blox Based"), selection->addItem(tr("U-Blox Based"),
tr("Select this option for the OpenPilot V8 GPS or generic U-Blox chipset based GPS."), tr("Select this option for the OpenPilot V8 GPS or generic U-Blox chipset based GPS."),
"OPGPS-v8-ublox", "OPGPS-v8-ublox",

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 424 KiB

After

Width:  |  Height:  |  Size: 485 KiB

View File

@ -425,6 +425,9 @@ QString SetupWizard::getSummaryText()
case GPS_PLATINUM: case GPS_PLATINUM:
summary.append(tr("OpenPilot Platinum")); summary.append(tr("OpenPilot Platinum"));
break; break;
case GPS_UBX_FLEXI_I2CMAG:
summary.append(tr("Generic UBLOX + I2C Magnetometer"));
break;
case GPS_UBX: case GPS_UBX:
summary.append(tr("OpenPilot v8 or Generic UBLOX GPS")); summary.append(tr("OpenPilot v8 or Generic UBLOX GPS"));
break; break;

View File

@ -243,6 +243,19 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
addModifiedObject(magSettings, tr("Writing External Mag sensor settings")); addModifiedObject(magSettings, tr("Writing External Mag sensor settings"));
break; break;
} }
case VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG:
{
gpsData.DataProtocol = GPSSettings::DATAPROTOCOL_UBX;
gpsData.UbxAutoConfig = GPSSettings::UBXAUTOCONFIG_AUTOBAUDANDCONFIGURE;
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_I2C;
AuxMagSettings *magSettings = AuxMagSettings::GetInstance(m_uavoManager);
Q_ASSERT(magSettings);
AuxMagSettings::DataFields magsData = magSettings->getData();
magsData.Usage = AuxMagSettings::USAGE_FLEXONLY;
magSettings->setData(magsData);
addModifiedObject(magSettings, tr("Writing I2C Mag sensor settings"));
}
case VehicleConfigurationSource::GPS_DISABLED: case VehicleConfigurationSource::GPS_DISABLED:
// Should not be able to reach here // Should not be able to reach here
break; break;

View File

@ -68,7 +68,7 @@ public:
enum SERVO_TYPE { SERVO_ANALOG, SERVO_DIGITAL, SERVO_UNKNOWN }; enum SERVO_TYPE { SERVO_ANALOG, SERVO_DIGITAL, SERVO_UNKNOWN };
enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_SRXL, INPUT_UNKNOWN }; enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_SRXL, INPUT_UNKNOWN };
enum AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED }; enum AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED };
enum GPS_TYPE { GPS_PLATINUM, GPS_UBX, GPS_NMEA, GPS_DISABLED }; enum GPS_TYPE { GPS_PLATINUM, GPS_UBX_FLEXI_I2CMAG, GPS_UBX, GPS_NMEA, GPS_DISABLED };
enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED }; enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED };
virtual VehicleConfigurationSource::CONTROLLER_TYPE getControllerType() const = 0; virtual VehicleConfigurationSource::CONTROLLER_TYPE getControllerType() const = 0;