Cosmetics.
This commit is contained in:
@@ -32,7 +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_logReplayEnable(false)
|
m_logReplayEnable(false),
|
||||||
|
logPlayback(new LogPlaybackController(ui))
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
@@ -52,30 +53,26 @@ TelemetrySimulator::TelemetrySimulator(QWidget * parent, SimulatorInterface * si
|
|||||||
ui->cbResetRssiOnStop->setChecked(g.currentProfile().telemSimResetRssiOnStop());
|
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, &QCheckBox::toggled, &g.currentProfile(), [=](bool on) { g.currentProfile().telemSimEnabled(on); });
|
connect(ui->loadLogFile, &QPushButton::released, this, &TelemetrySimulator::onLoadLogFile);
|
||||||
connect(ui->cbPauseOnHide, &QCheckBox::toggled, &g.currentProfile(), [=](bool on) { g.currentProfile().telemSimPauseOnHide(on); });
|
connect(ui->play, &QPushButton::released, this, &TelemetrySimulator::onPlay);
|
||||||
connect(ui->cbResetRssiOnStop, &QCheckBox::toggled, &g.currentProfile(), [=](bool on) { g.currentProfile().telemSimResetRssiOnStop(on); });
|
connect(ui->rewind, &QPushButton::clicked, this, &TelemetrySimulator::onRewind);
|
||||||
|
connect(ui->stepForward, &QPushButton::clicked, this, &TelemetrySimulator::onStepForward);
|
||||||
|
connect(ui->stepBack, &QPushButton::clicked, this, &TelemetrySimulator::onStepBack);
|
||||||
|
connect(ui->stop, &QPushButton::clicked, this, &TelemetrySimulator::onStop);
|
||||||
|
connect(ui->positionIndicator, &QScrollBar::valueChanged, this, &TelemetrySimulator::onPositionIndicatorChanged);
|
||||||
|
connect(ui->replayRate, &QSlider::valueChanged, this, &TelemetrySimulator::onReplayRateChanged);
|
||||||
|
|
||||||
connect(&g.currentProfile(), &Profile::telemSimEnabledChanged, this, &TelemetrySimulator::onSimulateToggled);
|
connect(this, &TelemetrySimulator::telemetryDataChanged, simulator, &SimulatorInterface::sendTelemetry);
|
||||||
|
connect(simulator, &SimulatorInterface::started, this, &TelemetrySimulator::onSimulatorStarted);
|
||||||
connect(ui->loadLogFile, SIGNAL(released()), this, SLOT(onLoadLogFile()));
|
connect(simulator, &SimulatorInterface::stopped, this, &TelemetrySimulator::onSimulatorStopped);
|
||||||
connect(ui->play, SIGNAL(released()), this, SLOT(onPlay()));
|
connect(&g.currentProfile(), &Profile::telemSimEnabledChanged, this, &TelemetrySimulator::onSimulateToggled);
|
||||||
connect(ui->rewind, SIGNAL(clicked()), this, SLOT(onRewind()));
|
|
||||||
connect(ui->stepForward, SIGNAL(clicked()), this, SLOT(onStepForward()));
|
|
||||||
connect(ui->stepBack, SIGNAL(clicked()), this, SLOT(onStepBack()));
|
|
||||||
connect(ui->stop, SIGNAL(clicked()), this, SLOT(onStop()));
|
|
||||||
connect(ui->positionIndicator, SIGNAL(valueChanged(int)), this, SLOT(onPositionIndicatorChanged(int)));
|
|
||||||
connect(ui->replayRate, SIGNAL(valueChanged(int)), this, SLOT(onReplayRateChanged(int)));
|
|
||||||
|
|
||||||
connect(this, &TelemetrySimulator::telemetryDataChanged, simulator, &SimulatorInterface::sendTelemetry);
|
|
||||||
connect(simulator, &SimulatorInterface::started, this, &TelemetrySimulator::onSimulatorStarted);
|
|
||||||
connect(simulator, &SimulatorInterface::stopped, this, &TelemetrySimulator::onSimulatorStopped);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetrySimulator::~TelemetrySimulator()
|
TelemetrySimulator::~TelemetrySimulator()
|
||||||
|
|||||||
@@ -383,8 +383,8 @@ class Profile: public CompStoreObj
|
|||||||
|
|
||||||
// Simulator variables
|
// Simulator variables
|
||||||
PROPERTY(SimulatorOptions, simulatorOptions, SimulatorOptions())
|
PROPERTY(SimulatorOptions, simulatorOptions, SimulatorOptions())
|
||||||
PROPERTY(bool, telemSimEnabled, false)
|
PROPERTY(bool, telemSimEnabled, false)
|
||||||
PROPERTY(bool, telemSimPauseOnHide, true)
|
PROPERTY(bool, telemSimPauseOnHide, true)
|
||||||
PROPERTY(bool, telemSimResetRssiOnStop, false)
|
PROPERTY(bool, telemSimResetRssiOnStop, false)
|
||||||
|
|
||||||
// Firmware Variables
|
// Firmware Variables
|
||||||
|
|||||||
Reference in New Issue
Block a user