From df1f14e1b80a06d41ac2cbbfe651978eb7702f0c Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 29 Sep 2021 18:28:57 -0500 Subject: [PATCH] Bugfix: Running as init is still not handling interruptable correctly. I overlooked that the result was comparing against f_console_result_none rather than f_console_result_found. This messed up my previous attempt to fix this. Change the behavior and also explicitly assign the else case. --- level_3/controller/c/controller.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index 8d46b61..6802de0 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -338,12 +338,18 @@ extern "C" { // The interruptable default is dependent on the "as init" execution state. if (main->as_init) { - if (main->parameters[controller_parameter_uninterruptable].result == f_console_result_none) { + if (main->parameters[controller_parameter_interruptable].result == f_console_result_found) { setting.interruptable = F_true; } + else { + setting.interruptable = F_false; + } } else { - if (main->parameters[controller_parameter_interruptable].result == f_console_result_found) { + if (main->parameters[controller_parameter_uninterruptable].result == f_console_result_found) { + setting.interruptable = F_false; + } + else { setting.interruptable = F_true; } } -- 1.8.3.1