1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Merged in filnet/librepilot (pull request #145)

LP-183 introduce an underscore between property name and element name when concatenating digits if not
This commit is contained in:
Philippe Renon 2016-01-04 21:44:01 +01:00
commit c760276a9c
8 changed files with 63 additions and 61 deletions

View File

@ -170,7 +170,6 @@ static void gcsTelemetryStatsUpdated();
*/
int32_t TelemetryStart(void)
{
#ifdef HAS_RADIO
// Only start the local telemetry tasks if needed
if (localPort()) {
@ -623,7 +622,6 @@ static void telemetryTxTask(void *parameters)
processObjEvent(channel, &ev);
}
#endif /* PIOS_TELEM_PRIORITY_QUEUE */
}
}

View File

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

View File

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

View File

@ -496,12 +496,18 @@ void generateIndexedProperty(Context &ctxt, FieldContext &fieldCtxt)
for (int elementIndex = 0; elementIndex < fieldCtxt.field->numElements; 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;
elementCtxt.field = fieldCtxt.field;
elementCtxt.fieldName = fieldCtxt.fieldName + "_" + elementName;
elementCtxt.fieldType = fieldCtxt.fieldType;
elementCtxt.propName = fieldCtxt.propName + elementName;
elementCtxt.ucPropName = fieldCtxt.ucPropName + elementName;
elementCtxt.propName = fieldCtxt.propName + sep + elementName;
elementCtxt.ucPropName = fieldCtxt.ucPropName + sep + elementName;
elementCtxt.propType = fieldCtxt.propType;
elementCtxt.propRefType = fieldCtxt.propRefType;
// deprecation
@ -632,11 +638,9 @@ bool UAVObjectGeneratorGCS::process_object(ObjectInfo *object)
fieldCtxt.propType = fieldCtxt.fieldType;
if (field->type == FIELDTYPE_INT8) {
fieldCtxt.propType = fieldTypeStrCPP(FIELDTYPE_INT16);
}
else if (field->type == FIELDTYPE_UINT8) {
} else if (field->type == FIELDTYPE_UINT8) {
fieldCtxt.propType = fieldTypeStrCPP(FIELDTYPE_UINT16);
}
else if (field->type == FIELDTYPE_ENUM) {
} else if (field->type == FIELDTYPE_ENUM) {
QString enumClassName = object->name + "_" + fieldCtxt.ucPropName;
fieldCtxt.propType = enumClassName + "::Enum";
}