fix(battery): Better safety checks
This commit is contained in:
parent
b89536af2b
commit
260519ec55
@ -67,7 +67,10 @@ void BatteryModule::subthread_runner()
|
||||
{
|
||||
std::this_thread::yield();
|
||||
|
||||
const auto dur = std::chrono::duration<double>(
|
||||
std::chrono::duration<double> dur = 1s;
|
||||
|
||||
if (this->animation_charging)
|
||||
dur = std::chrono::duration<double>(
|
||||
float(this->animation_charging->get_framerate()) / 1000.0f);
|
||||
|
||||
int i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user