SRA-VJTI / sra-board-component

ESP-IDF component for SRA Board
https://sravjti.in/sra-board-component/
MIT License
36 stars 20 forks source link

Add support for Motor drivers #5

Closed VedantParanjape closed 3 years ago

VedantParanjape commented 3 years ago

Add support for motor drivers. Some points to consider while adding support ⚠️

1) Must handle Parallel and normal mode through code, rather than menuconfig. This can be done with functions like enable_parallel_mode() or passing parameters to enable_motor_driver(PARALLEL) function.

2) Declare a static variable which is set to 0 if motor driver is disabled, set to 1 if motor driver is enabled in parallel mode, and set to 2 if it is initialise in normal mode.

3) There must be helper method like, read_motor_driver_mode(), which will return the mode of the motor driver by reading the static variable defined above.

4) Functions should be abstract enough, don't define functions like bot_forward(), etc. We don't know for what purpose the motor is going to be used, functions like set_motor_speed() should be defined.

VedantParanjape commented 3 years ago

Completed in 213ae2f7165f70d4d53d17630f6bee5ad46a09bd