Commit 9d0b2295 authored by Beat Küng's avatar Beat Küng

GPSProvider: add SIMULATE_RTCM_OUTPUT to enable simulated RTCM output (currently disabled)

parent c29de21a
......@@ -18,9 +18,25 @@
#include "Drivers/src/gps_helper.h"
#include "definitions.h"
//#define SIMULATE_RTCM_OUTPUT //if defined, generate simulated RTCM messages
//additionally make sure to call connectGPS(""), eg. from QGCToolbox.cc
void GPSProvider::run()
{
#ifdef SIMULATE_RTCM_OUTPUT
const int fakeMsgLengths[3] = { 30, 170, 240 };
uint8_t* fakeData = new uint8_t[fakeMsgLengths[2]];
while (!_requestStop) {
for (int i = 0; i < 3; ++i) {
gotRTCMData((uint8_t*) fakeData, fakeMsgLengths[i]);
msleep(4);
}
msleep(100);
}
delete[] fakeData;
#endif /* SIMULATE_RTCM_OUTPUT */
if (_serial) delete _serial;
_serial = new QSerialPort();
......
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