Skip to content

Commit

Permalink
Fixed Compiler Error C2864 - only static const integral data members …
Browse files Browse the repository at this point in the history
…can be initialized within a class
  • Loading branch information
PDSantos committed Jul 23, 2013
1 parent 066ce66 commit 57fc442
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/uas/UAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<LinkInterface*>()),
Expand Down
4 changes: 2 additions & 2 deletions src/uas/UAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class UAS : public UASInterface
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 */

Expand Down

0 comments on commit 57fc442

Please sign in to comment.