diptopandit/BatSim

bugfix - start/stop

Opened this issue · 0 comments

after exec:
sim start
sim stop
sim start
PROBLEM
The simulator do not start again.

FIX:
on file battery.cpp lines 375/373 replase
for(i =0;i<count;i++)
Cell[0]->unlock(this);
with:
for(i =0;i<count;i++)
Cell[i]->unlock(this); /// 26/08/2024 oliveirakol@gmail.com - fixed bug start/stop (fail to restart again)

REASON:
when thread is terminated by sim stop its only unlocking cell[0] and shoud unlock all cells before exit thread.