Merge pull request #6020 from opentx/mpaperno/sim_telemsim_pause_options
Add start/pause/RSSI-disable options to Telemetry Simulator
This commit is contained in:
@@ -32,8 +32,8 @@ TelemetrySimulator::TelemetrySimulator(QWidget * parent, SimulatorInterface * si
|
|||||||
ui(new Ui::TelemetrySimulator),
|
ui(new Ui::TelemetrySimulator),
|
||||||
simulator(simulator),
|
simulator(simulator),
|
||||||
m_simuStarted(false),
|
m_simuStarted(false),
|
||||||
m_telemEnable(false),
|
m_logReplayEnable(false),
|
||||||
m_logReplayEnable(false)
|
logPlayback(new LogPlaybackController(ui))
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
@@ -48,56 +48,102 @@ TelemetrySimulator::TelemetrySimulator(QWidget * parent, SimulatorInterface * si
|
|||||||
ui->A1_ratio->setEnabled(false);
|
ui->A1_ratio->setEnabled(false);
|
||||||
ui->A2_ratio->setEnabled(false);
|
ui->A2_ratio->setEnabled(false);
|
||||||
|
|
||||||
|
ui->Simulate->setChecked(g.currentProfile().telemSimEnabled());
|
||||||
|
ui->cbPauseOnHide->setChecked(g.currentProfile().telemSimPauseOnHide());
|
||||||
|
ui->cbResetRssiOnStop->setChecked(g.currentProfile().telemSimResetRssiOnStop());
|
||||||
|
|
||||||
timer.setInterval(10);
|
timer.setInterval(10);
|
||||||
connect(&timer, &QTimer::timeout, this, &TelemetrySimulator::generateTelemetryFrame);
|
connect(&timer, &QTimer::timeout, this, &TelemetrySimulator::generateTelemetryFrame);
|
||||||
|
|
||||||
connect(&logTimer, &QTimer::timeout, this, &TelemetrySimulator::onLogTimerEvent);
|
connect(&logTimer, &QTimer::timeout, this, &TelemetrySimulator::onLogTimerEvent);
|
||||||
|
|
||||||
logPlayback = new LogPlaybackController(ui);
|
connect(ui->Simulate, &QCheckBox::toggled, [&](bool on) { g.currentProfile().telemSimEnabled(on); });
|
||||||
|
connect(ui->cbPauseOnHide, &QCheckBox::toggled, [&](bool on) { g.currentProfile().telemSimPauseOnHide(on); });
|
||||||
|
connect(ui->cbResetRssiOnStop, &QCheckBox::toggled, [&](bool on) { g.currentProfile().telemSimResetRssiOnStop(on); });
|
||||||
|
|
||||||
connect(ui->Simulate, SIGNAL(toggled(bool)), this, SLOT(onSimulateToggled(bool)));
|
connect(ui->loadLogFile, &QPushButton::released, this, &TelemetrySimulator::onLoadLogFile);
|
||||||
connect(ui->loadLogFile, SIGNAL(released()), this, SLOT(onLoadLogFile()));
|
connect(ui->play, &QPushButton::released, this, &TelemetrySimulator::onPlay);
|
||||||
connect(ui->play, SIGNAL(released()), this, SLOT(onPlay()));
|
connect(ui->rewind, &QPushButton::clicked, this, &TelemetrySimulator::onRewind);
|
||||||
connect(ui->rewind, SIGNAL(clicked()), this, SLOT(onRewind()));
|
connect(ui->stepForward, &QPushButton::clicked, this, &TelemetrySimulator::onStepForward);
|
||||||
connect(ui->stepForward, SIGNAL(clicked()), this, SLOT(onStepForward()));
|
connect(ui->stepBack, &QPushButton::clicked, this, &TelemetrySimulator::onStepBack);
|
||||||
connect(ui->stepBack, SIGNAL(clicked()), this, SLOT(onStepBack()));
|
connect(ui->stop, &QPushButton::clicked, this, &TelemetrySimulator::onStop);
|
||||||
connect(ui->stop, SIGNAL(clicked()), this, SLOT(onStop()));
|
connect(ui->positionIndicator, &QScrollBar::valueChanged, this, &TelemetrySimulator::onPositionIndicatorChanged);
|
||||||
connect(ui->positionIndicator, SIGNAL(valueChanged(int)), this, SLOT(onPositionIndicatorChanged(int)));
|
connect(ui->replayRate, &QSlider::valueChanged, this, &TelemetrySimulator::onReplayRateChanged);
|
||||||
connect(ui->replayRate, SIGNAL(valueChanged(int)), this, SLOT(onReplayRateChanged(int)));
|
|
||||||
|
|
||||||
connect(this, &TelemetrySimulator::telemetryDataChanged, simulator, &SimulatorInterface::sendTelemetry);
|
connect(this, &TelemetrySimulator::telemetryDataChanged, simulator, &SimulatorInterface::sendTelemetry);
|
||||||
connect(simulator, &SimulatorInterface::started, this, &TelemetrySimulator::onSimulatorStarted);
|
connect(simulator, &SimulatorInterface::started, this, &TelemetrySimulator::onSimulatorStarted);
|
||||||
connect(simulator, &SimulatorInterface::stopped, this, &TelemetrySimulator::onSimulatorStopped);
|
connect(simulator, &SimulatorInterface::stopped, this, &TelemetrySimulator::onSimulatorStopped);
|
||||||
|
connect(&g.currentProfile(), &Profile::telemSimEnabledChanged, this, &TelemetrySimulator::onSimulateToggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetrySimulator::~TelemetrySimulator()
|
TelemetrySimulator::~TelemetrySimulator()
|
||||||
{
|
{
|
||||||
timer.stop();
|
stopTelemetry();
|
||||||
logTimer.stop();
|
|
||||||
delete logPlayback;
|
delete logPlayback;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TelemetrySimulator::hideEvent(QHideEvent *event)
|
||||||
|
{
|
||||||
|
if (g.currentProfile().telemSimPauseOnHide())
|
||||||
|
stopTelemetry();
|
||||||
|
event->accept();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TelemetrySimulator::showEvent(QShowEvent * event)
|
||||||
|
{
|
||||||
|
if (g.currentProfile().telemSimEnabled())
|
||||||
|
startTelemetry();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TelemetrySimulator::startTelemetry()
|
||||||
|
{
|
||||||
|
if (!m_simuStarted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
timer.start();
|
||||||
|
if (m_logReplayEnable)
|
||||||
|
onPlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TelemetrySimulator::stopTelemetry()
|
||||||
|
{
|
||||||
|
timer.stop();
|
||||||
|
m_logReplayEnable = logTimer.isActive();
|
||||||
|
onStop();
|
||||||
|
|
||||||
|
if (!(g.currentProfile().telemSimResetRssiOnStop() && ui && ui->rssi_inst))
|
||||||
|
return;
|
||||||
|
|
||||||
|
bool ok = false;
|
||||||
|
const int id = ui->rssi_inst->text().toInt(&ok, 0);
|
||||||
|
if (!ok)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint8_t buffer[FRSKY_SPORT_PACKET_SIZE] = {0};
|
||||||
|
generateSportPacket(buffer, id - 1, DATA_FRAME, RSSI_ID, 0);
|
||||||
|
emit telemetryDataChanged(QByteArray((char *)buffer, FRSKY_SPORT_PACKET_SIZE));
|
||||||
|
}
|
||||||
|
|
||||||
void TelemetrySimulator::onSimulatorStarted()
|
void TelemetrySimulator::onSimulatorStarted()
|
||||||
{
|
{
|
||||||
m_simuStarted = true;
|
m_simuStarted = true;
|
||||||
setupDataFields();
|
setupDataFields();
|
||||||
|
if (isVisible() && g.currentProfile().telemSimEnabled())
|
||||||
|
startTelemetry();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TelemetrySimulator::onSimulatorStopped()
|
void TelemetrySimulator::onSimulatorStopped()
|
||||||
{
|
{
|
||||||
m_simuStarted = false;
|
m_simuStarted = false;
|
||||||
|
stopTelemetry();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TelemetrySimulator::onSimulateToggled(bool isChecked)
|
void TelemetrySimulator::onSimulateToggled(bool isChecked)
|
||||||
{
|
{
|
||||||
if (isChecked) {
|
if (isChecked)
|
||||||
timer.start();
|
startTelemetry();
|
||||||
}
|
else
|
||||||
else {
|
stopTelemetry();
|
||||||
timer.stop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TelemetrySimulator::onLogTimerEvent()
|
void TelemetrySimulator::onLogTimerEvent()
|
||||||
@@ -113,6 +159,7 @@ void TelemetrySimulator::onLoadLogFile()
|
|||||||
|
|
||||||
void TelemetrySimulator::onPlay()
|
void TelemetrySimulator::onPlay()
|
||||||
{
|
{
|
||||||
|
ui->Simulate->setChecked(true);
|
||||||
if (logPlayback->isReady()) {
|
if (logPlayback->isReady()) {
|
||||||
logTimer.start(logPlayback->logFrequency * 1000 / SPEEDS[ui->replayRate->value()]);
|
logTimer.start(logPlayback->logFrequency * 1000 / SPEEDS[ui->replayRate->value()]);
|
||||||
logPlayback->play();
|
logPlayback->play();
|
||||||
@@ -166,23 +213,6 @@ void TelemetrySimulator::onReplayRateChanged(int value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TelemetrySimulator::hideEvent(QHideEvent *event)
|
|
||||||
{
|
|
||||||
m_telemEnable = ui->Simulate->isChecked();
|
|
||||||
m_logReplayEnable = logTimer.isActive();
|
|
||||||
|
|
||||||
ui->Simulate->setChecked(false);
|
|
||||||
ui->stop->click();
|
|
||||||
event->accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TelemetrySimulator::showEvent(QShowEvent * event)
|
|
||||||
{
|
|
||||||
ui->Simulate->setChecked(m_telemEnable);
|
|
||||||
if (m_logReplayEnable)
|
|
||||||
ui->play->click();
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SET_INSTANCE(control, id, def) ui->control->setText(QString::number(simulator->getSensorInstance(id, ((def) & 0x1F) + 1)))
|
#define SET_INSTANCE(control, id, def) ui->control->setText(QString::number(simulator->getSensorInstance(id, ((def) & 0x1F) + 1)))
|
||||||
|
|
||||||
void TelemetrySimulator::setupDataFields()
|
void TelemetrySimulator::setupDataFields()
|
||||||
@@ -235,7 +265,7 @@ uint8_t getBit(uint8_t position, uint8_t value)
|
|||||||
return (value & (uint8_t)(1 << position)) ? 1 : 0;
|
return (value & (uint8_t)(1 << position)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool generateSportPacket(uint8_t * packet, uint8_t dataId, uint8_t prim, uint16_t appId, uint32_t data)
|
bool TelemetrySimulator::generateSportPacket(uint8_t * packet, uint8_t dataId, uint8_t prim, uint16_t appId, uint32_t data)
|
||||||
{
|
{
|
||||||
if (dataId > 0x1B ) return false;
|
if (dataId > 0x1B ) return false;
|
||||||
|
|
||||||
|
|||||||
@@ -46,14 +46,18 @@ class TelemetrySimulator : public QWidget
|
|||||||
explicit TelemetrySimulator(QWidget * parent, SimulatorInterface * simulator);
|
explicit TelemetrySimulator(QWidget * parent, SimulatorInterface * simulator);
|
||||||
virtual ~TelemetrySimulator();
|
virtual ~TelemetrySimulator();
|
||||||
|
|
||||||
signals:
|
public slots:
|
||||||
|
bool generateSportPacket(uint8_t * packet, uint8_t dataId, uint8_t prim, uint16_t appId, uint32_t data);
|
||||||
|
|
||||||
|
signals:
|
||||||
void telemetryDataChanged(const QByteArray data);
|
void telemetryDataChanged(const QByteArray data);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
||||||
virtual void hideEvent(QHideEvent *event);
|
void hideEvent(QHideEvent *event) override;
|
||||||
virtual void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event) override;
|
||||||
|
void startTelemetry();
|
||||||
|
void stopTelemetry();
|
||||||
void onSimulatorStarted();
|
void onSimulatorStarted();
|
||||||
void onSimulatorStopped();
|
void onSimulatorStopped();
|
||||||
void setupDataFields();
|
void setupDataFields();
|
||||||
@@ -77,7 +81,6 @@ class TelemetrySimulator : public QWidget
|
|||||||
QTimer logTimer;
|
QTimer logTimer;
|
||||||
SimulatorInterface *simulator;
|
SimulatorInterface *simulator;
|
||||||
bool m_simuStarted;
|
bool m_simuStarted;
|
||||||
bool m_telemEnable;
|
|
||||||
bool m_logReplayEnable;
|
bool m_logReplayEnable;
|
||||||
|
|
||||||
// protected classes follow
|
// protected classes follow
|
||||||
@@ -204,7 +207,6 @@ class TelemetrySimulator : public QWidget
|
|||||||
uint32_t encodeLatLon(double latLon, bool isLat);
|
uint32_t encodeLatLon(double latLon, bool isLat);
|
||||||
uint32_t encodeDateTime(uint8_t yearOrHour, uint8_t monthOrMinute, uint8_t dayOrSecond, bool isDate);
|
uint32_t encodeDateTime(uint8_t yearOrHour, uint8_t monthOrMinute, uint8_t dayOrSecond, bool isDate);
|
||||||
}; // GPSEmulator
|
}; // GPSEmulator
|
||||||
|
|
||||||
}; // TelemetrySimulator
|
}; // TelemetrySimulator
|
||||||
|
|
||||||
#endif // _TELEMETRYSIMU_H_
|
#endif // _TELEMETRYSIMU_H_
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Telemetry Simulator</string>
|
<string>Telemetry Simulator</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QGridLayout" name="gridLayout_6" rowstretch="0,0,0,1" columnstretch="0,1">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>7</number>
|
<number>7</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>7</number>
|
<number>7</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" alignment="Qt::AlignTop">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="Simulate">
|
<widget class="QCheckBox" name="Simulate">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
@@ -58,334 +58,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="3" column="0" colspan="2">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Replay SD Log File</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_30">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Replay rate</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QPushButton" name="loadLogFile">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Load</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" colspan="2">
|
|
||||||
<widget class="QSlider" name="replayRate">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="pageStep">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="5" rowspan="2">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetMinimumSize</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QPushButton" name="stepForward">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::StrongFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>|></string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QPushButton" name="stepBack">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::StrongFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><|</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QPushButton" name="play">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::StrongFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>></string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QPushButton" name="rewind">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::StrongFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><-</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="default">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QPushButton" name="stop">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::StrongFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>X</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoDefault">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollBar" name="positionIndicator">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="positionLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="layoutDirection">
|
|
||||||
<enum>Qt::LeftToRight</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Row #
|
|
||||||
Timestamp</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="label_26">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>1/5x</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
|
||||||
<widget class="QLabel" name="label_27">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>5x</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="4">
|
|
||||||
<widget class="QLabel" name="logFileLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>8</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>No Log File Currently Loaded</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
@@ -434,8 +107,8 @@ Timestamp</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>346</width>
|
<width>329</width>
|
||||||
<height>370</height>
|
<height>412</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -1729,8 +1402,8 @@ Timestamp</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>339</width>
|
<width>330</width>
|
||||||
<height>370</height>
|
<height>384</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -2954,6 +2627,365 @@ hh:mm:ss</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1" rowspan="3">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Replay SD Log File</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_30">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Replay rate</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QPushButton" name="loadLogFile">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Load</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" colspan="2">
|
||||||
|
<widget class="QSlider" name="replayRate">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="pageStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="5" rowspan="2">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetMinimumSize</enum>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QPushButton" name="stepForward">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>|></string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QPushButton" name="stepBack">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><|</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="play">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>></string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QPushButton" name="rewind">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><-</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="default">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QPushButton" name="stop">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>X</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollBar" name="positionIndicator">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="positionLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Row #
|
||||||
|
Timestamp</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="label_26">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>1/5x</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QLabel" name="label_27">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>5x</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="4">
|
||||||
|
<widget class="QLabel" name="logFileLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>No Log File Currently Loaded</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="cbResetRssiOnStop">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Setting RSSI to zero simulates telemetry and radio link loss.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Set RSSI to zero when paused.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="cbPauseOnHide">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Stop sending telemetry data when the Telemetry Simulator window is hidden.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Pause simulation when hidden.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
|||||||
@@ -383,6 +383,9 @@ class Profile: public CompStoreObj
|
|||||||
|
|
||||||
// Simulator variables
|
// Simulator variables
|
||||||
PROPERTY(SimulatorOptions, simulatorOptions, SimulatorOptions())
|
PROPERTY(SimulatorOptions, simulatorOptions, SimulatorOptions())
|
||||||
|
PROPERTY(bool, telemSimEnabled, false)
|
||||||
|
PROPERTY(bool, telemSimPauseOnHide, true)
|
||||||
|
PROPERTY(bool, telemSimResetRssiOnStop, false)
|
||||||
|
|
||||||
// Firmware Variables
|
// Firmware Variables
|
||||||
PROPERTYSTR2(beeper, "Beeper")
|
PROPERTYSTR2(beeper, "Beeper")
|
||||||
|
|||||||
Reference in New Issue
Block a user