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