Add stack_size vars, reduce stack usage

This commit is contained in:
Unknown
2019-10-26 14:28:06 -04:00
parent 1550170201
commit f127df72f1
15 changed files with 49 additions and 9 deletions
+2 -2
View File
@@ -86,8 +86,8 @@ static void run_state_machine_loop_wrapper(void* ctx) {
// @brief Starts run_state_machine_loop in a new thread
void Axis::start_thread() {
osThreadDef(thread_def, run_state_machine_loop_wrapper, hw_config_.thread_priority, 0, 4 * 512);
thread_id_ = osThreadCreate(osThread(thread_def), this);
osThreadDef(thread_def, run_state_machine_loop_wrapper, hw_config_.thread_priority, 0, stack_size_ / sizeof(StackType_t));
thread_id_ = osThreadCreate(osThread(thread_def), this);
thread_id_valid_ = true;
}