fix(battery): capture path_battery by copy (#992)
path_battery goes out of scope, so the stack reference becomes garbage Fixes #985
This commit is contained in:
parent
26abd0f6c4
commit
2f113446c0
@ -82,7 +82,7 @@ namespace modules {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Make consumption reader
|
// Make consumption reader
|
||||||
m_consumption_reader = make_unique<consumption_reader>([this,&path_battery] {
|
m_consumption_reader = make_unique<consumption_reader>([this,path_battery] {
|
||||||
float consumption;
|
float consumption;
|
||||||
|
|
||||||
// if the rate we found was the current, calculate power (P = I*V)
|
// if the rate we found was the current, calculate power (P = I*V)
|
||||||
|
Loading…
Reference in New Issue
Block a user