File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed
Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1818ODrive or Solo. As of 2/8/26, no specific decision has been made yet*/
1919
2020#include " Arm.h"
21- #include " MotorControl .h"
21+ #include " Dynamixel .h"
2222
2323const long SERIAL_BAUD_RATE = 38400 ;
2424const uint8_t RUN_CURRENT_PERCENT = 100 ;
@@ -27,10 +27,6 @@ const uint8_t HOLD_CURRENT_STANDSTILL = 0;
2727const int32_t RUN_VELOCITY = 40000 ;
2828const int32_t STOP_VELOCITY = 0 ;
2929
30- const long SERIAL_BAUD_RATE = 38400 ;
31- const uint8_t RUN_CURRENT_PERCENT = 100 ;
32- const uint8_t HOLD_CURRENT_STANDSTILL = 0 ;
33-
3430// variables
3531qindesign::network::EthernetUDP udp;
3632TMC2209 stepper_driver;
Original file line number Diff line number Diff line change 1+ #ifndef ARM_H
2+ #define ARM_H
3+
14/* *************************GENERAL LIBRARIES**************************/
25/* ******************TO BE UTILIZED FOR ALL MOTORS*******************/
36
@@ -18,4 +21,6 @@ int kbhit(void); // Dynamixel SDK function
1821void test_stepper ();
1922void test_stepper_2 ();
2023void run_stepper ();
21- void run_stepper_2 ();
24+ void run_stepper_2 ();
25+
26+ #endif
Original file line number Diff line number Diff line change 1- #include " MotorControl .h"
1+ #include " Dynamixel .h"
22
33// Data about each motor to be sent to SOLO
44enum class CAN_Send_State {
@@ -27,8 +27,8 @@ int clampDriveRequest(int speedReference) {
2727
2828// Reads Ethernet message and sets motor points in array
2929void handleDriveRequest (DrivetrainRequest newMessage) {
30- motorSetpoints[MOTOR_IDS[0 ]] = clampDriveRequest (message .m1Setpoint );
31- motorSetpoints[MOTOR_IDS[1 ]] = clampDriveRequest (message .m2Setpoint );
32- motorSetpoints[MOTOR_IDS[2 ]] = clampDriveRequest (message .m3Setpoint );
33- motorSetpoints[MOTOR_IDS[3 ]] = clampDriveRequest (message .m4Setpoint );
30+ motorSetpoints[MOTOR_IDS[0 ]] = clampDriveRequest (newMessage .m1Setpoint );
31+ motorSetpoints[MOTOR_IDS[1 ]] = clampDriveRequest (newMessage .m2Setpoint );
32+ motorSetpoints[MOTOR_IDS[2 ]] = clampDriveRequest (newMessage .m3Setpoint );
33+ motorSetpoints[MOTOR_IDS[3 ]] = clampDriveRequest (newMessage .m4Setpoint );
3434}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ all the general motor functions that will be used across different
44subsystems (arm, science, drivetrain)
55*/
66
7- #ifdef MOTORS_H
7+ #ifndef MOTORS_H
88#define MOTORS_H
99
1010class Motor {
@@ -16,6 +16,9 @@ class Motor {
1616 Motor (const Motor&) = delete ;
1717 Motor& operator = (const Motor&) = delete ;
1818
19+ protected:
20+ Motor () = default ;
21+
1922 // General motor methods that each motor in every subsystem may need
2023 // UPDATE AS WE GO ALONG
2124 virtual void setSpeed () = 0;
You can’t perform that action at this time.
0 commit comments