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

Merge remote-tracking branch 'origin/stac/logging_fixes' into next

This commit is contained in:
James Cotton 2011-12-16 13:54:49 -06:00
commit b56c11d1d9
3 changed files with 6 additions and 12 deletions

View File

@ -709,7 +709,7 @@ int ScopeGadgetWidget::csvLoggingInsertData()
}
else
{
ss << QString().sprintf("%3.6g",plotData2->yData->last()/pow(10,plotData2->scalePower));
ss << QString().sprintf("%3.6g",plotData2->yData->last());
m_csvLoggingDataValid=1;
}
}

View File

@ -1,17 +1,8 @@
function [] = OPLogConvert()
function [] = OPLogConvert(logfile)
%% Define indices and arrays of structures to hold data
% THIS FILE IS AUTOMATICALLY GENERATED.
$(ALLOCATIONCODE)
%% Open log file
% [FileName,PathName,FilterIndex] = uigetfile('*.opl');
FileName='OP-2011-10-22_22-27-09.opl';
PathName='/Users/kenz/Movies/brisk_videos/rover_test_1/';
FilterIndex=1;
logfile = fullfile(PathName,FileName);
fid = fopen(logfile);
% Parse log file, entry by entry

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];
@ -139,13 +142,13 @@ bool UAVObjectGeneratorMatlab::process_object(ObjectInfo* info)
//=================================================================//
//Generate function description comment
matlabFunctionsCode.append("function [" + objectName + "] = " + functionCall + "\n");
matlabFunctionsCode.append("\t" + objectName + ".timestamp = timestamp;\n");
matlabFunctionsCode.append("\tif " + isSingleInst + "\n");
matlabFunctionsCode.append("\t\theaderSize = 8;\n");
matlabFunctionsCode.append("\telse\n");
matlabFunctionsCode.append("\t\t" + objectName + ".instanceID = fread(fid, 1, 'uint16');\n");
matlabFunctionsCode.append("\t\theaderSize = 10;\n");
matlabFunctionsCode.append("\tend\n\n");
matlabFunctionsCode.append("\t" + objectName + ".timestamp = timestamp;\n");
// Generate functions code, actual fields of the object
QString funcfields;