Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
34da19cf
Commit
34da19cf
authored
Jul 23, 2013
by
Lorenz Meier
Browse files
Made lipoFull and lipoEmpty potentially configurable
parent
e7b90fb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/uas/UAS.cc
View file @
34da19cf
...
...
@@ -39,11 +39,9 @@
* creating the UAS.
*/
const
float
UAS
::
lipoFull
=
4.2
f
;
///< 100% charged voltage
const
float
UAS
::
lipoEmpty
=
3.5
f
;
///< Discharged voltage
UAS
::
UAS
(
MAVLinkProtocol
*
protocol
,
int
id
)
:
UASInterface
(),
lipoFull
(
4.2
f
),
lipoEmpty
(
3.5
f
),
uasId
(
id
),
links
(
new
QList
<
LinkInterface
*>
()),
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
;
...
...
src/uas/UAS.h
View file @
34da19cf
...
...
@@ -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 */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment