Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
83ac7436
Commit
83ac7436
authored
7 years ago
by
Matthias Grob
Committed by
Lorenz Meier
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Battery: move member initialization values to class declaration
parent
3917eb2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/modules/systemlib/battery.cpp
+0
-7
0 additions, 7 deletions
src/modules/systemlib/battery.cpp
src/modules/systemlib/battery.h
+7
-7
7 additions, 7 deletions
src/modules/systemlib/battery.h
with
7 additions
and
14 deletions
src/modules/systemlib/battery.cpp
+
0
−
7
View file @
83ac7436
...
...
@@ -53,13 +53,6 @@ Battery::Battery() :
_low_thr
(
this
,
"LOW_THR"
),
_crit_thr
(
this
,
"CRIT_THR"
),
_emergency_thr
(
this
,
"EMERGEN_THR"
),
_voltage_filtered_v
(
-
1.
f
),
_current_filtered_a
(
-
1.
f
),
_discharged_mah
(
0.
f
),
_discharged_mah_loop
(
0.
f
),
_remaining_voltage
(
1.
f
),
_remaining
(
2.
f
),
_scale
(
1.
f
),
_warning
(
battery_status_s
::
BATTERY_WARNING_NONE
),
_last_timestamp
(
0
)
{
...
...
This diff is collapsed.
Click to expand it.
src/modules/systemlib/battery.h
+
7
−
7
View file @
83ac7436
...
...
@@ -113,13 +113,13 @@ private:
control
::
BlockParamFloat
_crit_thr
;
control
::
BlockParamFloat
_emergency_thr
;
float
_voltage_filtered_v
;
float
_current_filtered_a
;
float
_discharged_mah
;
float
_discharged_mah_loop
;
float
_remaining_voltage
;
///< normalized battery charge level remaining based on voltage
float
_remaining
;
///< normalized battery charge level, selected based on config param
float
_scale
;
float
_voltage_filtered_v
=
-
1.
f
;
float
_current_filtered_a
=
-
1.
f
;
float
_discharged_mah
=
0.
f
;
float
_discharged_mah_loop
=
0.
f
;
float
_remaining_voltage
=
1.
f
;
///< normalized battery charge level remaining based on voltage
float
_remaining
=
2.
f
;
///< normalized battery charge level, selected based on config param
float
_scale
=
1.
f
;
uint8_t
_warning
;
hrt_abstime
_last_timestamp
;
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment