Commit graph

29 commits

Author SHA1 Message Date
3baa5d449f test FOC 2025-04-08 16:09:42 +03:00
24c70fe33a Описание установки CAN_ID и работы с bootloader 2025-03-25 15:45:38 +03:00
f928f03112 readme rewrite
fix

fix
2025-03-24 14:03:53 +03:00
add1a30827 Инструкция к прошивке 2025-03-22 22:21:21 +03:00
cf1c6eb05c Добавлена адресация к бутлоадеру 2025-03-22 13:56:28 +03:00
a1bcbdb33b Bootloader CAN work 2025-03-21 14:00:00 +03:00
4b543e78ce Возможна загрузка прошивки, но не переходит в неё 2025-03-19 18:56:00 +03:00
1de6c1bda1 added a description of firmware work 2025-03-17 19:08:41 +03:00
023026987c With bootloader 2025-03-17 15:43:34 +03:00
b5ff05bed6 Algoritm for save flash(while non-work) 2025-03-12 22:24:39 +03:00
5dbd56f200 Fix algoritm FLASH 2025-03-12 15:31:01 +03:00
bbdf967e6d Fix CAN 2025-03-11 17:49:50 +03:00
147bad14bb Добавлена директория бутлоадера 2025-03-10 20:43:14 +03:00
ca5dfc9698 Добавлено смещение для векторов прерываний 2025-03-05 16:45:21 +03:00
f02703659d Реализована адресация 2025-03-03 15:02:32 +03:00
aa1a78117b Fixed cpplint 2025-03-03 11:43:03 +03:00
c44edc638d Добавление работы с другими регистрами устройства 2025-02-28 11:33:01 +03:00
119bc4f091 Добавил тест для записи и одновременно чтения ID устройства по CAN 2025-02-28 10:08:55 +03:00
dc445c11b7 git 2025-02-27 20:17:48 +03:00
12d66cc0eb Реализована возможность сохранения адреса устройства и чтения его с Flash памяти 2025-02-27 20:08:38 +03:00
365124fd91 fix cpplint errors
fix cpplint again
2025-02-17 19:06:28 +03:00
sosiskovich
631cadca26 New PID coefficients; remove legacy 2025-02-12 21:57:27 +08:00
74c5b1d12c Enhance CAN bus scripts with argparse and error handling
- Improved error handling in `python_enable_motor.py` by capturing and displaying exception details.
- Ensured proper CAN bus shutdown in `python_enable_motor.py` with a `finally` block.
- Refactored `python_send_angle.py` to accept a command-line argument for the target angle instead of looping indefinitely.
- Refactored `python_send_velocity.py` to accept a command-line argument for target speed and removed infinite loops for better usability.
- Added `send_velocity_impulses.py`, a new script to send alternating velocity impulses over the CAN bus.
2025-02-04 13:41:05 +03:00
d5f772cb6d Adjust serial monitor speed and refine motor control logic
- Changed `monitor_speed` in `platformio.ini` from `115200` to `19200` for compatibility.
- Initialized `MotorControlInputs` struct members with default values.
- Uncommented digital write operations in `doMotor` for proper execution.
- Disabled debug output and monitoring configurations for cleaner operation.
- Adjusted motor tuning parameters by commenting out specific settings.
- Changed `Serial.begin(115200)` to `Serial.begin(19200)` in `setup()` to match the new monitor speed.
- Commented out `_delay(1000)` and `current_angle` variable to remove unnecessary delays and unused code.
2025-02-04 13:40:15 +03:00
47a87711d9 Add README file with instructions for CAN communication scripts
- 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.
2025-01-18 18:40:23 +03:00
51e8fac95a Add Python test scripts for CAN communication
- 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.
2025-01-18 18:34:05 +03:00
1534b854fc Refactor and enhance motor control implementation
- 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.
2025-01-18 18:28:56 +03:00
0199c1e38f Configure clang tools and update build settings
- 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.
2025-01-18 18:27:28 +03:00
328dd0e0aa Removed unnecessary fillets, surfaces, and construction elements from each part; Eliminated duplicate parts; Restructured file and folder organization. 2025-01-13 15:09:31 +00:00