Commit 67e14c3d authored by Jessica's avatar Jessica

Airframe unit test now passes. In UAS.cc, the airframe was set to generic.

parent f6aae914
...@@ -163,10 +163,7 @@ void UASUnitTest::getYaw_test() ...@@ -163,10 +163,7 @@ void UASUnitTest::getYaw_test()
void UASUnitTest::getSelected_test() void UASUnitTest::getSelected_test()
{ {
bool test = uas->getSelected(); QCOMPARE(uas->getSelected(), false);
if(test != NULL){
QCOMPARE(test, false);
}
} }
void UASUnitTest::getSystemType_test() void UASUnitTest::getSystemType_test()
...@@ -176,6 +173,7 @@ void UASUnitTest::getSystemType_test() ...@@ -176,6 +173,7 @@ void UASUnitTest::getSystemType_test()
void UASUnitTest::getAirframe_test() void UASUnitTest::getAirframe_test()
{ {
//when uas is constructed, airframe is set to QGC_AIRFRAME_GENERIC which is 0
QCOMPARE(uas->getAirframe(), 0); QCOMPARE(uas->getAirframe(), 0);
uas->setAirframe(25); uas->setAirframe(25);
......
...@@ -86,7 +86,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), ...@@ -86,7 +86,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
receivedRGBDImageTimestamp(0.0), receivedRGBDImageTimestamp(0.0),
#endif #endif
paramsOnceRequested(false), paramsOnceRequested(false),
airframe(QGC_AIRFRAME_EASYSTAR), airframe(QGC_AIRFRAME_GENERIC),
attitudeKnown(false), attitudeKnown(false),
paramManager(NULL), paramManager(NULL),
attitudeStamped(false), attitudeStamped(false),
...@@ -104,7 +104,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), ...@@ -104,7 +104,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
componentID[i] = -1; componentID[i] = -1;
componentMulti[i] = false; componentMulti[i] = false;
} }
color = UASInterface::getNextColor(); color = UASInterface::getNextColor();
setBatterySpecs(QString("9V,9.5V,12.6V")); setBatterySpecs(QString("9V,9.5V,12.6V"));
...@@ -152,9 +152,9 @@ void UAS::readSettings() ...@@ -152,9 +152,9 @@ void UAS::readSettings()
void UAS::deleteSettings() void UAS::deleteSettings()
{ {
this->name = ""; this->name = "";
this->airframe = QGC_AIRFRAME_EASYSTAR; this->airframe = QGC_AIRFRAME_GENERIC;
this->autopilot = -1; this->autopilot = -1;
setBatterySpecs(QString("9V,9.5V,12.6V")); setBatterySpecs(QString("9V,9.5V,12.6V"));
} }
int UAS::getUASID() const int UAS::getUASID() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment