1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

OP-816 Fixed Revolution identification and Revolution + OPLink firmware auto-update functionality.

This commit is contained in:
Fredrik Arvidsson 2013-03-03 19:33:24 +01:00
parent 70294ed1ad
commit 2cd3485cf6
6 changed files with 16 additions and 14 deletions

View File

@ -82,7 +82,7 @@ void ConnectionDiagram::setupGraphicsScene()
case VehicleConfigurationSource::CONTROLLER_CC:
case VehicleConfigurationSource::CONTROLLER_CC3D:
case VehicleConfigurationSource::CONTROLLER_REVO:
case VehicleConfigurationSource::CONTROLLER_PIPX:
case VehicleConfigurationSource::CONTROLLER_OPLINK:
default:
elementsToShow << "controller";
break;

View File

@ -15,9 +15,9 @@ AutoUpdatePage::AutoUpdatePage(SetupWizard *wizard, QWidget *parent) :
Q_ASSERT(pm);
UploaderGadgetFactory *uploader = pm->getObject<UploaderGadgetFactory>();
Q_ASSERT(uploader);
connect(ui->startUpdate,SIGNAL(clicked()), this, SLOT(disableButtons()));
connect(ui->startUpdate,SIGNAL(clicked()),uploader,SIGNAL(autoUpdate()));
connect(uploader,SIGNAL(autoUpdateSignal(uploader::AutoUpdateStep,QVariant)),this,SLOT(updateStatus(uploader::AutoUpdateStep,QVariant)));
connect(ui->startUpdate, SIGNAL(clicked()), this, SLOT(disableButtons()));
connect(ui->startUpdate, SIGNAL(clicked()), uploader, SIGNAL(autoUpdate()));
connect(uploader, SIGNAL(autoUpdateSignal(uploader::AutoUpdateStep,QVariant)), this, SLOT(updateStatus(uploader::AutoUpdateStep, QVariant)));
}
AutoUpdatePage::~AutoUpdatePage()

View File

@ -97,12 +97,12 @@ SetupWizard::CONTROLLER_TYPE ControllerPage::getControllerType()
switch (id) {
case 0x0301:
return SetupWizard::CONTROLLER_PIPX;
return SetupWizard::CONTROLLER_OPLINK;
case 0x0401:
return SetupWizard::CONTROLLER_CC;
case 0x0402:
return SetupWizard::CONTROLLER_CC3D;
case 0x0901:
case 0x0903:
return SetupWizard::CONTROLLER_REVO;
default:
return SetupWizard::CONTROLLER_UNKNOWN;
@ -122,9 +122,7 @@ void ControllerPage::setupBoardTypes()
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl"), SetupWizard::CONTROLLER_CC);
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D);
ui->boardTypeCombo->addItem(tr("OpenPilot Revolution"), SetupWizard::CONTROLLER_REVO);
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
ui->boardTypeCombo->addItem(tr("OpenPilot OPLink Radio Modem"), SetupWizard::CONTROLLER_PIPX);
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
ui->boardTypeCombo->addItem(tr("OpenPilot OPLink Radio Modem"), SetupWizard::CONTROLLER_OPLINK);
}
void ControllerPage::setControllerType(SetupWizard::CONTROLLER_TYPE type)

View File

@ -83,7 +83,7 @@ int SetupWizard::nextId() const
case CONTROLLER_CC3D:
return PAGE_INPUT;
case CONTROLLER_REVO:
case CONTROLLER_PIPX:
case CONTROLLER_OPLINK:
default:
return PAGE_NOTYETIMPLEMENTED;
}
@ -147,7 +147,7 @@ QString SetupWizard::getSummaryText()
case CONTROLLER_REVO:
summary.append(tr("OpenPilot Revolution"));
break;
case CONTROLLER_PIPX:
case CONTROLLER_OPLINK:
summary.append(tr("OpenPilot OPLink Radio Modem"));
break;
default:

View File

@ -56,7 +56,7 @@ class VehicleConfigurationSource
public:
VehicleConfigurationSource();
enum CONTROLLER_TYPE {CONTROLLER_UNKNOWN, CONTROLLER_CC, CONTROLLER_CC3D, CONTROLLER_REVO, CONTROLLER_PIPX};
enum CONTROLLER_TYPE {CONTROLLER_UNKNOWN, CONTROLLER_CC, CONTROLLER_CC3D, CONTROLLER_REVO, CONTROLLER_OPLINK};
enum VEHICLE_TYPE {VEHICLE_UNKNOWN, VEHICLE_MULTI, VEHICLE_FIXEDWING, VEHICLE_HELI, VEHICLE_SURFACE};
enum VEHICLE_SUB_TYPE {MULTI_ROTOR_UNKNOWN, MULTI_ROTOR_TRI_Y, MULTI_ROTOR_QUAD_X, MULTI_ROTOR_QUAD_PLUS,
MULTI_ROTOR_HEXA, MULTI_ROTOR_HEXA_H, MULTI_ROTOR_HEXA_COAX_Y, MULTI_ROTOR_OCTO,

View File

@ -552,12 +552,16 @@ bool UploaderGadgetWidget::autoUpdate()
emit autoUpdateSignal(LOADING_FW,QVariant());
switch (dfu->devices[0].ID)
{
case 0x401:
filename="fw_coptercontrol";
case 0x0301:
filename="fw_pipxtreme";
break;
case 0x401:
case 0x402:
filename="fw_coptercontrol";
break;
case 0x903:
filename="fw_revomini";
break;
default:
emit autoUpdateSignal(FAILURE,QVariant());
return false;