mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-72 final update of old sparky2 ID that is not TL compatible
This commit is contained in:
parent
1d3d784f8b
commit
0695e6acb2
@ -1,4 +1,4 @@
|
||||
BOARD_TYPE := 0x0B
|
||||
BOARD_TYPE := 0x0b
|
||||
BOARD_REVISION := 0x01
|
||||
BOOTLOADER_VERSION := 0x06
|
||||
HW_TYPE := 0x00
|
||||
|
@ -208,7 +208,7 @@ void ConfigOPLinkWidget::updateSettings(UAVObject *object)
|
||||
UAVObjectField *board_type_field = oplinkStatusObj->getField("BoardType");
|
||||
switch (board_type_field->getValue().toInt()) {
|
||||
case 0x09: // Revolution, DiscoveryF4Bare, RevoNano, RevoProto
|
||||
case 0x0B: // Sparky2
|
||||
case 0x0b: // Sparky2
|
||||
m_oplink->MainPort->setVisible(false);
|
||||
m_oplink->MainPortLabel->setVisible(false);
|
||||
m_oplink->FlexiPort->setVisible(false);
|
||||
@ -232,7 +232,7 @@ void ConfigOPLinkWidget::updateSettings(UAVObject *object)
|
||||
connect(m_oplink->MainPort, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePPMOptions()));
|
||||
connect(m_oplink->FlexiPort, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePPMOptions()));
|
||||
break;
|
||||
case 0x0A: // OPLink? (No. This is wrong. 0x0A is gpsplatinum.)
|
||||
case 0x0a: // OPLink? (No. This is wrong. 0x0A is gpsplatinum.)
|
||||
m_oplink->MainPort->setVisible(true);
|
||||
m_oplink->MainPortLabel->setVisible(true);
|
||||
m_oplink->FlexiPort->setVisible(true);
|
||||
|
@ -657,7 +657,7 @@ void ConfigStabilizationWidget::onBoardConnected()
|
||||
Q_ASSERT(utilMngr);
|
||||
boardModel = utilMngr->getBoardModel();
|
||||
// If Revolution/Sparky2 board enable Althold tab, otherwise disable it
|
||||
ui->AltitudeHold->setEnabled(((boardModel & 0xff00) == 0x0900) || ((boardModel & 0xff00) == 0x0B00));
|
||||
ui->AltitudeHold->setEnabled(((boardModel & 0xff00) == 0x0900) || ((boardModel & 0xff00) == 0x0b00));
|
||||
}
|
||||
|
||||
void ConfigStabilizationWidget::stabBankChanged(int index)
|
||||
@ -689,7 +689,7 @@ void ConfigStabilizationWidget::stabBankChanged(int index)
|
||||
bool ConfigStabilizationWidget::shouldObjectBeSaved(UAVObject *object)
|
||||
{
|
||||
// AltitudeHoldSettings should only be saved for Revolution/Sparky2 board to avoid error.
|
||||
if (((boardModel & 0xff00) != 0x0900) && ((boardModel & 0xff00) != 0x0B00)) {
|
||||
if (((boardModel & 0xff00) != 0x0900) && ((boardModel & 0xff00) != 0x0b00)) {
|
||||
return dynamic_cast<AltitudeHoldSettings *>(object) == 0;
|
||||
} else {
|
||||
return true;
|
||||
|
@ -603,7 +603,7 @@ void FlightLogManager::connectionStatusChanged()
|
||||
if (m_telemtryManager->isConnected()) {
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
|
||||
setBoardConnected(utilMngr->getBoardModel() == 0x0903);
|
||||
setBoardConnected(utilMngr->getBoardModel() == 0x0903 || utilMngr->getBoardModel() == 0x0904 || utilMngr->getBoardModel() == 0x0905 || utilMngr->getBoardModel() == 0x0b01);
|
||||
} else {
|
||||
setBoardConnected(false);
|
||||
}
|
||||
|
@ -42,12 +42,12 @@ public:
|
||||
|
||||
break;
|
||||
case 0x0901:
|
||||
// Revolution
|
||||
// old unreleased Revolution prototype
|
||||
return QString("Revolution");
|
||||
|
||||
break;
|
||||
case 0x0903:
|
||||
// Revo Mini
|
||||
// Revo also known as Revo Mini
|
||||
return QString("Revolution");
|
||||
|
||||
break;
|
||||
|
@ -101,15 +101,19 @@ void DeviceWidget::populate()
|
||||
devicePic.load(":/uploader/images/gcs-board-cc3d.png");
|
||||
break;
|
||||
case 0x0903:
|
||||
// Revo
|
||||
devicePic.load(":/uploader/images/gcs-board-revo.png");
|
||||
break;
|
||||
case 0x0904:
|
||||
// DiscoveryF4Bare
|
||||
devicePic.load(":/uploader/images/gcs-board-revo.png");
|
||||
break;
|
||||
case 0x0905:
|
||||
// Nano
|
||||
devicePic.load(":/uploader/images/gcs-board-nano.png");
|
||||
break;
|
||||
case 0x0b01:
|
||||
// Sparky2
|
||||
devicePic.load(":/uploader/images/gcs-board-sparky2.png");
|
||||
break;
|
||||
default:
|
||||
@ -368,9 +372,9 @@ void DeviceWidget::uploadFirmware()
|
||||
// - Check whether board type matches firmware:
|
||||
int board = m_dfu->devices[deviceID].ID;
|
||||
int firmwareBoard = ((desc.at(12) & 0xff) << 8) + (desc.at(13) & 0xff);
|
||||
if ((board == 0x401 && firmwareBoard == 0x402) ||
|
||||
(board == 0x901 && firmwareBoard == 0x902) || // L3GD20 revo supports Revolution firmware
|
||||
(board == 0x902 && firmwareBoard == 0x903)) { // RevoMini1 supporetd by RevoMini2 firmware
|
||||
if ((board == 0x0401 && firmwareBoard == 0x0402) ||
|
||||
(board == 0x0901 && firmwareBoard == 0x0902) || // L3GD20 revo supports Revolution firmware
|
||||
(board == 0x0902 && firmwareBoard == 0x0903)) { // RevoMini1 supporetd by RevoMini2 firmware
|
||||
// These firmwares are designed to be backwards compatible
|
||||
} else if (firmwareBoard != board) {
|
||||
status("Error: firmware does not match board", STATUSICON_FAIL);
|
||||
|
@ -87,12 +87,18 @@ void RunningDeviceWidget::populate()
|
||||
devicePic.load(":/uploader/images/gcs-board-cc3d.png");
|
||||
break;
|
||||
case 0x0903:
|
||||
// Revo
|
||||
// fall through to DF4B
|
||||
case 0x0904:
|
||||
// DiscoveryF4Bare
|
||||
devicePic.load(":/uploader/images/gcs-board-revo.png");
|
||||
break;
|
||||
case 0x0905:
|
||||
// Nano
|
||||
devicePic.load(":/uploader/images/gcs-board-nano.png");
|
||||
break;
|
||||
case 0x0b01:
|
||||
// Sparky2
|
||||
devicePic.load(":/uploader/images/gcs-board-sparky2.png");
|
||||
break;
|
||||
default:
|
||||
|
@ -751,29 +751,29 @@ bool UploaderGadgetWidget::autoUpdate(bool erase)
|
||||
QString filename;
|
||||
emit progressUpdate(LOADING_FW, QVariant());
|
||||
switch (m_dfu->devices[0].ID) {
|
||||
case 0x301:
|
||||
case 0x0301:
|
||||
filename = "fw_oplinkmini";
|
||||
break;
|
||||
case 0x401:
|
||||
case 0x402:
|
||||
case 0x0401:
|
||||
case 0x0402:
|
||||
filename = "fw_coptercontrol";
|
||||
break;
|
||||
case 0x501:
|
||||
case 0x0501:
|
||||
filename = "fw_osd";
|
||||
break;
|
||||
case 0x902:
|
||||
case 0x0902:
|
||||
filename = "fw_revoproto";
|
||||
break;
|
||||
case 0x903:
|
||||
case 0x0903:
|
||||
filename = "fw_revolution";
|
||||
break;
|
||||
case 0x904:
|
||||
case 0x0904:
|
||||
filename = "fw_discoveryf4bare";
|
||||
break;
|
||||
case 0x905:
|
||||
case 0x0905:
|
||||
filename = "fw_revonano";
|
||||
break;
|
||||
case 0xb01:
|
||||
case 0x0b01:
|
||||
filename = "fw_sparky2";
|
||||
break;
|
||||
default:
|
||||
@ -1023,7 +1023,8 @@ void UploaderGadgetWidget::startAutoUpdateErase()
|
||||
UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
|
||||
int id = utilMngr->getBoardModel();
|
||||
|
||||
if (id == 0x905) {
|
||||
// reset if Nano
|
||||
if (id == 0x0905) {
|
||||
systemReset();
|
||||
}
|
||||
}
|
||||
|
@ -199,6 +199,7 @@ void UsageTrackerPlugin::collectUsageParameters(QMap<QString, QString> ¶mete
|
||||
parameters["conf_rport"] = getUAVFieldValue(objManager, "HwSettings", "SPK2_RcvrPort");
|
||||
parameters["conf_mport"] = getUAVFieldValue(objManager, "HwSettings", "SPK2_MainPort");
|
||||
parameters["conf_fport"] = getUAVFieldValue(objManager, "HwSettings", "SPK2_FlexiPort");
|
||||
parameters["conf_iport"] = getUAVFieldValue(objManager, "HwSettings", "SPK2_I2CPort");
|
||||
parameters["conf_fusion"] = getUAVFieldValue(objManager, "RevoSettings", "FusionAlgorithm");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user