diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 65b8d9a5725d7f67b14f495e0db312a589781545..0759a23cb1cc8b0e4921b81ace034260006420b2 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -39,11 +39,9 @@ * creating the UAS. */ -const float UAS::lipoFull = 4.2f; ///< 100% charged voltage -const float UAS::lipoEmpty = 3.5f; ///< Discharged voltage - - UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), + lipoFull(4.2f), + lipoEmpty(3.5f), uasId(id), links(new QList()), unknownPackets(), @@ -3462,8 +3460,8 @@ void UAS::setBattery(BatteryType type, int cells) case LIION: break; case LIPOLY: - fullVoltage = this->cells * UAS::lipoFull; - emptyVoltage = this->cells * UAS::lipoEmpty; + fullVoltage = this->cells * lipoFull; + emptyVoltage = this->cells * lipoEmpty; break; case LIFE: break; diff --git a/src/uas/UAS.h b/src/uas/UAS.h index 0da722b682b803652b595afea1cb0e67f60f5c22..b1c027bd1f55cb9039a0c0351322702ff0237d38 100644 --- a/src/uas/UAS.h +++ b/src/uas/UAS.h @@ -56,8 +56,8 @@ public: UAS(MAVLinkProtocol* protocol, int id = 0); ~UAS(); - static const float lipoFull; ///< 100% charged voltage - static const float lipoEmpty; ///< Discharged voltage + float lipoFull; ///< 100% charged voltage + float lipoEmpty; ///< Discharged voltage /* MANAGEMENT */