mirror of https://github.com/FOME-Tech/fome-fw.git
Prevent multiple-starts on a thread from causing panic #265
This commit is contained in:
parent
5e01450fee
commit
b8c715719a
|
@ -49,6 +49,7 @@ Release template (copy/paste this for new release):
|
|||
- Always operate in "two wire" mode for batch fuel, fixing batch firing order #23
|
||||
- Fix "Toyota 3 Tooth Cam" VVT mode (1JZ, 2JZ, 1G, etc) actually works now #237
|
||||
- Fix autotune while TS project is in AFR mode - corrections now made properly for target AFR table values
|
||||
- Changing idle stepper settings causes kernel panic #265
|
||||
|
||||
## May 2023 Release
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ class ThreadController : public chibios_rt::BaseStaticThread<TStackSize>
|
|||
{
|
||||
private:
|
||||
const tprio_t m_prio;
|
||||
bool m_started = false;
|
||||
|
||||
protected:
|
||||
// Override this function to implement your controller's thread's behavior.
|
||||
|
@ -44,6 +45,10 @@ public:
|
|||
*/
|
||||
void start()
|
||||
{
|
||||
if (!m_started)
|
||||
{
|
||||
m_started = true;
|
||||
chibios_rt::BaseStaticThread<TStackSize>::start(m_prio);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue