mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
Merge remote-tracking branch 'origin/skarlsso/OP-1493_discoveryf4bare_support_in_gcs' into next
This commit is contained in:
commit
5bbd6724d6
3
Makefile
3
Makefile
@ -698,7 +698,8 @@ endif
|
||||
##############################
|
||||
|
||||
# Firmware files to package
|
||||
PACKAGE_FW_TARGETS := $(filter-out fw_simposix fw_discoveryf4bare, $(FW_TARGETS))
|
||||
PACKAGE_FW_EXCLUDE := fw_simposix $(if $(PACKAGE_FW_INCLUDE_DISCOVERYF4BARE),,fw_discoveryf4bare)
|
||||
PACKAGE_FW_TARGETS := $(filter-out $(PACKAGE_FW_EXCLUDE), $(FW_TARGETS))
|
||||
PACKAGE_ELF_TARGETS := $(filter fw_simposix, $(FW_TARGETS))
|
||||
|
||||
# Rules to generate GCS resources used to embed firmware binaries into the GCS.
|
||||
|
@ -1,5 +1,5 @@
|
||||
BOARD_TYPE := 0x09
|
||||
BOARD_REVISION := 0x03
|
||||
BOARD_REVISION := 0x04
|
||||
BOOTLOADER_VERSION := 0x06
|
||||
HW_TYPE := 0x00
|
||||
|
||||
|
@ -34,8 +34,9 @@ USE_DSP_LIB ?= NO
|
||||
#MODULES += Altitude/revolution
|
||||
#MODULES += Airspeed
|
||||
#MODULES += AltitudeHold
|
||||
#MODULES += Stabilization
|
||||
MODULES += Stabilization
|
||||
MODULES += ManualControl
|
||||
MODULES += Receiver
|
||||
MODULES += Actuator
|
||||
MODULES += GPS
|
||||
MODULES += TxPID
|
||||
|
@ -107,6 +107,9 @@ SetupWizard::CONTROLLER_TYPE ControllerPage::getControllerType()
|
||||
case 0x0903:
|
||||
return SetupWizard::CONTROLLER_REVO;
|
||||
|
||||
case 0x0904:
|
||||
return SetupWizard::CONTROLLER_DISCOVERYF4;
|
||||
|
||||
default:
|
||||
return SetupWizard::CONTROLLER_UNKNOWN;
|
||||
}
|
||||
@ -127,6 +130,7 @@ void ControllerPage::setupBoardTypes()
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot Revolution"), SetupWizard::CONTROLLER_REVO);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot OPLink Radio Modem"), SetupWizard::CONTROLLER_OPLINK);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot DiscoveryF4"), SetupWizard::CONTROLLER_DISCOVERYF4);
|
||||
}
|
||||
|
||||
void ControllerPage::setControllerType(SetupWizard::CONTROLLER_TYPE type)
|
||||
|
@ -94,6 +94,7 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
|
||||
break;
|
||||
}
|
||||
case SetupWizard::CONTROLLER_REVO:
|
||||
case SetupWizard::CONTROLLER_DISCOVERYF4:
|
||||
{
|
||||
switch (selectedType) {
|
||||
case VehicleConfigurationSource::INPUT_PWM:
|
||||
|
@ -83,6 +83,7 @@ int SetupWizard::nextId() const
|
||||
case CONTROLLER_CC:
|
||||
case CONTROLLER_CC3D:
|
||||
case CONTROLLER_REVO:
|
||||
case CONTROLLER_DISCOVERYF4:
|
||||
return PAGE_INPUT;
|
||||
|
||||
case CONTROLLER_OPLINK:
|
||||
@ -141,6 +142,10 @@ int SetupWizard::nextId() const
|
||||
case CONTROLLER_REVO:
|
||||
return PAGE_BIAS_CALIBRATION;
|
||||
|
||||
case CONTROLLER_DISCOVERYF4:
|
||||
// Skip calibration.
|
||||
return PAGE_OUTPUT_CALIBRATION;
|
||||
|
||||
default:
|
||||
return PAGE_NOTYETIMPLEMENTED;
|
||||
}
|
||||
@ -174,6 +179,9 @@ QString SetupWizard::getSummaryText()
|
||||
case CONTROLLER_OPLINK:
|
||||
summary.append(tr("OpenPilot OPLink Radio Modem"));
|
||||
break;
|
||||
case CONTROLLER_DISCOVERYF4:
|
||||
summary.append(tr("OpenPilot DiscoveryF4 Development Board"));
|
||||
break;
|
||||
default:
|
||||
summary.append(tr("Unknown"));
|
||||
break;
|
||||
|
@ -148,6 +148,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::CONTROLLER_REVO:
|
||||
case VehicleConfigurationSource::CONTROLLER_DISCOVERYF4:
|
||||
// Reset all ports
|
||||
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_DISABLED;
|
||||
|
||||
|
@ -55,7 +55,7 @@ class VehicleConfigurationSource {
|
||||
public:
|
||||
VehicleConfigurationSource();
|
||||
|
||||
enum CONTROLLER_TYPE { CONTROLLER_UNKNOWN, CONTROLLER_CC, CONTROLLER_CC3D, CONTROLLER_REVO, CONTROLLER_OPLINK };
|
||||
enum CONTROLLER_TYPE { CONTROLLER_UNKNOWN, CONTROLLER_CC, CONTROLLER_CC3D, CONTROLLER_REVO, CONTROLLER_OPLINK, CONTROLLER_DISCOVERYF4 };
|
||||
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_X, MULTI_ROTOR_HEXA_COAX_Y, MULTI_ROTOR_OCTO,
|
||||
|
@ -50,6 +50,10 @@ public:
|
||||
// Revo Mini
|
||||
return QString("Revolution");
|
||||
|
||||
break;
|
||||
case 0x0904:
|
||||
return QString("DiscoveryF4");
|
||||
|
||||
break;
|
||||
default:
|
||||
return QString("");
|
||||
|
@ -102,6 +102,9 @@ void DeviceWidget::populate()
|
||||
case 0x0903:
|
||||
devicePic.load(":/uploader/images/gcs-board-revo.png");
|
||||
break;
|
||||
case 0x0904:
|
||||
devicePic.load(":/uploader/images/gcs-board-revo.png");
|
||||
break;
|
||||
default:
|
||||
// Clear
|
||||
devicePic.load("");
|
||||
|
@ -1003,7 +1003,7 @@ quint32 DFUObject::CRCFromQBArray(QByteArray array, quint32 Size)
|
||||
quint32 pad = Size - array.length();
|
||||
|
||||
array.append(QByteArray(pad, 255));
|
||||
quint32 t[Size / 4];
|
||||
quint32 *t = new quint32[Size / 4];
|
||||
for (int x = 0; x < array.length() / 4; x++) {
|
||||
quint32 aux = 0;
|
||||
aux = (char)array[x * 4 + 3] & 0xFF;
|
||||
@ -1015,7 +1015,11 @@ quint32 DFUObject::CRCFromQBArray(QByteArray array, quint32 Size)
|
||||
aux += (char)array[x * 4 + 0] & 0xFF;
|
||||
t[x] = aux;
|
||||
}
|
||||
return DFUObject::CRC32WideFast(0xFFFFFFFF, Size / 4, (quint32 *)t);
|
||||
quint32 ret = DFUObject::CRC32WideFast(0xFFFFFFFF, Size / 4, t);
|
||||
|
||||
delete[] t;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -667,6 +667,9 @@ bool UploaderGadgetWidget::autoUpdate()
|
||||
case 0x903:
|
||||
filename = "fw_revolution";
|
||||
break;
|
||||
case 0x904:
|
||||
filename = "fw_discoveryf4bare";
|
||||
break;
|
||||
default:
|
||||
emit autoUpdateSignal(FAILURE, QVariant());
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user