From 4c258496a955a08532332d0c665fc0251985723e Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 21 Nov 2024 16:25:32 +0100 Subject: [PATCH] remove velocity_ff and torque_ff from set_position command --- packages/protodevice/src/device/ODriveCan.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/protodevice/src/device/ODriveCan.ts b/packages/protodevice/src/device/ODriveCan.ts index fbdb847b5..9fb20419e 100644 --- a/packages/protodevice/src/device/ODriveCan.ts +++ b/packages/protodevice/src/device/ODriveCan.ts @@ -119,8 +119,8 @@ if (!x.containsKey("position") || !x.containsKey("velocity") || !x.containsKey(" return; } float input_pos = x["position"].as(); // Desired position in revolutions -int16_t vel_ff = x["velocity"].as(); // Velocity feedforward -int16_t torque_ff = x["torque"].as(); // Torque feedforward +int16_t vel_ff = 1000; // Velocity feedforward +int16_t torque_ff = 1000; // Torque feedforward ESP_LOGD("canbus", "Parsed JSON: Position=%.2f, Velocity=%d, Torque=%d", input_pos, vel_ff, torque_ff); @@ -539,8 +539,6 @@ id(${this.name}_errors).publish_state(error_string.c_str()); type: 'json-schema', schema: { position: { type: 'float', description: 'Position in revolutions' }, - velocity: { type: 'int', description: 'Velocity feedforward' }, - torque: { type: 'int', description: 'Torque feedforward' }, }, }, },