Skip to content

Commit 64c4445

Browse files
committed
autosync
1 parent 96d1abc commit 64c4445

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/ODriveEnums.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ enum ODriveAxisState {
5555
AXIS_STATE_ENCODER_HALL_POLARITY_CALIBRATION = 12,
5656
AXIS_STATE_ENCODER_HALL_PHASE_CALIBRATION = 13,
5757
AXIS_STATE_ANTICOGGING_CALIBRATION = 14,
58+
AXIS_STATE_HARMONIC_CALIBRATION = 15,
59+
AXIS_STATE_HARMONIC_CALIBRATION_COMMUTATION = 16,
5860
};
5961

6062
// ODrive.Controller.ControlMode
@@ -192,6 +194,14 @@ enum ODriveMotorType {
192194
MOTOR_TYPE_ACIM = 3,
193195
};
194196

197+
// ODrive.ThermistorMode
198+
enum ODriveThermistorMode {
199+
THERMISTOR_MODE_NTC = 1,
200+
THERMISTOR_MODE_QUADRATIC = 2,
201+
THERMISTOR_MODE_PT1000 = 3,
202+
THERMISTOR_MODE_KTY84 = 4,
203+
};
204+
195205
// ODrive.Can.Error
196206
enum ODriveCanError {
197207
CAN_ERROR_NONE = 0x00000000,

src/can_simple_messages.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,21 @@ struct Address_msg_t final {
179179
void encode_buf(uint8_t* buf) const {
180180
can_set_signal_raw<uint8_t>(buf, Node_ID, 0, 8, true);
181181
can_set_signal_raw<uint64_t>(buf, Serial_Number, 8, 48, true);
182+
can_set_signal_raw<uint8_t>(buf, Connection_ID, 56, 8, true);
182183
}
183184

184185
void decode_buf(const uint8_t* buf) {
185186
Node_ID = can_get_signal_raw<uint8_t>(buf, 0, 8, true);
186187
Serial_Number = can_get_signal_raw<uint64_t>(buf, 8, 48, true);
188+
Connection_ID = can_get_signal_raw<uint8_t>(buf, 56, 8, true);
187189
}
188190

189191
static const uint8_t cmd_id = 0x006;
190192
static const uint8_t msg_length = 8;
191193

192194
uint8_t Node_ID = 0;
193195
uint64_t Serial_Number = 0;
196+
uint8_t Connection_ID = 0;
194197
};
195198

196199
struct Set_Axis_State_msg_t final {
@@ -325,8 +328,8 @@ struct Set_Input_Pos_msg_t final {
325328
static const uint8_t msg_length = 8;
326329

327330
float Input_Pos = 0.0f; // [rev]
328-
float Vel_FF = 0.0f; // [rev/s]
329-
float Torque_FF = 0.0f; // [Nm]
331+
float Vel_FF = 0.0f; // [rev/s (default) [#vel-ff-scale]_]
332+
float Torque_FF = 0.0f; // [Nm (default) [#torque-ff-scale]_]
330333
};
331334

332335
struct Set_Input_Vel_msg_t final {

0 commit comments

Comments
 (0)