Dafang-Hacks / rootfs

12 stars 18 forks source link

Motor app does not working on devices without endstops (Dafang) #13

Open danergo opened 4 years ago

danergo commented 4 years ago

In /etc/init.d/rcS there is a line:

Calibrate the motors for newer models without endstops:
motor calibrate

This goes into the /usr/scripts/common_functions.sh: /usr/bin/motor -d f -s "$steps"

However in motor_app/motor.c there is only 'l', 'r', 'u', 'd', 'v', 'h', 's' and 'c' options defined for -d.

So if I run the command it gives me an error:

/usr/bin/motor -d f -s 0
Invalid Driection Argument f
x: 0
y: 0
speed: 900

So there is no 'f'.

How can I calibrate the motors?

(There is a cruise method in motor.c, but it does not do anything for me)

There is absolutely nothing in either motor_app directory nor in the drivers/misc/sample_motor directory.

danergo commented 4 years ago

Okay, I have found the solution here: https://github.com/EliasKotlyar/Xiaomi-Dafang-Software

But this repo is clearly marked deprecated...