EliasKotlyar / Xiaomi-Dafang-Hacks

4.16k stars 1k forks source link

Remember last position or start at middle of x and y #1851

Open dbuezas opened 1 year ago

dbuezas commented 1 year ago

At the moment the only way to move the camera down or left after starting up is to first go to the far top right first and then keep going further. Since the camera is most likely left pointing at the center anyway, it would be great for that to be the default.

Alternatively, just allowing to rotate infinitely in any direction. I'm willing to do it myself if you give me a pointer to which bash or c file to look at :)

jmtatsch commented 1 year ago

Rotating Indefinitely isn’t an option as it will wind up a cable.Am 08.05.2023 um 20:14 schrieb David Buezas @.***>: At the moment the only way to move the camera down or left after starting up is to first go to the far top right first and then keep going further. Since the camera is most likely left pointing at the center anyway, it would be great for that to be the default. Alternatively, just allowing to rotate infinitely in any direction. I'm willing to do it myself if you give me a pointer to which bash or c file to look at :)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

dbuezas commented 1 year ago

My camera (dafang3) has hardware stops, so I could make it configurable (if i get a pointer to where the limits are set)

jmtatsch commented 1 year ago

Maybe you want something like this https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/beta/firmware_mod/config/userscripts/startup/calibratePTZ.sh.dist ?

dbuezas commented 1 year ago

Yes thanks! I'll take a look at this. This seems to be to drive back to the last position after calibrating (by going to the extremes and back to the center) It looks like the one keeping track of where it think it is is motor.bin, I don't see if there is a way to tell it where I want it to think it is.