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

Merge remote-tracking branch 'origin/next' into LP-201_Y6_mixer

This commit is contained in:
Laurent Lalanne 2016-01-09 12:48:01 +01:00
commit 93a6b99dab
7 changed files with 36 additions and 34 deletions

View File

@ -99,7 +99,7 @@ static uint8_t isAssistedFlightMode(uint8_t position);
static void applyLPF(float *value, ManualControlSettingsResponseTimeElem channel, ManualControlSettingsResponseTimeData *responseTime, uint8_t deadband, float dT); static void applyLPF(float *value, ManualControlSettingsResponseTimeElem channel, ManualControlSettingsResponseTimeData *responseTime, uint8_t deadband, float dT);
#endif #endif
#define RCVR_ACTIVITY_MONITOR_CHANNELS_PER_GROUP 18 // Sbus max channel #define RCVR_ACTIVITY_MONITOR_CHANNELS_PER_GROUP 18 // Sbus max channel
#define RCVR_ACTIVITY_MONITOR_MIN_RANGE 15 #define RCVR_ACTIVITY_MONITOR_MIN_RANGE 15
struct rcvr_activity_fsm { struct rcvr_activity_fsm {
ManualControlSettingsChannelGroupsOptions group; ManualControlSettingsChannelGroupsOptions group;

View File

@ -114,8 +114,8 @@ typedef struct {
#endif /* PIOS_TELEM_PRIORITY_QUEUE */ #endif /* PIOS_TELEM_PRIORITY_QUEUE */
// Transmit/receive task handles // Transmit/receive task handles
xTaskHandle txTaskHandle; xTaskHandle txTaskHandle;
xTaskHandle rxTaskHandle; xTaskHandle rxTaskHandle;
// Telemetry stream // Telemetry stream
UAVTalkConnection uavTalkCon; UAVTalkConnection uavTalkCon;
} channelContext; } channelContext;
@ -170,7 +170,6 @@ static void gcsTelemetryStatsUpdated();
*/ */
int32_t TelemetryStart(void) int32_t TelemetryStart(void)
{ {
#ifdef HAS_RADIO #ifdef HAS_RADIO
// Only start the local telemetry tasks if needed // Only start the local telemetry tasks if needed
if (localPort()) { if (localPort()) {
@ -623,7 +622,6 @@ static void telemetryTxTask(void *parameters)
processObjEvent(channel, &ev); processObjEvent(channel, &ev);
} }
#endif /* PIOS_TELEM_PRIORITY_QUEUE */ #endif /* PIOS_TELEM_PRIORITY_QUEUE */
} }
} }

View File

