From ac8a51fcc6923b3097fd40e9783e161ef462dd29 Mon Sep 17 00:00:00 2001 From: Jan-Felix Abellera Date: Wed, 25 Sep 2024 12:16:33 +0300 Subject: [PATCH 1/2] Fix food production not canceling --- lib/models/src/fcs/FeedingTheFutureFCS.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/models/src/fcs/FeedingTheFutureFCS.ts b/lib/models/src/fcs/FeedingTheFutureFCS.ts index c440e1cb..cac07c35 100644 --- a/lib/models/src/fcs/FeedingTheFutureFCS.ts +++ b/lib/models/src/fcs/FeedingTheFutureFCS.ts @@ -613,9 +613,8 @@ export class PacketManager { currentState !== NexusGoalState.Full && previousState === NexusGoalState.Full ) { - // // Cancel timer if there is one - // clearTimeout(this.timers.get(goal)); - this.actionQueue.delete(goal); + // Cancel timer if there is one + this.actionQueue.delete(goal + ':leds'); } // Broadcast update From c0866aa746e781bffbbaa112d1c33178ceac2a3f Mon Sep 17 00:00:00 2001 From: Jan-Felix Abellera Date: Wed, 25 Sep 2024 14:27:41 +0300 Subject: [PATCH 2/2] Stop motors on abort --- lib/models/src/fcs/FeedingTheFutureFCS.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/models/src/fcs/FeedingTheFutureFCS.ts b/lib/models/src/fcs/FeedingTheFutureFCS.ts index cac07c35..a7fb0da6 100644 --- a/lib/models/src/fcs/FeedingTheFutureFCS.ts +++ b/lib/models/src/fcs/FeedingTheFutureFCS.ts @@ -255,6 +255,7 @@ export class PacketManager { LedStripA.ALL_STRIPS, result ); + applySetpointToMotors(0, MotorA.ALL_GOALS, result); this.broadcastCallback(result); };