Commit 27f2a93b authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #84 from Susurrus/datalogger_refactoring

Datalogger refactoring
parents 33b2346e 6ba5787c
This diff is collapsed.
......@@ -8,29 +8,31 @@ class LogCompressor : public QThread
Q_OBJECT
public:
/** @brief Create the log compressor. It will only get active upon calling startCompression() */
LogCompressor(QString logFileName, QString outFileName="", int uasid = 0);
LogCompressor(QString logFileName, QString outFileName="", QString delimiter="\t");
/** @brief Start the compression of a raw, line-based logfile into a CSV file */
void startCompression(bool holeFilling=false);
bool isFinished();
int getDataLines();
int getCurrentLine();
protected:
void run();
QString logFileName;
QString outFileName;
bool running;
int currentDataLine;
int dataLines;
int uasid;
bool holeFillingEnabled; ///< Enables the filling of holes in the dataset with the previous value (or NaN if none exists)
void run(); ///< This function actually performs the compression. It's an overloaded function from QThread
QString logFileName; ///< The input file name.
QString outFileName; ///< The output file name. If blank defaults to logFileName
bool running; ///< True when the startCompression() function is operating.
int currentDataLine; ///< The current line of data that is being processed. Only relevant when running==true
QString delimiter; ///< Delimiter between fields in the output file. Defaults to tab ('\t')
bool holeFillingEnabled; ///< Enables the filling of holes in the dataset with the previous value (or NaN if none exists)
signals:
/** @brief This signal is emitted when there is a change in the status of the parsing algorithm. For instance if an error is encountered.
* @param status A status message
*/
void logProcessingStatusChanged(QString status);
/** @brief This signal is emitted once a logfile has been finished writing
* @param fileName The name out the output (CSV) file
* @param fileName The name of the output (CSV) file
*/
void logProcessingStatusChanged(QString);
void finishedFile(QString fileName);
};
#endif // LOGCOMPRESSOR_H
#endif // LOGCOMPRESSOR_H
\ No newline at end of file
......@@ -145,7 +145,7 @@
<string>Display only variable names in curve list</string>
</property>
<property name="text">
<string>Short Names</string>
<string>Short names</string>
</property>
</widget>
</item>
......
......@@ -12,10 +12,10 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol, QObject *parent) :
componentID[i] = -1;
componentMulti[i] = false;
onboardTimeOffset[i] = 0;
onboardToGCSUnixTimeOffsetAndDelay[i] = 0;
firstOnboardTime[i] = 0;
}
// Fill filter
messageFilter.insert(MAVLINK_MSG_ID_HEARTBEAT, false);
messageFilter.insert(MAVLINK_MSG_ID_SYS_STATUS, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment