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_CC:
case VehicleConfigurationSource::CONTROLLER_CC3D: case VehicleConfigurationSource::CONTROLLER_CC3D:
case VehicleConfigurationSource::CONTROLLER_REVO: case VehicleConfigurationSource::CONTROLLER_REVO:
case VehicleConfigurationSource::CONTROLLER_PIPX: case VehicleConfigurationSource::CONTROLLER_OPLINK:
default: default:
elementsToShow << "controller"; elementsToShow << "controller";
break; break;

View File

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

View File

@ -97,12 +97,12 @@ SetupWizard::CONTROLLER_TYPE ControllerPage::getControllerType()
switch (id) { switch (id) {
case 0x0301: case 0x0301:
return SetupWizard::CONTROLLER_PIPX; return SetupWizard::CONTROLLER_OPLINK;
case 0x0401: case 0x0401:
return SetupWizard::CONTROLLER_CC; return SetupWizard::CONTROLLER_CC;
case 0x0402: case 0x0402:
return SetupWizard::CONTROLLER_CC3D; return SetupWizard::CONTROLLER_CC3D;
case 0x0901: case 0x0903:
return SetupWizard::CONTROLLER_REVO; return SetupWizard::CONTROLLER_REVO;
default: default:
return SetupWizard::CONTROLLER_UNKNOWN; 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"), SetupWizard::CONTROLLER_CC);
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D); ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D);
ui->boardTypeCombo->addItem(tr("OpenPilot Revolution"), SetupWizard::CONTROLLER_REVO); 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_OPLINK);
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);
} }
void ControllerPage::setControllerType(SetupWizard::CONTROLLER_TYPE type) void ControllerPage::setControllerType(SetupWizard::CONTROLLER_TYPE type)

View File

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

View File

@ -56,7 +56,7 @@ class VehicleConfigurationSource
public: public:
VehicleConfigurationSource(); 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_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, 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, 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()); emit autoUpdateSignal(LOADING_FW,QVariant());
switch (dfu->devices[0].ID) switch (dfu->devices[0].ID)
{ {
case 0x401: case 0x0301:
filename="fw_coptercontrol"; filename="fw_pipxtreme";
break; break;
case 0x401:
case 0x402: case 0x402:
filename="fw_coptercontrol"; filename="fw_coptercontrol";
break; break;
case 0x903:
filename="fw_revomini";
break;
default: default:
emit autoUpdateSignal(FAILURE,QVariant()); emit autoUpdateSignal(FAILURE,QVariant());
return false; return false;