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:
commit
b56c11d1d9
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user