- Added a README file containing instructions for using the Python scripts to test and interact with a CAN bus system.
- Included details on prerequisites, usage, configuration, and troubleshooting.
- Provided step-by-step guidance for running each script, including arguments and behavior.
- Created `python_can.py`:
- Implements a CAN message receiver that processes angle, velocity, and enable/disable flags.
- Added `python_enable_motor.py`:
- Sends enable/disable commands to the motor via CAN.
- Added `python_send_angle.py`:
- Sends target angle commands over the CAN bus.
- Added `python_send_velocity.py`:
- Sends target velocity commands over the CAN bus.
- Configured all scripts to use `python-can` library with `socketcan` interface for CAN communication.
- Introduced `MotorControlInputs` struct to centralize motor control state.
- Renamed `sensor` to `encoder` for clarity in naming conventions.
- Added `send_velocity`, `send_angle`, and `send_motor_enabled` functions for modular CAN message handling.
- Updated `setup_foc` to enhance motor initialization with configurable parameters.
- Replaced `run_foc` with `foc_step` for improved motor control logic:
- Dynamically switches between angle and velocity control based on inputs.
- Enhanced CAN message handling with `read_can_step` to process specific control commands.
- Adjusted current sensing and other configuration values for precision.
- Added placeholders for temperature sensor setup and handling.
- Added `.clang-tidy` with custom checks to enforce code style.
- Created `.clangd` with specific compile flag additions and removals.
- Updated `.gitignore` to include new cache, metadata, and configuration files.
- Updated `platformio.ini`:
- Bumped `Simple FOC` to version 2.3.4 and `STM32_CAN` to version 1.1.2.
- Added `gen_compile_commands.py` as an extra script.