Browse Source

Minor changes

QGC4.4
lm 14 years ago
parent
commit
a11ca3dae2
  1. 2
      src/uas/UAS.cc
  2. 1
      src/ui/QGCSensorSettingsWidget.cc
  3. 2
      src/ui/map3D/QGCGoogleEarthView.cc

2
src/uas/UAS.cc

@ -605,6 +605,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{ {
emit globalPositionChanged(this, pos.lat, pos.lon, pos.alt, time); emit globalPositionChanged(this, pos.lat, pos.lon, pos.alt, time);
emit valueChanged(uasId, "gps speed", "m/s", pos.v, time); emit valueChanged(uasId, "gps speed", "m/s", pos.v, time);
positionLock = true;
// Check for NaN // Check for NaN
int alt = pos.alt; int alt = pos.alt;
@ -645,6 +646,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{ {
emit globalPositionChanged(this, pos.lat/(double)1E7, pos.lon/(double)1E7, pos.alt/1000.0, time); emit globalPositionChanged(this, pos.lat/(double)1E7, pos.lon/(double)1E7, pos.alt/1000.0, time);
emit valueChanged(uasId, "gps speed", "m/s", pos.v, time); emit valueChanged(uasId, "gps speed", "m/s", pos.v, time);
positionLock = true;
// Check for NaN // Check for NaN
int alt = pos.alt; int alt = pos.alt;

1
src/ui/QGCSensorSettingsWidget.cc

@ -37,6 +37,7 @@ QGCSensorSettingsWidget::QGCSensorSettingsWidget(UASInterface* uas, QWidget *par
ui(new Ui::QGCSensorSettingsWidget) ui(new Ui::QGCSensorSettingsWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
// FIXME James Goppert
// XXX: This might be a bad idea sending a message every time the value changes // XXX: This might be a bad idea sending a message every time the value changes
connect(ui->spinBox_rawSensor, SIGNAL(valueChanged(int)), mav, SLOT(enableRawSensorDataTransmission(int))); connect(ui->spinBox_rawSensor, SIGNAL(valueChanged(int)), mav, SLOT(enableRawSensorDataTransmission(int)));
connect(ui->spinBox_controller, SIGNAL(valueChanged(int)), mav, SLOT(enableRawControllerDataTransmission(int))); connect(ui->spinBox_controller, SIGNAL(valueChanged(int)), mav, SLOT(enableRawControllerDataTransmission(int)));

2
src/ui/map3D/QGCGoogleEarthView.cc

@ -214,7 +214,7 @@ void QGCGoogleEarthView::updateWaypointList(int uas)
void QGCGoogleEarthView::updateGlobalPosition(UASInterface* uas, double lat, double lon, double alt, quint64 usec) void QGCGoogleEarthView::updateGlobalPosition(UASInterface* uas, double lat, double lon, double alt, quint64 usec)
{ {
Q_UNUSED(usec); Q_UNUSED(usec);
javaScript(QString("addTrailPosition(%1, %2, %3, %4);").arg(uas->getUASID()).arg(lat, 0, 'f', 15).arg(lon, 0, 'f', 15).arg(alt, 0, 'f', 15)); javaScript(QString("addTrailPosition(%1, %2, %3, %4);").arg(uas->getUASID()).arg(lat, 0, 'f', 18).arg(lon, 0, 'f', 18).arg(alt, 0, 'f', 15));
//qDebug() << QString("addTrailPosition(%1, %2, %3, %4);").arg(uas->getUASID()).arg(lat, 0, 'f', 15).arg(lon, 0, 'f', 15).arg(alt, 0, 'f', 15); //qDebug() << QString("addTrailPosition(%1, %2, %3, %4);").arg(uas->getUASID()).arg(lat, 0, 'f', 15).arg(lon, 0, 'f', 15).arg(alt, 0, 'f', 15);
} }

Loading…
Cancel
Save