@ -238,13 +238,13 @@ static bool erase_flash(uint32_t startAddress, uint32_t endAddress)
PIOS_Assert(0); PIOS_Assert(0);
} }
for (int retry = 0; retry < MAX_DEL_RETRYS; ++retry) { for (int retry = 0; retry < MAX_DEL_RETRYS; ++retry) {
//if erasing area contain whole bank2 area, using bank erase // if erasing area contain whole bank2 area, using bank erase
//bank2: sector 12 to sector 23 // bank2: sector 12 to sector 23
if (sector_start == flash_sectors[12].start && if (sector_start == flash_sectors[12].start &&
endAddress >= (flash_sectors[23].start + flash_sectors[23].size)){ endAddress >= (flash_sectors[23].start + flash_sectors[23].size)) {
if (FLASH_EraseAllBank2Sectors(VoltageRange_3) == FLASH_COMPLETE) { if (FLASH_EraseAllBank2Sectors(VoltageRange_3) == FLASH_COMPLETE) {
fail = false; fail = false;
//using bank2 total size substitute sector_size // using bank2 total size substitute sector_size
sector_size = flash_sectors[23].start - flash_sectors[12].start + flash_sectors[23].size; sector_size = flash_sectors[23].start - flash_sectors[12].start + flash_sectors[23].size;
break; break;
} else { } else {

View File

@ -74,7 +74,7 @@ void PIOS_SYS_Init(void)
RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOC |
RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOD |
RCC_AHB1Periph_GPIOE | RCC_AHB1Periph_GPIOE |
#if defined (STM32F40_41xxx) || defined (STM32F427_437xx) || defined (STM32F429_439xx) #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx)
RCC_AHB1Periph_GPIOF | RCC_AHB1Periph_GPIOF |
RCC_AHB1Periph_GPIOG | RCC_AHB1Periph_GPIOG |
RCC_AHB1Periph_GPIOH | RCC_AHB1Periph_GPIOH |
@ -85,7 +85,7 @@ void PIOS_SYS_Init(void)
RCC_AHB1Periph_SRAM1 | RCC_AHB1Periph_SRAM1 |
RCC_AHB1Periph_SRAM2 | RCC_AHB1Periph_SRAM2 |
RCC_AHB1Periph_BKPSRAM | RCC_AHB1Periph_BKPSRAM |
#if defined (STM32F427_437xx) || defined (STM32F429_439xx) #if defined(STM32F427_437xx) || defined(STM32F429_439xx)
RCC_AHB1Periph_SRAM3 | RCC_AHB1Periph_SRAM3 |
#endif #endif
RCC_AHB1Periph_DMA1 | RCC_AHB1Periph_DMA1 |
@ -174,7 +174,7 @@ void PIOS_SYS_Init(void)
GPIO_Init(GPIOD, &GPIO_InitStructure); GPIO_Init(GPIOD, &GPIO_InitStructure);
GPIO_Init(GPIOE, &GPIO_InitStructure); GPIO_Init(GPIOE, &GPIO_InitStructure);
#if defined (STM32F40_41xxx) || defined (STM32F427_437xx) || defined (STM32F429_439xx) #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx)
GPIO_Init(GPIOF, &GPIO_InitStructure); GPIO_Init(GPIOF, &GPIO_InitStructure);
GPIO_Init(GPIOG, &GPIO_InitStructure); GPIO_Init(GPIOG, &GPIO_InitStructure);
GPIO_Init(GPIOH, &GPIO_InitStructure); GPIO_Init(GPIOH, &GPIO_InitStructure);

View File

@ -36,7 +36,7 @@ equals(copyosg, 1) {
win32 { win32 {
# set debug suffix if needed # set debug suffix if needed
CONFIG(debug, debug|release):DS = "d" #CONFIG(debug, debug|release):DS = "d"
# copy osg libraries # copy osg libraries
OSG_LIBS = \ OSG_LIBS = \

View File

@ -91,18 +91,18 @@ macx {
win32 { win32 {
LIBS += -L$$OSG_SDK_DIR/lib LIBS += -L$$OSG_SDK_DIR/lib
CONFIG(release, debug|release) { #CONFIG(release, debug|release) {
LIBS += -lOpenThreads LIBS += -lOpenThreads
LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText
LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation
LIBS += -losgQt -losgEarthQt LIBS += -losgQt -losgEarthQt
} #}
CONFIG(debug, debug|release) { #CONFIG(debug, debug|release) {
LIBS += -lOpenThreadsd # LIBS += -lOpenThreadsd
LIBS += -losgd -losgUtild -losgDBd -losgGAd -losgViewerd -losgTextd # LIBS += -losgd -losgUtild -losgDBd -losgGAd -losgViewerd -losgTextd
LIBS += -losgEarthd -losgEarthUtild -losgEarthFeaturesd -losgEarthSymbologyd -losgEarthAnnotationd # LIBS += -losgEarthd -losgEarthUtild -losgEarthFeaturesd -losgEarthSymbologyd -losgEarthAnnotationd
LIBS += -losgQtd -losgEarthQtd # LIBS += -losgQtd -losgEarthQtd
} #}
} }
include(copydata.pro) include(copydata.pro)

View File

@ -496,12 +496,18 @@ void generateIndexedProperty(Context &ctxt, FieldContext &fieldCtxt)
for (int elementIndex = 0; elementIndex < fieldCtxt.field->numElements; elementIndex++) { for (int elementIndex = 0; elementIndex < fieldCtxt.field->numElements; elementIndex++) {
QString elementName = fieldCtxt.field->elementNames[elementIndex]; QString elementName = fieldCtxt.field->elementNames[elementIndex];
QString sep;
if (fieldCtxt.propName.right(1)[0].isDigit() && elementName[0].isDigit()) {
info(ctxt.object, "Property \"" + fieldCtxt.propName + "\" and element \"" + elementName + "\" have digit conflict, consider fixing it.");
sep = "_";
}
FieldContext elementCtxt; FieldContext elementCtxt;
elementCtxt.field = fieldCtxt.field; elementCtxt.field = fieldCtxt.field;
elementCtxt.fieldName = fieldCtxt.fieldName + "_" + elementName; elementCtxt.fieldName = fieldCtxt.fieldName + "_" + elementName;
elementCtxt.fieldType = fieldCtxt.fieldType; elementCtxt.fieldType = fieldCtxt.fieldType;
elementCtxt.propName = fieldCtxt.propName + elementName; elementCtxt.propName = fieldCtxt.propName + sep + elementName;
elementCtxt.ucPropName = fieldCtxt.ucPropName + elementName; elementCtxt.ucPropName = fieldCtxt.ucPropName + sep + elementName;
elementCtxt.propType = fieldCtxt.propType; elementCtxt.propType = fieldCtxt.propType;
elementCtxt.propRefType = fieldCtxt.propRefType; elementCtxt.propRefType = fieldCtxt.propRefType;
// deprecation // deprecation
@ -621,24 +627,22 @@ bool UAVObjectGeneratorGCS::process_object(ObjectInfo *object)
// field context // field context
FieldContext fieldCtxt; FieldContext fieldCtxt;
fieldCtxt.field = field; fieldCtxt.field = field;
// field properties // field properties
fieldCtxt.fieldName = field->name; fieldCtxt.fieldName = field->name;
fieldCtxt.fieldType = fieldTypeStrCPP(field->type); fieldCtxt.fieldType = fieldTypeStrCPP(field->type);
fieldCtxt.ucPropName = toPropertyName(field->name); fieldCtxt.ucPropName = toPropertyName(field->name);
fieldCtxt.propName = toLowerCamelCase(fieldCtxt.ucPropName); fieldCtxt.propName = toLowerCamelCase(fieldCtxt.ucPropName);
fieldCtxt.propType = fieldCtxt.fieldType; fieldCtxt.propType = fieldCtxt.fieldType;
if (field->type == FIELDTYPE_INT8) { if (field->type == FIELDTYPE_INT8) {
fieldCtxt.propType = fieldTypeStrCPP(FIELDTYPE_INT16); fieldCtxt.propType = fieldTypeStrCPP(FIELDTYPE_INT16);
} } else if (field->type == FIELDTYPE_UINT8) {
else if (field->type == FIELDTYPE_UINT8) {
fieldCtxt.propType = fieldTypeStrCPP(FIELDTYPE_UINT16); fieldCtxt.propType = fieldTypeStrCPP(FIELDTYPE_UINT16);
} } else if (field->type == FIELDTYPE_ENUM) {
else if (field->type == FIELDTYPE_ENUM) {
QString enumClassName = object->name + "_" + fieldCtxt.ucPropName; QString enumClassName = object->name + "_" + fieldCtxt.ucPropName;
fieldCtxt.propType = enumClassName + "::Enum"; fieldCtxt.propType = enumClassName + "::Enum";
} }
// reference type // reference type
fieldCtxt.propRefType = fieldCtxt.propType; fieldCtxt.propRefType = fieldCtxt.propType;