Closed tipouic closed 5 years ago
tipouic, Thank you for your contribution.
I looked at your changes and I have been thinking about your use case and I now see that there is this use case, and others that I had never considered. I am thinking of an even more generalized approach to solving this.
The other things I an thinking about is multi engine setups with differential thrust would have more than one throttle channel, so the hard coded throttle setting I put in for safety really would not apply to the second throttle channel, or if the user re-mapped the throttle to a different channel, then channel 3 fail-safe could not be set.
I am also thinking about your use case - what if the mid throttle needs to be trimmed slightly above or below 1500 for the motor to fully stop.
What I am thinking of is to remove the hard coded fail-safe values for throttle and allow it to be set just like all the other channels. This could be an alternate mode of operation to the current hard coded fail-safe value.
I also would like this to be configurable instead of using a pre-compile variable to control this behavior. That way a RX could be moved to a different model without re-flashing. There is one bit left available in the option byte that could be used to when setting fail-safe values to to override the hard coded fail-safe throttle default and switch into the alternate mode of accepting the value from the TX.
What are your thoughts on this?
Pour mon cas précis, ça ne pose pas de problème car je vais intégrer l'ESC dans le récepteur (ce qui supprime le jeu posible) et pour l'instant les seules idées de bateaux que je veux faire utilisent 1 moteur de propulsion et pour l'étrave.
Si on veut pouvoir déplacer le récepteur d'un model à un autre, je pense qu'il vaut mieu faire un nouveau mode afin de régler cette valeur de sécurité car moi je vois au moins 3 cas posible avec un seule moteur :
Par contre, pour être bien, il faudrai que les données servo ne soit donné que quand la sécurité est valide afin d'éviter le vérouillage de ESC brushless sur la valeur de FAILSAFE ou que le moteur brushed se mette en route si son neutre ne correspond pas à celle-ci.
En parralèle, je travail aussi sur le portage du code TX sur un autre projet de multiprotocole NRF24l01 (https://github.com/goebish/nrf24_multipro) mais avec un fonctionnement simplifié car je n'aurai pas d'écran car il sera monté sur une nunchuck.
Sorry for the delay getting back to this, other aspects of life got in the way for a while I had to run your last post through a translator, so I may not have understood everything.
Here is my plan:
Have 2 modes for failsafe:
1) Use current behavior where Throttle is always forced LOW and all other channels can be configured to whatever the user desired (default is MID)
2) Allow all channels to be configured by the user. Throttle will default to LOW and all others will default to MID, but upon setting the failsafe values, the Throttle channel will be set to whatever the user desires.
The mode will be controlled by a bit in the OPTION byte (there is currently one un-used bit)
I decided to implement this in a little bit simpler way. There is now a #define in rx.h called THROTTLE_DISARM_VALUE where the throttle off value is set.
Thanks for your addition. I am going to close this particular pull request, but I took the spirit of your change.
Add a option for control a ESC with reverse. Fixed failsafe to get ALL customizable values.