leguno-remote
leguno-remote copied to clipboard
Help to adapt your code to use physical joystick
I successfully used your library with the 4x4 model. Thank you it works great !
I now try to use a old USB remote with your project.
I am able to monitor the input but I am not sure where to modify your code to take them into account. Would you be so kind to point me the good direction @hoharald ?
Thank you so much in adavance ! Martin
Hi Martin,
There is an methode called controllSpeedAndDirection there you go.
You need to update the logic for speedChanged and directionChanged.
Read your controller values and scale them. You might also adjust a treshhold like i did for the GYRO angles.
Have a look at the speed and the direction_target_position variables and how the are calculated to get an idea for your joystick implementation.
These both values are send to the HUB. Have a look for... TechnicHubMessageBuilder::createPortOutput... in the cotrolSpeedAndDirection methode.
Regards, Harald
-------- Ursprüngliche Nachricht -------- Von: Martin Erpicum [email protected] Datum: 22.01.21 19:32 (GMT+01:00) An: hoharald/leguno-remote [email protected] Cc: hoharald [email protected], Mention [email protected] Betreff: [hoharald/leguno-remote] Help to adapt your code to use physical joystick (#3)
I successfully used your library with the 4x4 model. Thank you it works great !
I now try to use a old USB remote with your project.
I am able to monitor the input but I am not sure where to modify your code to take them into account. Would you be so kind to point me the good direction @hoharaldhttps://github.com/hoharald ?
Thank you so much in adavance ! Martin
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/hoharald/leguno-remote/issues/3, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEK2LHL7ZE22ZG2YFDI2HD3S3HACDANCNFSM4WO36EXQ.