mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Merge branch 'master' into bugfix-ground
This commit is contained in:
commit
3a17168708
@ -105,6 +105,11 @@ C: Gary Mortimer and the Scorpion
|
||||
D: March 2011
|
||||
V: http://vimeo.com/22104334
|
||||
|
||||
M: First Y6 OpenPilot flight
|
||||
C: Sami Korhonen (Sambas)
|
||||
D: May 2011
|
||||
V: http://www.vimeo.com/23637586
|
||||
|
||||
M: First CopterControl flight on a Flybarless Heli
|
||||
C: ?
|
||||
D: ?
|
||||
|
@ -39,9 +39,9 @@ void error(int);
|
||||
* data. This is non-intuitive for _binary_size where you
|
||||
* might expect its value to hold the size but you'd be wrong.
|
||||
*/
|
||||
extern void _binary_start;
|
||||
extern void _binary_end;
|
||||
extern void _binary_size;
|
||||
extern uint32_t _binary_start;
|
||||
extern uint32_t _binary_end;
|
||||
extern uint32_t _binary_size;
|
||||
const uint32_t * embedded_image_start = (uint32_t *) &(_binary_start);
|
||||
const uint32_t * embedded_image_end = (uint32_t *) &(_binary_end);
|
||||
const uint32_t embedded_image_size = (uint32_t) &(_binary_size);
|
||||
|
@ -84,16 +84,16 @@
|
||||
#define AUXUART_BAUDRATE 19200
|
||||
|
||||
/* Alarm Thresholds */
|
||||
#define HEAP_LIMIT_WARNING 450
|
||||
#define HEAP_LIMIT_CRITICAL 350
|
||||
#define HEAP_LIMIT_WARNING 350
|
||||
#define HEAP_LIMIT_CRITICAL 250
|
||||
#define CPULOAD_LIMIT_WARNING 80
|
||||
#define CPULOAD_LIMIT_CRITICAL 95
|
||||
|
||||
/* Task stack sizes */
|
||||
#define PIOS_ACTUATOR_STACK_SIZE 1020
|
||||
#define PIOS_MANUAL_STACK_SIZE 644
|
||||
#define PIOS_SYSTEM_STACK_SIZE 644
|
||||
#define PIOS_STABILIZATION_STACK_SIZE 624
|
||||
#define PIOS_MANUAL_STACK_SIZE 724
|
||||
#define PIOS_SYSTEM_STACK_SIZE 504
|
||||
#define PIOS_STABILIZATION_STACK_SIZE 524
|
||||
#define PIOS_TELEM_STACK_SIZE 500
|
||||
|
||||
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 1995998
|
||||
|
@ -182,7 +182,7 @@ static void actuatorTask(void* parameters)
|
||||
nMixers ++;
|
||||
}
|
||||
}
|
||||
if(nMixers < 2) //Nothing can fly with less than two mixers.
|
||||
if((nMixers < 2) && !ActuatorCommandReadOnly(dummy)) //Nothing can fly with less than two mixers.
|
||||
{
|
||||
setFailsafe(); // So that channels like PWM buzzer keep working
|
||||
continue;
|
||||
@ -198,8 +198,12 @@ static void actuatorTask(void* parameters)
|
||||
float curve2 = MixerCurve(desired.Throttle,mixerSettings.ThrottleCurve2);
|
||||
for(int ct=0; ct < MAX_MIX_ACTUATORS; ct++)
|
||||
{
|
||||
if(mixers[ct].type == MIXERSETTINGS_MIXER1TYPE_DISABLED)
|
||||
if(mixers[ct].type == MIXERSETTINGS_MIXER1TYPE_DISABLED) {
|
||||
// Set to minimum if disabled. This is not the same as saying PWM pulse = 0 us
|
||||
status[ct] = -1;
|
||||
command.Channel[ct] = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
status[ct] = ProcessMixer(ct, curve1, curve2, &mixerSettings, &desired, dT);
|
||||
|
||||
@ -400,14 +404,19 @@ static void setFailsafe()
|
||||
// Reset ActuatorCommand to safe values
|
||||
for (int n = 0; n < ACTUATORCOMMAND_CHANNEL_NUMELEM; ++n)
|
||||
{
|
||||
|
||||
if(mixers[n].type == MIXERSETTINGS_MIXER1TYPE_MOTOR)
|
||||
{
|
||||
command.Channel[n] = settings.ChannelMin[n];
|
||||
}
|
||||
else
|
||||
else if(mixers[n].type == MIXERSETTINGS_MIXER1TYPE_SERVO)
|
||||
{
|
||||
command.Channel[n] = settings.ChannelNeutral[n];
|
||||
}
|
||||
else
|
||||
{
|
||||
command.Channel[n] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Set alarm
|
||||
|
@ -143,6 +143,8 @@ static void AttitudeTask(void *parameters)
|
||||
FlightStatusGet(&flightStatus);
|
||||
|
||||
if(xTaskGetTickCount() < 10000) {
|
||||
// Force settings update to make sure rotation loaded
|
||||
settingsUpdatedCb(AttitudeSettingsHandle());
|
||||
// For first 5 seconds use accels to get gyro bias
|
||||
accelKp = 1;
|
||||
// Decrease the rate of gyro learning during init
|
||||
|
@ -63,7 +63,7 @@ static float GravityAccel(float latitude, float longitude, float altitude);
|
||||
// Private constants
|
||||
|
||||
//#define FULL_COLD_RESTART // uncomment this to tell the GPS to do a FULL COLD restart
|
||||
//#define DISABLE_GPS_TRESHOLD //
|
||||
//#define DISABLE_GPS_THRESHOLD //
|
||||
|
||||
#define GPS_TIMEOUT_MS 500
|
||||
#define GPS_COMMAND_RESEND_TIMEOUT_MS 2000
|
||||
@ -154,7 +154,7 @@ static void gpsTask(void *parameters)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DISABLE_GPS_TRESHOLD
|
||||
#ifdef DISABLE_GPS_THRESHOLD
|
||||
PIOS_COM_SendStringNonBlocking(gpsPort, "$PMTK397,0*23\r\n");
|
||||
#endif
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include "positiondesired.h" // object that will be updated by the module
|
||||
#include "positionactual.h"
|
||||
#include "manualcontrol.h"
|
||||
#include "manualcontrolcommand.h"
|
||||
#include "flightstatus.h"
|
||||
#include "nedaccel.h"
|
||||
#include "stabilizationdesired.h"
|
||||
#include "stabilizationsettings.h"
|
||||
@ -114,7 +114,7 @@ static void guidanceTask(void *parameters)
|
||||
{
|
||||
SystemSettingsData systemSettings;
|
||||
GuidanceSettingsData guidanceSettings;
|
||||
ManualControlCommandData manualControl;
|
||||
FlightStatusData flightStatus;
|
||||
|
||||
portTickType thisTime;
|
||||
portTickType lastUpdateTime;
|
||||
@ -182,11 +182,11 @@ static void guidanceTask(void *parameters)
|
||||
NedAccelSet(&accelData);
|
||||
|
||||
|
||||
ManualControlCommandGet(&manualControl);
|
||||
FlightStatusGet(&flightStatus);
|
||||
SystemSettingsGet(&systemSettings);
|
||||
GuidanceSettingsGet(&guidanceSettings);
|
||||
|
||||
if ((PARSE_FLIGHT_MODE(manualControl.FlightMode) == FLIGHTMODE_GUIDANCE) &&
|
||||
if ((PARSE_FLIGHT_MODE(flightStatus.FlightMode) == FLIGHTMODE_GUIDANCE) &&
|
||||
((systemSettings.AirframeType == SYSTEMSETTINGS_AIRFRAMETYPE_VTOL) ||
|
||||
(systemSettings.AirframeType == SYSTEMSETTINGS_AIRFRAMETYPE_QUADP) ||
|
||||
(systemSettings.AirframeType == SYSTEMSETTINGS_AIRFRAMETYPE_QUADX) ||
|
||||
@ -204,7 +204,7 @@ static void guidanceTask(void *parameters)
|
||||
positionHoldLast = 1;
|
||||
}
|
||||
|
||||
if( manualControl.FlightMode == MANUALCONTROLCOMMAND_FLIGHTMODE_POSITIONHOLD )
|
||||
if( flightStatus.FlightMode == FLIGHTSTATUS_FLIGHTMODE_POSITIONHOLD )
|
||||
updateVtolDesiredVelocity();
|
||||
else
|
||||
manualSetDesiredVelocity();
|
||||
|
@ -59,8 +59,8 @@
|
||||
// optimisation options are changed.
|
||||
#endif
|
||||
|
||||
#if defined(PIOS_MANUAL_STACK_SIZE)
|
||||
#define STACK_SIZE_BYTES PIOS_MANUAL_STACK_SIZE
|
||||
#if defined(PIOS_SYSTEM_STACK_SIZE)
|
||||
#define STACK_SIZE_BYTES PIOS_SYSTEM_STACK_SIZE
|
||||
#else
|
||||
#define STACK_SIZE_BYTES 924
|
||||
#endif
|
||||
|
@ -67,6 +67,7 @@ UAVOBJSRCFILENAMES += telemetrysettings
|
||||
UAVOBJSRCFILENAMES += velocityactual
|
||||
UAVOBJSRCFILENAMES += velocitydesired
|
||||
UAVOBJSRCFILENAMES += watchdogstatus
|
||||
UAVOBJSRCFILENAMES += flightstatus
|
||||
|
||||
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
||||
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
||||
|
@ -3125,6 +3125,52 @@
|
||||
65FBE14412E7C98100176B5A /* pios_servo_priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_servo_priv.h; sourceTree = "<group>"; };
|
||||
65FC66AA123F30F100B04F74 /* ahrs_timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ahrs_timer.c; path = ../../AHRS/ahrs_timer.c; sourceTree = SOURCE_ROOT; };
|
||||
65FC66AB123F312A00B04F74 /* ahrs_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ahrs_timer.h; sourceTree = "<group>"; };
|
||||
65FF4BB513791C3300146BE4 /* ahrs_slave_test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ahrs_slave_test.c; sourceTree = "<group>"; };
|
||||
65FF4BB613791C3300146BE4 /* ahrs_spi_program.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ahrs_spi_program.c; sourceTree = "<group>"; };
|
||||
65FF4BB713791C3300146BE4 /* ahrs_spi_program_master.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ahrs_spi_program_master.c; sourceTree = "<group>"; };
|
||||
65FF4BB813791C3300146BE4 /* ahrs_spi_program_slave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ahrs_spi_program_slave.c; sourceTree = "<group>"; };
|
||||
65FF4BB913791C3300146BE4 /* bl_fsm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bl_fsm.c; sourceTree = "<group>"; };
|
||||
65FF4BBB13791C3300146BE4 /* ahrs_bl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ahrs_bl.h; sourceTree = "<group>"; };
|
||||
65FF4BBC13791C3300146BE4 /* ahrs_spi_program.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ahrs_spi_program.h; sourceTree = "<group>"; };
|
||||
65FF4BBD13791C3300146BE4 /* ahrs_spi_program_master.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ahrs_spi_program_master.h; sourceTree = "<group>"; };
|
||||
65FF4BBE13791C3300146BE4 /* ahrs_spi_program_slave.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ahrs_spi_program_slave.h; sourceTree = "<group>"; };
|
||||
65FF4BBF13791C3300146BE4 /* bl_fsm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bl_fsm.h; sourceTree = "<group>"; };
|
||||
65FF4BC013791C3300146BE4 /* pios_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_config.h; sourceTree = "<group>"; };
|
||||
65FF4BC113791C3300146BE4 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
65FF4BC213791C3300146BE4 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
65FF4BC313791C3300146BE4 /* pios_board.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_board.c; sourceTree = "<group>"; };
|
||||
65FF4BC613791C3300146BE4 /* pios_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_config.h; sourceTree = "<group>"; };
|
||||
65FF4BC713791C3300146BE4 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
65FF4BC813791C3300146BE4 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
65FF4BC913791C3300146BE4 /* pios_board.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_board.c; sourceTree = "<group>"; };
|
||||
65FF4BCA13791C3300146BE4 /* test.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = test.bin; sourceTree = "<group>"; };
|
||||
65FF4BCD13791C3300146BE4 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
|
||||
65FF4BCE13791C3300146BE4 /* op_dfu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = op_dfu.h; sourceTree = "<group>"; };
|
||||
65FF4BCF13791C3300146BE4 /* pios_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_config.h; sourceTree = "<group>"; };
|
||||
65FF4BD013791C3300146BE4 /* pios_usb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_usb.h; sourceTree = "<group>"; };
|
||||
65FF4BD113791C3300146BE4 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
65FF4BD213791C3300146BE4 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
65FF4BD313791C3300146BE4 /* op_dfu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = op_dfu.c; sourceTree = "<group>"; };
|
||||
65FF4BD413791C3300146BE4 /* pios_board.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_board.c; sourceTree = "<group>"; };
|
||||
65FF4BD713791C3300146BE4 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
|
||||
65FF4BD813791C3300146BE4 /* op_dfu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = op_dfu.h; sourceTree = "<group>"; };
|
||||
65FF4BD913791C3300146BE4 /* pios_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_config.h; sourceTree = "<group>"; };
|
||||
65FF4BDA13791C3300146BE4 /* pios_usb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_usb.h; sourceTree = "<group>"; };
|
||||
65FF4BDB13791C3300146BE4 /* ssp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ssp.h; sourceTree = "<group>"; };
|
||||
65FF4BDC13791C3300146BE4 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
65FF4BDD13791C3300146BE4 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
65FF4BDE13791C3300146BE4 /* op_dfu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = op_dfu.c; sourceTree = "<group>"; };
|
||||
65FF4BDF13791C3300146BE4 /* pios_board.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_board.c; sourceTree = "<group>"; };
|
||||
65FF4BE013791C3300146BE4 /* ssp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ssp.c; sourceTree = "<group>"; };
|
||||
65FF4BE113791C3300146BE4 /* ssp_timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ssp_timer.c; sourceTree = "<group>"; };
|
||||
65FF4BE413791C3300146BE4 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
|
||||
65FF4BE513791C3300146BE4 /* op_dfu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = op_dfu.h; sourceTree = "<group>"; };
|
||||
65FF4BE613791C3300146BE4 /* pios_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_config.h; sourceTree = "<group>"; };
|
||||
65FF4BE713791C3300146BE4 /* pios_usb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_usb.h; sourceTree = "<group>"; };
|
||||
65FF4BE813791C3300146BE4 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
65FF4BE913791C3300146BE4 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
65FF4BEA13791C3300146BE4 /* op_dfu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = op_dfu.c; sourceTree = "<group>"; };
|
||||
65FF4BEB13791C3300146BE4 /* pios_board.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_board.c; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
@ -3505,6 +3551,7 @@
|
||||
657CEEB5121DBC49007A1FBE /* flight */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BB313791C3300146BE4 /* Bootloaders */,
|
||||
65F93B9012EE09280047DB36 /* PipXtreme */,
|
||||
65B7E6AC120DF1CD000C1123 /* AHRS */,
|
||||
65E6DF7012E02E8E00058553 /* CopterControl */,
|
||||
@ -8238,6 +8285,140 @@
|
||||
path = inc;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BB313791C3300146BE4 /* Bootloaders */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BB413791C3300146BE4 /* AHRS */,
|
||||
65FF4BC413791C3300146BE4 /* BootloaderUpdater */,
|
||||
65FF4BCB13791C3300146BE4 /* CopterControl */,
|
||||
65FF4BD513791C3300146BE4 /* OpenPilot */,
|
||||
65FF4BE213791C3300146BE4 /* PipXtreme */,
|
||||
);
|
||||
name = Bootloaders;
|
||||
path = ../../Bootloaders;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
65FF4BB413791C3300146BE4 /* AHRS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BB513791C3300146BE4 /* ahrs_slave_test.c */,
|
||||
65FF4BB613791C3300146BE4 /* ahrs_spi_program.c */,
|
||||
65FF4BB713791C3300146BE4 /* ahrs_spi_program_master.c */,
|
||||
65FF4BB813791C3300146BE4 /* ahrs_spi_program_slave.c */,
|
||||
65FF4BB913791C3300146BE4 /* bl_fsm.c */,
|
||||
65FF4BBA13791C3300146BE4 /* inc */,
|
||||
65FF4BC113791C3300146BE4 /* main.c */,
|
||||
65FF4BC213791C3300146BE4 /* Makefile */,
|
||||
65FF4BC313791C3300146BE4 /* pios_board.c */,
|
||||
);
|
||||
path = AHRS;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BBA13791C3300146BE4 /* inc */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BBB13791C3300146BE4 /* ahrs_bl.h */,
|
||||
65FF4BBC13791C3300146BE4 /* ahrs_spi_program.h */,
|
||||
65FF4BBD13791C3300146BE4 /* ahrs_spi_program_master.h */,
|
||||
65FF4BBE13791C3300146BE4 /* ahrs_spi_program_slave.h */,
|
||||
65FF4BBF13791C3300146BE4 /* bl_fsm.h */,
|
||||
65FF4BC013791C3300146BE4 /* pios_config.h */,
|
||||
);
|
||||
path = inc;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BC413791C3300146BE4 /* BootloaderUpdater */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BC513791C3300146BE4 /* inc */,
|
||||
65FF4BC713791C3300146BE4 /* main.c */,
|
||||
65FF4BC813791C3300146BE4 /* Makefile */,
|
||||
65FF4BC913791C3300146BE4 /* pios_board.c */,
|
||||
65FF4BCA13791C3300146BE4 /* test.bin */,
|
||||
);
|
||||
path = BootloaderUpdater;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BC513791C3300146BE4 /* inc */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BC613791C3300146BE4 /* pios_config.h */,
|
||||
);
|
||||
path = inc;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BCB13791C3300146BE4 /* CopterControl */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BCC13791C3300146BE4 /* inc */,
|
||||
65FF4BD113791C3300146BE4 /* main.c */,
|
||||
65FF4BD213791C3300146BE4 /* Makefile */,
|
||||
65FF4BD313791C3300146BE4 /* op_dfu.c */,
|
||||
65FF4BD413791C3300146BE4 /* pios_board.c */,
|
||||
);
|
||||
path = CopterControl;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BCC13791C3300146BE4 /* inc */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BCD13791C3300146BE4 /* common.h */,
|
||||
65FF4BCE13791C3300146BE4 /* op_dfu.h */,
|
||||
65FF4BCF13791C3300146BE4 /* pios_config.h */,
|
||||
65FF4BD013791C3300146BE4 /* pios_usb.h */,
|
||||
);
|
||||
path = inc;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BD513791C3300146BE4 /* OpenPilot */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BD613791C3300146BE4 /* inc */,
|
||||
65FF4BDC13791C3300146BE4 /* main.c */,
|
||||
65FF4BDD13791C3300146BE4 /* Makefile */,
|
||||
65FF4BDE13791C3300146BE4 /* op_dfu.c */,
|
||||
65FF4BDF13791C3300146BE4 /* pios_board.c */,
|
||||
65FF4BE013791C3300146BE4 /* ssp.c */,
|
||||
65FF4BE113791C3300146BE4 /* ssp_timer.c */,
|
||||
);
|
||||
path = OpenPilot;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BD613791C3300146BE4 /* inc */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BD713791C3300146BE4 /* common.h */,
|
||||
65FF4BD813791C3300146BE4 /* op_dfu.h */,
|
||||
65FF4BD913791C3300146BE4 /* pios_config.h */,
|
||||
65FF4BDA13791C3300146BE4 /* pios_usb.h */,
|
||||
65FF4BDB13791C3300146BE4 /* ssp.h */,
|
||||
);
|
||||
path = inc;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BE213791C3300146BE4 /* PipXtreme */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BE313791C3300146BE4 /* inc */,
|
||||
65FF4BE813791C3300146BE4 /* main.c */,
|
||||
65FF4BE913791C3300146BE4 /* Makefile */,
|
||||
65FF4BEA13791C3300146BE4 /* op_dfu.c */,
|
||||
65FF4BEB13791C3300146BE4 /* pios_board.c */,
|
||||
);
|
||||
path = PipXtreme;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
65FF4BE313791C3300146BE4 /* inc */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65FF4BE413791C3300146BE4 /* common.h */,
|
||||
65FF4BE513791C3300146BE4 /* op_dfu.h */,
|
||||
65FF4BE613791C3300146BE4 /* pios_config.h */,
|
||||
65FF4BE713791C3300146BE4 /* pios_usb.h */,
|
||||
);
|
||||
path = inc;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6A0FF2B0290797F04C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
99
flight/Project/versionblob.py
Executable file
99
flight/Project/versionblob.py
Executable file
@ -0,0 +1,99 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Generate a version blob for
|
||||
# the OpenPilot firmware.
|
||||
#
|
||||
# By E. Lafargue (c) 2011 E. Lafargue & the OpenPilot team
|
||||
# Licence: GPLv3
|
||||
#
|
||||
###
|
||||
# Usage:
|
||||
# versionblob.py --append --firmware=<Firmware file name> --boardid=<Board code>
|
||||
#
|
||||
# append: if present, then append blob to firmware file directly, otherwise create "blob.bin"
|
||||
# firmware: the filename of the firmware binary
|
||||
# boardid: as a string, the board code, for example "0401" for CC board version 1.
|
||||
# should match the codes in firmware description files.
|
||||
#
|
||||
# We have 100 bytes for the whole description.
|
||||
#
|
||||
# Only the first 40 are visible on the FirmwareIAP uavobject, the remaining
|
||||
# 60 are ok to use for packaging and will be saved in the flash
|
||||
#
|
||||
# Structure is:
|
||||
# 4 bytes: header: "OpFw"
|
||||
# 4 bytes: GIT commit tag (short version of SHA1)
|
||||
# 4 bytes: Unix timestamp of compile time
|
||||
# 2 bytes: target platform. Should follow same rule as BOARD_TYPE and BOARD_REVISION in board define files.
|
||||
# 26 bytes: commit tag if it is there, otherwise branch name. Zero-padded
|
||||
# ---- 40 bytes limit ---
|
||||
# 20 bytes: SHA1 sum of the firmware.
|
||||
# 40 bytes: free for now.
|
||||
|
||||
import binascii
|
||||
import os
|
||||
from time import time
|
||||
import argparse
|
||||
|
||||
# Do the argument parsing:
|
||||
parser = argparse.ArgumentParser(description='Generate firmware desciption blob')
|
||||
parser.add_argument('--append', action='store_true')
|
||||
parser.add_argument('--firmware', help='name of firmware binary file' , required=True)
|
||||
parser.add_argument('--boardid', help='ID of board model, for example 0401 for CopterControl', required=True)
|
||||
args = parser.parse_args()
|
||||
print args
|
||||
|
||||
if args.append == True:
|
||||
print 'Appending description blob directly to ' + args.firmware
|
||||
filename = args.firmware
|
||||
file = open(filename,"ab")
|
||||
else:
|
||||
filename = 'blob.bin'
|
||||
file = open(filename,"wb")
|
||||
|
||||
|
||||
# Write the magic value:
|
||||
file.write("OpFw")
|
||||
# Get the short commit tag of the current git repository.
|
||||
# Strip it to 8 characters for a 4 byte (int32) value.
|
||||
# We have no full guarantee of unicity, but it is good enough
|
||||
# with the rest of the information in the structure.
|
||||
hs= os.popen('git rev-parse --short=8 HEAD').read().strip()
|
||||
print "Version: " + hs
|
||||
hb=binascii.a2b_hex(hs)
|
||||
file.write(hb)
|
||||
# Then the Unix time into a 32 bit integer:
|
||||
print "Date: " + hex(int(time())).lstrip('0x')
|
||||
hb = binascii.a2b_hex(hex(int(time())).lstrip('0x'))
|
||||
file.write(hb)
|
||||
|
||||
# Then write board type and board revision
|
||||
hb = binascii.a2b_hex(args.boardid)
|
||||
file.write(hb)
|
||||
|
||||
# Last: a user-friendly description if it exists in GIT, otherwise
|
||||
# just "unreleased"
|
||||
hs = os.popen('git describe --exact-match').read()
|
||||
if len(hs) == 0 :
|
||||
print "Unreleased: get branch name instead"
|
||||
hs = os.popen('git branch --contains HEAD').read()
|
||||
|
||||
file.write(hs[0:26])
|
||||
file.write("\0"*(26-len(hs)))
|
||||
|
||||
## Now we are at the 40 bytes mark.
|
||||
|
||||
## Add the 20 byte SHA1 hash of the firmware:
|
||||
import hashlib
|
||||
sha1 = hashlib.sha1()
|
||||
with open('build/coptercontrol/CopterControl.bin','rb') as f:
|
||||
for chunk in iter(lambda: f.read(8192), ''):
|
||||
sha1.update(chunk)
|
||||
file.write(sha1.digest())
|
||||
|
||||
# Pad will null bytes:
|
||||
file.write('\0'*40)
|
||||
|
||||
|
||||
file.close()
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>343</height>
|
||||
<width>415</width>
|
||||
<height>349</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -159,86 +159,86 @@
|
||||
<property name="title">
|
||||
<string>Attitude Calibration</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>20</y>
|
||||
<width>371</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="margin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Place aircraft flat before computing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="status">
|
||||
<property name="text">
|
||||
<string>Click "Zero Accel Bias" to start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="zeroBias">
|
||||
<property name="toolTip">
|
||||
<string>Launch horizontal calibration.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Zero Accel Bias</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="zeroBiasProgress">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="margin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Place aircraft flat before computing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="status">
|
||||
<property name="text">
|
||||
<string>Click "Zero Accel Bias" to start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="zeroBias">
|
||||
<property name="toolTip">
|
||||
<string>Launch horizontal calibration.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Zero Accel Bias</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="zeroBiasProgress">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -1,5 +1,5 @@
|
||||
[General]
|
||||
ViewGroup_Default=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x5V\0\0\x2\x9a\0\0\0\x4\0\0\0\x4\0\0\0\x1\0\0\0\b\xfc\0\0\0\0)
|
||||
ViewGroup_Default=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x5\xa0\0\0\x3/\0\0\0\x4\0\0\0\x4\0\0\0\x1\0\0\0\b\xfc\0\0\0\0)
|
||||
|
||||
[Workspace]
|
||||
NumberOfWorkspaces=6
|
||||
@ -151,18 +151,18 @@ Mode1\splitter\side1\side1\side1\side1\splitterOrientation=1
|
||||
Mode1\splitter\side1\side1\side1\side1\splitterSizes=64, 376
|
||||
Mode1\splitter\side1\side1\side1\side1\side0\type=uavGadget
|
||||
Mode1\splitter\side1\side1\side1\side1\side0\classId=LineardialGadget
|
||||
Mode1\splitter\side1\side1\side1\side1\side0\gadget\activeConfiguration=Roll
|
||||
Mode1\splitter\side1\side1\side1\side1\side0\gadget\activeConfiguration=Roll Desired
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\type=splitter
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\splitterOrientation=1
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\splitterSizes=64, 311
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side0\type=uavGadget
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side0\classId=LineardialGadget
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side0\gadget\activeConfiguration=Pitch
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side0\gadget\activeConfiguration=Pitch Desired
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side1\type=uavGadget
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side1\classId=LineardialGadget
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side1\gadget\activeConfiguration=Yaw
|
||||
Mode1\splitter\side1\side1\side1\side1\side1\side1\gadget\activeConfiguration=Yaw Desired
|
||||
Mode2\version=UAVGadgetManagerV1
|
||||
Mode2\showToolbars=true
|
||||
Mode2\showToolbars=false
|
||||
Mode2\splitter\type=splitter
|
||||
Mode2\splitter\splitterOrientation=1
|
||||
Mode2\splitter\splitterSizes=734, 631
|
||||
@ -183,7 +183,7 @@ Mode2\splitter\side0\side1\side1\classId=LineardialGadget
|
||||
Mode2\splitter\side0\side1\side1\gadget\activeConfiguration=Telemetry TX Rate Horizontal
|
||||
Mode2\splitter\side1\type=splitter
|
||||
Mode2\splitter\side1\splitterOrientation=2
|
||||
Mode2\splitter\side1\splitterSizes=433, 347
|
||||
Mode2\splitter\side1\splitterSizes=426, 354
|
||||
Mode2\splitter\side1\side0\type=uavGadget
|
||||
Mode2\splitter\side1\side0\classId=UAVObjectBrowser
|
||||
Mode2\splitter\side1\side0\gadget\activeConfiguration=default
|
||||
@ -266,7 +266,7 @@ Mode5\splitter\side0\side1\side1\side0\splitterOrientation=1
|
||||
Mode5\splitter\side0\side1\side1\side0\splitterSizes=@Invalid()
|
||||
Mode5\splitter\side0\side1\side1\side0\side0\type=uavGadget
|
||||
Mode5\splitter\side0\side1\side1\side0\side0\classId=LineardialGadget
|
||||
Mode5\splitter\side0\side1\side1\side0\side0\gadget\activeConfiguration=PitchDesired
|
||||
Mode5\splitter\side0\side1\side1\side0\side0\gadget\activeConfiguration=Pitch Desired
|
||||
Mode5\splitter\side0\side1\side1\side0\side1\type=uavGadget
|
||||
Mode5\splitter\side0\side1\side1\side0\side1\classId=LineardialGadget
|
||||
Mode5\splitter\side0\side1\side1\side0\side1\gadget\activeConfiguration=PitchActual
|
||||
@ -304,12 +304,8 @@ Mode6\splitter\side1\side1\gadget\activeConfiguration=Uptimes
|
||||
size=0
|
||||
|
||||
[%General]
|
||||
OverrideLanguage=en_AU
|
||||
SaveSettingsOnExit=true
|
||||
TerminalEmulator=xterm -e
|
||||
LastPreferenceCategory=LineardialGadget
|
||||
LastPreferencePage=PitchCommand
|
||||
SettingsWindowWidth=780
|
||||
SettingsWindowHeight=534
|
||||
|
||||
[UAVGadgetConfigurations]
|
||||
configInfo\version=1.2.0
|
||||
@ -1239,6 +1235,40 @@ LineardialGadget\Mainboard%20CPU\data\factor=1
|
||||
LineardialGadget\Mainboard%20CPU\data\useOpenGLFlag=false
|
||||
LineardialGadget\Mainboard%20CPU\configInfo\version=0.0.0
|
||||
LineardialGadget\Mainboard%20CPU\configInfo\locked=false
|
||||
LineardialGadget\Pitch\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\Pitch\data\sourceDataObject=ManualControlCommand
|
||||
LineardialGadget\Pitch\data\sourceObjectField=Pitch
|
||||
LineardialGadget\Pitch\data\minValue=-1
|
||||
LineardialGadget\Pitch\data\maxValue=1
|
||||
LineardialGadget\Pitch\data\redMin=-1
|
||||
LineardialGadget\Pitch\data\redMax=1
|
||||
LineardialGadget\Pitch\data\yellowMin=-0.8
|
||||
LineardialGadget\Pitch\data\yellowMax=0.8
|
||||
LineardialGadget\Pitch\data\greenMin=-0.5
|
||||
LineardialGadget\Pitch\data\greenMax=0.5
|
||||
LineardialGadget\Pitch\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
|
||||
LineardialGadget\Pitch\data\decimalPlaces=2
|
||||
LineardialGadget\Pitch\data\factor=1
|
||||
LineardialGadget\Pitch\data\useOpenGLFlag=false
|
||||
LineardialGadget\Pitch\configInfo\version=0.0.0
|
||||
LineardialGadget\Pitch\configInfo\locked=false
|
||||
LineardialGadget\Pitch%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\Pitch%20Desired\data\sourceDataObject=ActuatorDesired
|
||||
LineardialGadget\Pitch%20Desired\data\sourceObjectField=Pitch
|
||||
LineardialGadget\Pitch%20Desired\data\minValue=-1
|
||||
LineardialGadget\Pitch%20Desired\data\maxValue=1
|
||||
LineardialGadget\Pitch%20Desired\data\redMin=-1
|
||||
LineardialGadget\Pitch%20Desired\data\redMax=1
|
||||
LineardialGadget\Pitch%20Desired\data\yellowMin=-0.8
|
||||
LineardialGadget\Pitch%20Desired\data\yellowMax=0.8
|
||||
LineardialGadget\Pitch%20Desired\data\greenMin=-0.5
|
||||
LineardialGadget\Pitch%20Desired\data\greenMax=0.5
|
||||
LineardialGadget\Pitch%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
|
||||
LineardialGadget\Pitch%20Desired\data\decimalPlaces=2
|
||||
LineardialGadget\Pitch%20Desired\data\factor=1
|
||||
LineardialGadget\Pitch%20Desired\data\useOpenGLFlag=false
|
||||
LineardialGadget\Pitch%20Desired\configInfo\version=0.0.0
|
||||
LineardialGadget\Pitch%20Desired\configInfo\locked=false
|
||||
LineardialGadget\PitchActual\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\PitchActual\data\sourceDataObject=AttitudeActual
|
||||
LineardialGadget\PitchActual\data\sourceObjectField=Pitch
|
||||
@ -1256,23 +1286,6 @@ LineardialGadget\PitchActual\data\factor=1
|
||||
LineardialGadget\PitchActual\data\useOpenGLFlag=false
|
||||
LineardialGadget\PitchActual\configInfo\version=0.0.0
|
||||
LineardialGadget\PitchActual\configInfo\locked=false
|
||||
LineardialGadget\PitchDesired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\PitchDesired\data\sourceDataObject=ActuatorDesired
|
||||
LineardialGadget\PitchDesired\data\sourceObjectField=Pitch
|
||||
LineardialGadget\PitchDesired\data\minValue=-1
|
||||
LineardialGadget\PitchDesired\data\maxValue=1
|
||||
LineardialGadget\PitchDesired\data\redMin=0
|
||||
LineardialGadget\PitchDesired\data\redMax=1
|
||||
LineardialGadget\PitchDesired\data\yellowMin=0.1
|
||||
LineardialGadget\PitchDesired\data\yellowMax=0.9
|
||||
LineardialGadget\PitchDesired\data\greenMin=0.3
|
||||
LineardialGadget\PitchDesired\data\greenMax=0.8
|
||||
LineardialGadget\PitchDesired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
|
||||
LineardialGadget\PitchDesired\data\decimalPlaces=2
|
||||
LineardialGadget\PitchDesired\data\factor=1
|
||||
LineardialGadget\PitchDesired\data\useOpenGLFlag=false
|
||||
LineardialGadget\PitchDesired\configInfo\version=0.0.0
|
||||
LineardialGadget\PitchDesired\configInfo\locked=false
|
||||
LineardialGadget\Roll\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\Roll\data\sourceDataObject=ManualControlCommand
|
||||
LineardialGadget\Roll\data\sourceObjectField=Roll
|
||||
@ -1290,6 +1303,23 @@ LineardialGadget\Roll\data\factor=1
|
||||
LineardialGadget\Roll\data\useOpenGLFlag=false
|
||||
LineardialGadget\Roll\configInfo\version=0.0.0
|
||||
LineardialGadget\Roll\configInfo\locked=false
|
||||
LineardialGadget\Roll%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\Roll%20Desired\data\sourceDataObject=ActuatorDesired
|
||||
LineardialGadget\Roll%20Desired\data\sourceObjectField=Roll
|
||||
LineardialGadget\Roll%20Desired\data\minValue=-1
|
||||
LineardialGadget\Roll%20Desired\data\maxValue=1
|
||||
LineardialGadget\Roll%20Desired\data\redMin=-1
|
||||
LineardialGadget\Roll%20Desired\data\redMax=1
|
||||
LineardialGadget\Roll%20Desired\data\yellowMin=-0.8
|
||||
LineardialGadget\Roll%20Desired\data\yellowMax=0.8
|
||||
LineardialGadget\Roll%20Desired\data\greenMin=-0.5
|
||||
LineardialGadget\Roll%20Desired\data\greenMax=0.5
|
||||
LineardialGadget\Roll%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
|
||||
LineardialGadget\Roll%20Desired\data\decimalPlaces=2
|
||||
LineardialGadget\Roll%20Desired\data\factor=1
|
||||
LineardialGadget\Roll%20Desired\data\useOpenGLFlag=false
|
||||
LineardialGadget\Roll%20Desired\configInfo\version=0.0.0
|
||||
LineardialGadget\Roll%20Desired\configInfo\locked=false
|
||||
LineardialGadget\Telemetry%20RX%20Rate%20Horizontal\data\dFile=%%DATAPATH%%dials/default/lineardial-horizontal.svg
|
||||
LineardialGadget\Telemetry%20RX%20Rate%20Horizontal\data\sourceDataObject=GCSTelemetryStats
|
||||
LineardialGadget\Telemetry%20RX%20Rate%20Horizontal\data\sourceObjectField=RxDataRate
|
||||
@ -1358,6 +1388,23 @@ LineardialGadget\Yaw\data\factor=1
|
||||
LineardialGadget\Yaw\data\useOpenGLFlag=false
|
||||
LineardialGadget\Yaw\configInfo\version=0.0.0
|
||||
LineardialGadget\Yaw\configInfo\locked=false
|
||||
LineardialGadget\Yaw%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\Yaw%20Desired\data\sourceDataObject=ActuatorDesired
|
||||
LineardialGadget\Yaw%20Desired\data\sourceObjectField=Yaw
|
||||
LineardialGadget\Yaw%20Desired\data\minValue=-1
|
||||
LineardialGadget\Yaw%20Desired\data\maxValue=1
|
||||
LineardialGadget\Yaw%20Desired\data\redMin=-1
|
||||
LineardialGadget\Yaw%20Desired\data\redMax=1
|
||||
LineardialGadget\Yaw%20Desired\data\yellowMin=-0.8
|
||||
LineardialGadget\Yaw%20Desired\data\yellowMax=0.8
|
||||
LineardialGadget\Yaw%20Desired\data\greenMin=-0.5
|
||||
LineardialGadget\Yaw%20Desired\data\greenMax=0.5
|
||||
LineardialGadget\Yaw%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
|
||||
LineardialGadget\Yaw%20Desired\data\decimalPlaces=2
|
||||
LineardialGadget\Yaw%20Desired\data\factor=1
|
||||
LineardialGadget\Yaw%20Desired\data\useOpenGLFlag=false
|
||||
LineardialGadget\Yaw%20Desired\configInfo\version=0.0.0
|
||||
LineardialGadget\Yaw%20Desired\configInfo\locked=false
|
||||
ModelViewGadget\Aeroquad%20%2B\data\acFilename=%%DATAPATH%%models/multi/aeroquad/aeroquad_+.3ds
|
||||
ModelViewGadget\Aeroquad%20%2B\data\bgFilename=%%DATAPATH%%models/backgrounds/default_background.png
|
||||
ModelViewGadget\Aeroquad%20%2B\data\enableVbo=false
|
||||
@ -1427,23 +1474,6 @@ OPMapGadget\Google%20Sat\data\showTileGridLines=false
|
||||
OPMapGadget\Google%20Sat\data\accessMode=ServerAndCache
|
||||
OPMapGadget\Google%20Sat\data\useMemoryCache=true
|
||||
OPMapGadget\Google%20Sat\data\uavSymbol=mapquad.png
|
||||
LineardialGadget\Pitch\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
|
||||
LineardialGadget\Pitch\data\sourceDataObject=ManualControlCommand
|
||||
LineardialGadget\Pitch\data\sourceObjectField=Pitch
|
||||
LineardialGadget\Pitch\data\minValue=-1
|
||||
LineardialGadget\Pitch\data\maxValue=1
|
||||
LineardialGadget\Pitch\data\redMin=-1
|
||||
LineardialGadget\Pitch\data\redMax=1
|
||||
LineardialGadget\Pitch\data\yellowMin=-0.8
|
||||
LineardialGadget\Pitch\data\yellowMax=0.8
|
||||
LineardialGadget\Pitch\data\greenMin=-0.5
|
||||
LineardialGadget\Pitch\data\greenMax=0.5
|
||||
LineardialGadget\Pitch\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
|
||||
LineardialGadget\Pitch\data\decimalPlaces=2
|
||||
LineardialGadget\Pitch\data\factor=1
|
||||
LineardialGadget\Pitch\data\useOpenGLFlag=false
|
||||
LineardialGadget\Pitch\configInfo\version=0.0.0
|
||||
LineardialGadget\Pitch\configInfo\locked=false
|
||||
OPMapGadget\Google%20Sat\data\cacheLocation=%%STOREPATH%%mapscache/
|
||||
OPMapGadget\Google%20Sat\configInfo\version=0.0.0
|
||||
OPMapGadget\Google%20Sat\configInfo\locked=false
|
||||
@ -1883,16 +1913,16 @@ Uploader\default\configInfo\version=0.0.0
|
||||
Uploader\default\configInfo\locked=false
|
||||
|
||||
[Plugins]
|
||||
SoundNotifyPlugin\data\Current\1\SoundCollectionPath=%%DATAPATH%%sounds
|
||||
SoundNotifyPlugin\data\Current\1\CurrentLanguage=default
|
||||
SoundNotifyPlugin\data\Current\1\ObjectField=Channel
|
||||
SoundNotifyPlugin\data\Current\1\DataObject=ActuatorCommand
|
||||
SoundNotifyPlugin\data\Current\1\Value=Equal to
|
||||
SoundNotifyPlugin\data\Current\1\SoundCollectionPath=
|
||||
SoundNotifyPlugin\data\Current\1\CurrentLanguage=
|
||||
SoundNotifyPlugin\data\Current\1\ObjectField=
|
||||
SoundNotifyPlugin\data\Current\1\DataObject=
|
||||
SoundNotifyPlugin\data\Current\1\Value=
|
||||
SoundNotifyPlugin\data\Current\1\ValueSpinBox=0
|
||||
SoundNotifyPlugin\data\Current\1\Sound1=
|
||||
SoundNotifyPlugin\data\Current\1\Sound2=
|
||||
SoundNotifyPlugin\data\Current\1\Sound3=
|
||||
SoundNotifyPlugin\data\Current\1\SayOrder=Never
|
||||
SoundNotifyPlugin\data\Current\1\SayOrder=
|
||||
SoundNotifyPlugin\data\Current\1\Repeat=
|
||||
SoundNotifyPlugin\data\Current\1\ExpireTimeout=0
|
||||
SoundNotifyPlugin\data\Current\size=1
|
||||
@ -1900,9 +1930,3 @@ SoundNotifyPlugin\data\listNotifies\size=0
|
||||
SoundNotifyPlugin\data\EnableSound=false
|
||||
SoundNotifyPlugin\configInfo\version=1.0.0
|
||||
SoundNotifyPlugin\configInfo\locked=false
|
||||
|
||||
[IPconnection]
|
||||
Current\1\HostName=
|
||||
Current\1\Port=1
|
||||
Current\1\UseTCP=0
|
||||
Current\size=1
|
||||
|
@ -117,9 +117,16 @@ void deviceWidget::populate()
|
||||
|
||||
int size=((OP_DFU::device)m_dfu->devices[deviceID]).SizeOfDesc;
|
||||
m_dfu->enterDFU(deviceID);
|
||||
QString str = m_dfu->DownloadDescription(size);
|
||||
myDevice->description->setMaxLength(size);
|
||||
myDevice->description->setText(str.left(str.indexOf(QChar(255))));
|
||||
QByteArray desc = m_dfu->DownloadDescriptionAsBA(size);
|
||||
if (! populateStructuredDescription(desc)) {
|
||||
// desc was not a structured description
|
||||
QString str = m_dfu->DownloadDescription(size);
|
||||
myDevice->description->setMaxLength(size);
|
||||
myDevice->description->setText(str.left(str.indexOf(QChar(255))));
|
||||
myDevice->buildDate->setText("Warning: development firmware");
|
||||
myDevice->commitTag->setText("");
|
||||
}
|
||||
|
||||
|
||||
status("Ready...", STATUSICON_INFO);
|
||||
|
||||
@ -137,6 +144,51 @@ void deviceWidget::freeze()
|
||||
myDevice->retrieveButton->setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Populates the widget field with the description in case
|
||||
it is structured properly
|
||||
*/
|
||||
bool deviceWidget::populateStructuredDescription(QByteArray desc)
|
||||
{
|
||||
if (desc.startsWith("OpFw")) {
|
||||
// This looks like a binary with a description at the end
|
||||
/*
|
||||
# 4 bytes: header: "OpFw"
|
||||
# 4 bytes: GIT commit tag (short version of SHA1)
|
||||
# 4 bytes: Unix timestamp of compile time
|
||||
# 2 bytes: target platform. Should follow same rule as BOARD_TYPE and BOARD_REVISION in board define files.
|
||||
# 26 bytes: commit tag if it is there, otherwise "Unreleased". Zero-padded
|
||||
# ---- 40 bytes limit ---
|
||||
# 20 bytes: SHA1 sum of the firmware.
|
||||
# 40 bytes: free for now.
|
||||
*/
|
||||
// I don't want to use structs, ok ?
|
||||
quint32 gitCommitTag = desc.at(4)&0xFF;
|
||||
for (int i=1;i<4;i++) {
|
||||
gitCommitTag = gitCommitTag<<8;
|
||||
gitCommitTag += desc.at(4+i) & 0xFF;
|
||||
}
|
||||
myDevice->commitTag->setText("GIT tag 0x" + QString::number(gitCommitTag,16));
|
||||
quint32 buildDate = desc.at(8)&0xFF;
|
||||
for (int i=1;i<4;i++) {
|
||||
buildDate = buildDate<<8;
|
||||
buildDate += desc.at(8+i) & 0xFF;
|
||||
}
|
||||
|
||||
myDevice->buildDate->setText(QString("Build time: ") + QDateTime::fromTime_t(buildDate).toString());
|
||||
QByteArray targetPlatform = desc.mid(12,2);
|
||||
// TODO: check platform compatibility
|
||||
QString dscText = QString(desc.mid(14,26));
|
||||
myDevice->description->setText(dscText);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Updates status message for messages coming from DFU
|
||||
*/
|
||||
@ -199,6 +251,44 @@ void deviceWidget::uploadFirmware()
|
||||
return;
|
||||
}
|
||||
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
status("Can't open file", STATUSICON_FAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray arr = file.readAll();
|
||||
QByteArray desc = arr.right(100);
|
||||
if (populateStructuredDescription(desc)) {
|
||||
descriptionArray = desc;
|
||||
// Now do sanity checking:
|
||||
// - 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 (firmwareBoard != board) {
|
||||
status("Error: firmware does not match board", STATUSICON_FAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the firmware embedded in the file:
|
||||
QByteArray firmwareHash = desc.mid(40,20);
|
||||
QByteArray fileHash = QCryptographicHash::hash(arr.left(arr.length()-100), QCryptographicHash::Sha1);
|
||||
if (firmwareHash != fileHash) {
|
||||
status("Error: firmware file corrupt", STATUSICON_FAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
// The firmware is not packaged, just upload the text in the description field
|
||||
// if it is there.
|
||||
descriptionArray.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
status("Starting firmware upload", STATUSICON_RUNNING);
|
||||
// We don't know which device was used previously, so we
|
||||
// are cautious and reenter DFU for this deviceID:
|
||||
@ -277,15 +367,27 @@ void deviceWidget::uploadFinished(OP_DFU::Status retstatus)
|
||||
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
||||
return;
|
||||
} else
|
||||
if(!myDevice->description->text().isEmpty()) {
|
||||
if (!descriptionArray.isEmpty()) {
|
||||
// We have a structured array to save
|
||||
status(QString("Updating description"), STATUSICON_RUNNING);
|
||||
repaint(); // Make sure the text above shows right away
|
||||
retstatus = m_dfu->UploadDescription(myDevice->description->text());
|
||||
retstatus = m_dfu->UploadDescription(descriptionArray);
|
||||
if( retstatus != OP_DFU::Last_operation_Success) {
|
||||
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (!myDevice->description->text().isEmpty()) {
|
||||
// Fallback: we save the description field:
|
||||
status(QString("Updating description"), STATUSICON_RUNNING);
|
||||
repaint(); // Make sure the text above shows right away
|
||||
retstatus = m_dfu->UploadDescription(myDevice->description->text());
|
||||
if( retstatus != OP_DFU::Last_operation_Success) {
|
||||
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
status("Upload successful", STATUSICON_OK);
|
||||
|
||||
}
|
||||
|
@ -33,8 +33,11 @@
|
||||
#include "op_dfu.h"
|
||||
#include <QWidget>
|
||||
#include <QFileDialog>
|
||||
#include <QErrorMessage>
|
||||
#include <QByteArray>
|
||||
#include <QtSvg/QGraphicsSvgItem>
|
||||
#include <QtSvg/QSvgRenderer>
|
||||
#include <QCryptographicHash>
|
||||
|
||||
using namespace OP_DFU;
|
||||
|
||||
@ -57,7 +60,9 @@ private:
|
||||
QByteArray downloadedFirmware;
|
||||
QString filename;
|
||||
QGraphicsSvgItem *devicePic;
|
||||
QByteArray descriptionArray;
|
||||
void status(QString str, StatusIcon ic);
|
||||
bool populateStructuredDescription(QByteArray arr);
|
||||
|
||||
|
||||
signals:
|
||||
|
@ -19,28 +19,28 @@
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QLineEdit" name="description"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="deviceID">
|
||||
<property name="text">
|
||||
<string>DeviceID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="deviceACL">
|
||||
<property name="text">
|
||||
<string>ReadWrite</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" rowspan="2">
|
||||
<item row="3" column="2" rowspan="3">
|
||||
<widget class="QGraphicsView" name="devicePicture">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
@ -56,7 +56,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<item row="6" column="2">
|
||||
<widget class="QPushButton" name="verifyButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -66,7 +66,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<item row="7" column="2">
|
||||
<widget class="QPushButton" name="updateButton">
|
||||
<property name="toolTip">
|
||||
<string>Update the firmware on this board.</string>
|
||||
@ -76,7 +76,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<item row="8" column="2">
|
||||
<widget class="QPushButton" name="retrieveButton">
|
||||
<property name="toolTip">
|
||||
<string>Download the current board firmware to your computer</string>
|
||||
@ -86,28 +86,28 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="BLVersion">
|
||||
<property name="text">
|
||||
<string>BootLoaderVersion</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="fwCRC">
|
||||
<property name="text">
|
||||
<string>fwCRC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="maxCodeSize">
|
||||
<property name="text">
|
||||
<string>MaxCodeSize</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="statusIcon">
|
||||
@ -137,6 +137,20 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="buildDate">
|
||||
<property name="text">
|
||||
<string>Build Date</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="commitTag">
|
||||
<property name="text">
|
||||
<string>Commit tag</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -283,22 +283,31 @@ bool DFUObject::UploadData(qint32 const & numberOfBytes, QByteArray & data)
|
||||
/**
|
||||
Sends the firmware description to the device
|
||||
*/
|
||||
OP_DFU::Status DFUObject::UploadDescription(QString description)
|
||||
OP_DFU::Status DFUObject::UploadDescription(QVariant desc)
|
||||
{
|
||||
cout<<"Starting uploading description\n";
|
||||
if(description.length()%4!=0)
|
||||
{
|
||||
int pad=description.length()/4;
|
||||
pad=(pad+1)*4;
|
||||
pad=pad-description.length();
|
||||
QString padding;
|
||||
padding.fill(' ',pad);
|
||||
description.append(padding);
|
||||
QByteArray array;
|
||||
|
||||
if (desc.type() == QMetaType::QString) {
|
||||
QString description = desc.toString();
|
||||
if(description.length()%4!=0)
|
||||
{
|
||||
int pad=description.length()/4;
|
||||
pad=(pad+1)*4;
|
||||
pad=pad-description.length();
|
||||
QString padding;
|
||||
padding.fill(' ',pad);
|
||||
description.append(padding);
|
||||
}
|
||||
array=description.toAscii();
|
||||
|
||||
} else if (desc.type() == QMetaType::QByteArray) {
|
||||
array = desc.toByteArray();
|
||||
}
|
||||
if(!StartUpload(description.length(),OP_DFU::Descript,0))
|
||||
|
||||
if(!StartUpload(array.length(),OP_DFU::Descript,0))
|
||||
return OP_DFU::abort;
|
||||
QByteArray array=description.toAscii();
|
||||
if(!UploadData(description.length(),array))
|
||||
if(!UploadData(array.length(),array))
|
||||
{
|
||||
return OP_DFU::abort;
|
||||
}
|
||||
@ -308,6 +317,7 @@ OP_DFU::Status DFUObject::UploadDescription(QString description)
|
||||
}
|
||||
OP_DFU::Status ret = StatusRequest();
|
||||
|
||||
|
||||
if(debug)
|
||||
qDebug() << "Upload description Status=" << StatusToString(ret);
|
||||
return ret;
|
||||
@ -328,6 +338,15 @@ QString DFUObject::DownloadDescription(int const & numberOfChars)
|
||||
|
||||
}
|
||||
|
||||
QByteArray DFUObject::DownloadDescriptionAsBA(int const & numberOfChars)
|
||||
{
|
||||
|
||||
QByteArray arr;
|
||||
StartDownloadT(&arr, numberOfChars,OP_DFU::Descript);
|
||||
return arr;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Starts a firmware download
|
||||
@param firmwareArray: pointer to the location where we should store the firmware
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <QMetaType>
|
||||
#include <QCryptographicHash>
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
#include <iostream>
|
||||
#include "delay.h"
|
||||
#include <qextserialport/src/qextserialport.h>
|
||||
@ -124,12 +125,13 @@ namespace OP_DFU {
|
||||
bool ready() { return mready; }
|
||||
|
||||
// Upload (send to device) commands
|
||||
OP_DFU::Status UploadDescription(QString description);
|
||||
OP_DFU::Status UploadDescription(QVariant description);
|
||||
bool UploadFirmware(const QString &sfile, const bool &verify,int device);
|
||||
|
||||
// Download (get from device) commands:
|
||||
// DownloadDescription is synchronous
|
||||
QString DownloadDescription(int const & numberOfChars);
|
||||
QByteArray DownloadDescriptionAsBA(int const & numberOfChars);
|
||||
// Asynchronous firmware download: initiates fw download,
|
||||
// and a downloadFinished signal is emitted when download
|
||||
// if finished:
|
||||
|
Loading…
x
Reference in New Issue
Block a user