From c44edc638d1be5afdf945a50d3938528f8e846a8 Mon Sep 17 00:00:00 2001 From: lulko Date: Fri, 28 Feb 2025 11:33:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20?= =?UTF-8?q?=D1=81=20=D0=B4=D1=80=D1=83=D0=B3=D0=B8=D0=BC=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B0=D0=BC=D0=B8=20=D1=83?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=BE=D0=B9=D1=81=D1=82=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/fw/embed/src/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/controller/fw/embed/src/main.cpp b/controller/fw/embed/src/main.cpp index 0a7074b..c7902d7 100644 --- a/controller/fw/embed/src/main.cpp +++ b/controller/fw/embed/src/main.cpp @@ -223,6 +223,17 @@ void listen_can(){ } break; + case MOTOR_ENABLED: + if(CAN_inMsg.buf[1] == 1){ + motor.enable(); + motor_control_inputs.motor_enabled = 1; + } + else{ + motor.disable(); + motor_control_inputs.motor_enabled = 0; + } + + default: break; }