From 67e14c3d22c002fce4123e588c4e7ef2954f5275 Mon Sep 17 00:00:00 2001 From: Jessica Date: Wed, 18 Jul 2012 13:37:30 -0700 Subject: [PATCH] Airframe unit test now passes. In UAS.cc, the airframe was set to generic. --- qgcunittest/UASUnitTest.cc | 6 ++---- src/uas/UAS.cc | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/qgcunittest/UASUnitTest.cc b/qgcunittest/UASUnitTest.cc index 117aed1fb..c74539f43 100644 --- a/qgcunittest/UASUnitTest.cc +++ b/qgcunittest/UASUnitTest.cc @@ -163,10 +163,7 @@ void UASUnitTest::getYaw_test() void UASUnitTest::getSelected_test() { - bool test = uas->getSelected(); - if(test != NULL){ - QCOMPARE(test, false); - } + QCOMPARE(uas->getSelected(), false); } void UASUnitTest::getSystemType_test() @@ -176,6 +173,7 @@ void UASUnitTest::getSystemType_test() void UASUnitTest::getAirframe_test() { + //when uas is constructed, airframe is set to QGC_AIRFRAME_GENERIC which is 0 QCOMPARE(uas->getAirframe(), 0); uas->setAirframe(25); diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index e9188bc29..f555ef806 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -86,7 +86,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), receivedRGBDImageTimestamp(0.0), #endif paramsOnceRequested(false), - airframe(QGC_AIRFRAME_EASYSTAR), + airframe(QGC_AIRFRAME_GENERIC), attitudeKnown(false), paramManager(NULL), attitudeStamped(false), @@ -104,7 +104,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), componentID[i] = -1; componentMulti[i] = false; } - + color = UASInterface::getNextColor(); setBatterySpecs(QString("9V,9.5V,12.6V")); @@ -152,9 +152,9 @@ void UAS::readSettings() void UAS::deleteSettings() { this->name = ""; - this->airframe = QGC_AIRFRAME_EASYSTAR; + this->airframe = QGC_AIRFRAME_GENERIC; this->autopilot = -1; - setBatterySpecs(QString("9V,9.5V,12.6V")); + setBatterySpecs(QString("9V,9.5V,12.6V")); } int UAS::getUASID() const -- 2.22.0