mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-1611 Uncrustify
This commit is contained in:
parent
8a11c588a6
commit
8cf65d5cbe
@ -96,7 +96,7 @@ void PlotData::updatePlotData()
|
||||
void PlotData::clear()
|
||||
{
|
||||
m_meanSum = 0.0f;
|
||||
m_correctionSum = 0.0f;
|
||||
m_correctionSum = 0.0f;
|
||||
m_correctionCount = 0;
|
||||
m_xDataEntries.clear();
|
||||
m_yDataEntries.clear();
|
||||
|
@ -95,7 +95,7 @@ ScopeGadgetWidget::ScopeGadgetWidget(QWidget *parent) : QwtPlot(parent),
|
||||
connect(cm, SIGNAL(deviceConnected(QIODevice *)), this, SLOT(csvLoggingConnect()));
|
||||
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint & )), this, SLOT(popUpMenu(const QPoint &)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(popUpMenu(const QPoint &)));
|
||||
}
|
||||
|
||||
ScopeGadgetWidget::~ScopeGadgetWidget()
|
||||
@ -195,7 +195,7 @@ void ScopeGadgetWidget::showEvent(QShowEvent *e)
|
||||
void ScopeGadgetWidget::startPlotting()
|
||||
{
|
||||
if (replotTimer && !replotTimer->isActive()) {
|
||||
foreach (PlotData *plot, m_curvesData.values()) {
|
||||
foreach(PlotData * plot, m_curvesData.values()) {
|
||||
if (plot->wantsInitialData()) {
|
||||
plot->append(NULL);
|
||||
}
|
||||
@ -639,7 +639,7 @@ void ScopeGadgetWidget::popUpMenu(const QPoint &mousePosition)
|
||||
Q_UNUSED(mousePosition);
|
||||
|
||||
QMenu menu;
|
||||
QAction * action = menu.addAction(tr("Clear"));
|
||||
QAction *action = menu.addAction(tr("Clear"));
|
||||
connect(action, &QAction::triggered, this, &ScopeGadgetWidget::clearPlot);
|
||||
action = menu.addAction(tr("Copy to Clipboard"));
|
||||
connect(action, &QAction::triggered, this, &ScopeGadgetWidget::copyToClipboardAsImage);
|
||||
@ -652,7 +652,7 @@ void ScopeGadgetWidget::popUpMenu(const QPoint &mousePosition)
|
||||
void ScopeGadgetWidget::clearPlot()
|
||||
{
|
||||
m_mutex.lock();
|
||||
foreach (PlotData * plot, m_curvesData.values()) {
|
||||
foreach(PlotData * plot, m_curvesData.values()) {
|
||||
plot->clear();
|
||||
}
|
||||
m_mutex.unlock();
|
||||
@ -661,8 +661,9 @@ void ScopeGadgetWidget::clearPlot()
|
||||
|
||||
void ScopeGadgetWidget::copyToClipboardAsImage()
|
||||
{
|
||||
QPixmap pixmap = QWidget::grab();
|
||||
if(pixmap.isNull()){
|
||||
QPixmap pixmap = QWidget::grab();
|
||||
|
||||
if (pixmap.isNull()) {
|
||||
qDebug("Failed to capture the plot");
|
||||
return;
|
||||
}
|
||||
|
@ -93,7 +93,8 @@ void OutputCalibrationUtil::stopOutputCalibration()
|
||||
}
|
||||
}
|
||||
|
||||
void OutputCalibrationUtil::startChannelOutput(quint16 channel, quint16 safeValue) {
|
||||
void OutputCalibrationUtil::startChannelOutput(quint16 channel, quint16 safeValue)
|
||||
{
|
||||
QList<quint16> channels;
|
||||
channels.append(channel);
|
||||
startChannelOutput(channels, safeValue);
|
||||
@ -125,9 +126,9 @@ void OutputCalibrationUtil::setChannelOutputValue(quint16 value)
|
||||
if (c_prepared) {
|
||||
ActuatorCommand *actuatorCommand = getActuatorCommandObject();
|
||||
ActuatorCommand::DataFields data = actuatorCommand->getData();
|
||||
foreach (quint32 channel, m_outputChannels) {
|
||||
foreach(quint32 channel, m_outputChannels) {
|
||||
// Set output value
|
||||
if (channel <= ActuatorCommand::CHANNEL_NUMELEM){
|
||||
if (channel <= ActuatorCommand::CHANNEL_NUMELEM) {
|
||||
qDebug() << "OutputCalibrationUtil setting output value for channel " << channel << " to " << value << ".";
|
||||
data.Channel[channel] = value;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user