From 2d181994f00df50ed4051f0a8d16e83cf021bb91 Mon Sep 17 00:00:00 2001 From: Jan NIJS Date: Fri, 23 Jun 2017 16:05:59 +0200 Subject: [PATCH] LP-536 use the correct spelling for SATELLITES --- .../plugins/gpsdisplay/gpsconstellationwidget.cpp | 4 ++-- .../plugins/gpsdisplay/gpsconstellationwidget.h | 8 ++++---- ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.cpp | 14 +++++++------- ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.h | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.cpp b/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.cpp index 9c8f5ac16..67cd31687 100644 --- a/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.cpp +++ b/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.cpp @@ -65,7 +65,7 @@ GpsConstellationWidget::GpsConstellationWidget(QWidget *parent) : QGraphicsView( QFontDatabase::addApplicationFont(":/gpsgadget/font/digital-7.ttf"); // Now create 'maxSatellites' satellite icons which we will move around on the map: - for (int i = 0; i < MAX_SATTELITES; i++) { + for (int i = 0; i < MAX_SATELLITES; i++) { satellites[i][0] = 0; satellites[i][1] = 0; satellites[i][2] = 0; @@ -112,7 +112,7 @@ void GpsConstellationWidget::resizeEvent(QResizeEvent *event) void GpsConstellationWidget::updateSat(int index, int prn, int elevation, int azimuth, int snr) { - if (index >= MAX_SATTELITES) { + if (index >= MAX_SATELLITES) { // A bit of error checking never hurts. return; } diff --git a/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.h b/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.h index ab4ba26e8..6a11058e4 100644 --- a/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.h +++ b/ground/gcs/src/plugins/gpsdisplay/gpsconstellationwidget.h @@ -47,13 +47,13 @@ public slots: private slots: private: - static const int MAX_SATTELITES = 24; - int satellites[MAX_SATTELITES][4]; + static const int MAX_SATELLITES = 24; + int satellites[MAX_SATELLITES][4]; QGraphicsScene *scene; QSvgRenderer *renderer; QGraphicsSvgItem *world; - QGraphicsSvgItem *satIcons[MAX_SATTELITES]; - QGraphicsSimpleTextItem *satTexts[MAX_SATTELITES]; + QGraphicsSvgItem *satIcons[MAX_SATELLITES]; + QGraphicsSimpleTextItem *satTexts[MAX_SATELLITES]; QPointF polarToCoord(int elevation, int azimuth); diff --git a/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.cpp b/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.cpp index e67ea113d..94c8ab694 100644 --- a/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.cpp +++ b/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.cpp @@ -6,8 +6,8 @@ GpsSnrWidget::GpsSnrWidget(QWidget *parent) : scene = new QGraphicsScene(this); setScene(scene); - // Now create 'maxSatellites' satellite icons which we will move around on the map: - for (int i = 0; i < MAX_SATTELITES; i++) { + // Now create 'maxSatellites' signal to noise level bars: + for (int i = 0; i < MAX_SATELLITES; i++) { satellites[i][0] = 0; satellites[i][1] = 0; satellites[i][2] = 0; @@ -38,7 +38,7 @@ void GpsSnrWidget::showEvent(QShowEvent *event) { Q_UNUSED(event) scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height()); - for (int index = 0; index < MAX_SATTELITES; index++) { + for (int index = 0; index < MAX_SATELLITES; index++) { drawSat(index); } } @@ -47,14 +47,14 @@ void GpsSnrWidget::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height()); - for (int index = 0; index < MAX_SATTELITES; index++) { + for (int index = 0; index < MAX_SATELLITES; index++) { drawSat(index); } } void GpsSnrWidget::updateSat(int index, int prn, int elevation, int azimuth, int snr) { - if (index >= MAX_SATTELITES) { + if (index >= MAX_SATELLITES) { // A bit of error checking never hurts. return; } @@ -72,7 +72,7 @@ void GpsSnrWidget::updateSat(int index, int prn, int elevation, int azimuth, int void GpsSnrWidget::drawSat(int index) { - if (index >= MAX_SATTELITES) { + if (index >= MAX_SATELLITES) { // A bit of error checking never hurts. return; } @@ -90,7 +90,7 @@ void GpsSnrWidget::drawSat(int index) // Casting to int rounds down, which is what I want. // Minus 2 to allow a pixel of white left and right. - int availableWidth = (int)((scene->width() - 2) / MAX_SATTELITES); + int availableWidth = (int)((scene->width() - 2) / MAX_SATELLITES); // 2 pixels, one on each side. qreal width = availableWidth - 2; diff --git a/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.h b/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.h index 1d1a183d6..b05d0cb47 100644 --- a/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.h +++ b/ground/gcs/src/plugins/gpsdisplay/gpssnrwidget.h @@ -16,12 +16,12 @@ public slots: void updateSat(int index, int prn, int elevation, int azimuth, int snr); private: - static const int MAX_SATTELITES = 24; - int satellites[MAX_SATTELITES][4]; + static const int MAX_SATELLITES = 24; + int satellites[MAX_SATELLITES][4]; QGraphicsScene *scene; - QGraphicsRectItem *boxes[MAX_SATTELITES]; - QGraphicsSimpleTextItem *satTexts[MAX_SATTELITES]; - QGraphicsSimpleTextItem *satSNRs[MAX_SATTELITES]; + QGraphicsRectItem *boxes[MAX_SATELLITES]; + QGraphicsSimpleTextItem *satTexts[MAX_SATELLITES]; + QGraphicsSimpleTextItem *satSNRs[MAX_SATELLITES]; void drawSat(int index);