1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

uavobjgen: Add missing instanceID field in multi-instance structs

This commit is contained in:
Stacey Sheldon 2011-12-10 16:43:31 -05:00
parent 24d6c971e6
commit 15c9b32392

View File

@ -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];