diff --git a/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp b/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp index f1dfa368d..dca762de2 100644 --- a/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp +++ b/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp @@ -103,6 +103,9 @@ bool UAVObjectGeneratorMatlab::process_object(ObjectInfo* info) } else{ matlabAllocationCode.append("\t" + objectTableName + "=struct('timestamp', 0"); + if (!info->isSingleInst) { + allocfields.append(",...\n\t\t 'instanceID', 0"); + } for (int n = 0; n < info->fields.length(); ++n) { // Determine type type = fieldTypeStrMatlab[info->fields[n]->type];