1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Small tweak to Kenn's patch to grow array exponentially. This has large gains

for long logs.
This commit is contained in:
James Cotton 2011-12-18 16:27:45 -06:00
parent 6dcf55c41e
commit c996cbf00e

View File

@ -129,7 +129,7 @@ bool UAVObjectGeneratorMatlab::process_object(ObjectInfo* info)
matlabSwitchCode.append("\t\t\t" + objectTableName + "(" + tableIdxName +") = " + functionCall + ";\n");
matlabSwitchCode.append("\t\t\t" + tableIdxName + " = " + tableIdxName +" + 1;\n");
matlabSwitchCode.append("\t\t\tif " + tableIdxName + " > length(" + objectTableName +")\n");
matlabSwitchCode.append("\t\t\t\t" + objectTableName + "(" + tableIdxName + "+100+1) = " + objectTableName +"(end);\n");
matlabSwitchCode.append("\t\t\t\t" + objectTableName + "(" + tableIdxName + "*2+1) = " + objectTableName +"(end);\n");
matlabSwitchCode.append("\t\t\t\t" + objectTableName +"(end)=[];\n");
matlabSwitchCode.append("\t\t\tend\n");