From 320cf3b244869899460210dc3eb7892632fb8f38 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 1 May 2024 14:44:47 +1000 Subject: [PATCH 1/2] AP_HAL_ChibiOS: enable AP_Scheduler for CubeOrange-periph-heavy ... we use the scehduler in AP_Motors, which is compiled when making heavy-periph --- libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-periph-heavy/hwdef.dat | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-periph-heavy/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-periph-heavy/hwdef.dat index 003ee1508e9e02..ea87ad64b0aeff 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-periph-heavy/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-periph-heavy/hwdef.dat @@ -60,3 +60,4 @@ define HAL_PICCOLO_CAN_ENABLE 0 define AP_RELAY_ENABLED 1 define AP_SERVORELAYEVENTS_ENABLED 1 +define AP_SCHEDULER_ENABLED 1 From bfe5c68dd311e662cab02afbdda7da5bf3ea58e7 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 1 May 2024 14:44:47 +1000 Subject: [PATCH 2/2] AP_Scripting: enable AP_Scheduler for CubeOrange-periph-heavy ... we use the scehduler in AP_Motors, which is compiled when making heavy-periph --- libraries/AP_Scripting/generator/src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_Scripting/generator/src/main.c b/libraries/AP_Scripting/generator/src/main.c index d0ce2c7fcf69a4..c6a93383da66d4 100644 --- a/libraries/AP_Scripting/generator/src/main.c +++ b/libraries/AP_Scripting/generator/src/main.c @@ -2927,6 +2927,9 @@ int main(int argc, char **argv) { // for set_and_print_new_error_message deprecate warning fprintf(source, "#include \n"); + fprintf(source, "\n"); + // the generated source uses the Scehduler singleton: + fprintf(source, "#include \n"); fprintf(source, "extern const AP_HAL::HAL& hal;\n");