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 ...@@ -8,29 +8,31 @@ class LogCompressor : public QThread
Q_OBJECT Q_OBJECT
public: public:
/** @brief Create the log compressor. It will only get active upon calling startCompression() */ /** @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 */ /** @brief Start the compression of a raw, line-based logfile into a CSV file */
void startCompression(bool holeFilling=false); void startCompression(bool holeFilling=false);
bool isFinished(); bool isFinished();
int getDataLines();
int getCurrentLine(); int getCurrentLine();
protected: protected:
void run(); void run(); ///< This function actually performs the compression. It's an overloaded function from QThread
QString logFileName; QString logFileName; ///< The input file name.
QString outFileName; QString outFileName; ///< The output file name. If blank defaults to logFileName
bool running; bool running; ///< True when the startCompression() function is operating.
int currentDataLine; int currentDataLine; ///< The current line of data that is being processed. Only relevant when running==true
int dataLines; QString delimiter; ///< Delimiter between fields in the output file. Defaults to tab ('\t')
int uasid; bool holeFillingEnabled; ///< Enables the filling of holes in the dataset with the previous value (or NaN if none exists)
bool holeFillingEnabled; ///< Enables the filling of holes in the dataset with the previous value (or NaN if none exists)
signals: 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 /** @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); void finishedFile(QString fileName);
}; };
#endif // LOGCOMPRESSOR_H #endif // LOGCOMPRESSOR_H
\ No newline at end of file
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<string>Display only variable names in curve list</string> <string>Display only variable names in curve list</string>
</property> </property>
<property name="text"> <property name="text">
<string>Short Names</string> <string>Short names</string>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -12,10 +12,10 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol, QObject *parent) : ...@@ -12,10 +12,10 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol, QObject *parent) :
componentID[i] = -1; componentID[i] = -1;
componentMulti[i] = false; componentMulti[i] = false;
onboardTimeOffset[i] = 0; onboardTimeOffset[i] = 0;
onboardToGCSUnixTimeOffsetAndDelay[i] = 0;
firstOnboardTime[i] = 0;
} }
// Fill filter // Fill filter
messageFilter.insert(MAVLINK_MSG_ID_HEARTBEAT, false); messageFilter.insert(MAVLINK_MSG_ID_HEARTBEAT, false);
messageFilter.insert(MAVLINK_MSG_ID_SYS_STATUS, 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