mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
LP-536 use the correct spelling for SATELLITES
This commit is contained in:
parent
6cf16cc727
commit
2d181994f0
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user