From 57fc4421e75603567d758c753fd230fab272a225 Mon Sep 17 00:00:00 2001 From: PDSantos Date: Tue, 23 Jul 2013 15:45:50 +0100 Subject: [PATCH] Fixed Compiler Error C2864 - only static const integral data members can be initialized within a class --- src/uas/UAS.cc | 5 +++++ src/uas/UAS.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 9b1556426..65b8d9a57 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -38,6 +38,11 @@ * as the previous one created unless one calls deleteSettings in the code after * 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(), uasId(id), links(new QList()), diff --git a/src/uas/UAS.h b/src/uas/UAS.h index 74d15c017..0da722b68 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 = 4.2f; ///< 100% charged voltage - static const float lipoEmpty = 3.5f; ///< Discharged voltage + static const float lipoFull; ///< 100% charged voltage + static const float lipoEmpty; ///< Discharged voltage /* MANAGEMENT */ -- 2.22.0