mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-02 16:51:53 +00:00
Added initWatchdog function to startup
This commit is contained in:
parent
cc74b9edd4
commit
75fe437f1e
@ -28,6 +28,7 @@
|
|||||||
// Tacos-specific includes.
|
// Tacos-specific includes.
|
||||||
#include <sta/tacos/manager.hpp>
|
#include <sta/tacos/manager.hpp>
|
||||||
#include <sta/tacos/statemachine.hpp>
|
#include <sta/tacos/statemachine.hpp>
|
||||||
|
#include <sta/tacos/watchdog.hpp>
|
||||||
|
|
||||||
|
|
||||||
// The UART mutex defined in freertos.c
|
// The UART mutex defined in freertos.c
|
||||||
@ -72,8 +73,6 @@ namespace sta
|
|||||||
UARTSettings settings = { .mode = UARTMode::RX_TX };
|
UARTSettings settings = { .mode = UARTMode::RX_TX };
|
||||||
STM32UART * intf_ptr = new STM32UART(getUARThandle(), settings, mutex);
|
STM32UART * intf_ptr = new STM32UART(getUARThandle(), settings, mutex);
|
||||||
Debug = new PrintableUART(intf_ptr);
|
Debug = new PrintableUART(intf_ptr);
|
||||||
|
|
||||||
STA_DEBUG_PRINTLN("UART SUCCESSFULLY INITIALIZED");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // STA_DEBUGGING_ENABLED
|
#endif // STA_DEBUGGING_ENABLED
|
||||||
@ -113,6 +112,19 @@ namespace sta
|
|||||||
|
|
||||||
Manager::instance()->start();
|
Manager::instance()->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef STA_TACOS_WATCHDOG_ENABLED
|
||||||
|
STA_WEAK
|
||||||
|
void onWatchdogInit()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void initWatchdog()
|
||||||
|
{
|
||||||
|
onWatchdogInit();
|
||||||
|
|
||||||
|
Watchdog::instance()->start();
|
||||||
|
}
|
||||||
|
#endif // STA_TACOS_WATCHDOG_ENABLED
|
||||||
} // namespace tacos
|
} // namespace tacos
|
||||||
|
|
||||||
|
|
||||||
@ -128,6 +140,10 @@ namespace sta
|
|||||||
tacos::initStatemachine();
|
tacos::initStatemachine();
|
||||||
|
|
||||||
tacos::initManager();
|
tacos::initManager();
|
||||||
|
|
||||||
|
#ifdef STA_TACOS_WATCHDOG_ENABLED
|
||||||
|
tacos::initWatchdog();
|
||||||
|
#endif // STA_TACOS_WATCHDOG_ENABLED
|
||||||
}
|
}
|
||||||
} // namespace rtos
|
} // namespace rtos
|
||||||
} // namespace sta
|
} // namespace sta
|
||||||
|
@ -32,9 +32,7 @@ namespace sta
|
|||||||
|
|
||||||
Watchdog::Watchdog()
|
Watchdog::Watchdog()
|
||||||
: TacosThread{"Watchdog", STA_TACOS_WATCHDOG_PRIORITY}
|
: TacosThread{"Watchdog", STA_TACOS_WATCHDOG_PRIORITY}
|
||||||
{
|
{}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Watchdog* Watchdog::_instance = nullptr;
|
Watchdog* Watchdog::_instance = nullptr;
|
||||||
} // namespace tacos
|
} // namespace tacos
|
||||||
|
Loading…
x
Reference in New Issue
Block a user