I copy pasted this from that other thread about endless mode.
— begin copy/paste
I modified the FireFly Nano software to include an “endless” mode. Here is how that works:
- Enable it through the menu on the remote.
- Push 13 km/h+ for 2 seconds
- The board goes into cruise control. This means that the speed will be kept at which yoh were after pushing faster than 13 km/h for 2 seconds. E.g. the hardest you can push is your max cruise speed.
- The board will cruise for 20 seconds
- The board will go into “coasting” mode, waiting to slow down till the speed is lower than 13 km/h.
- You can push to activate cruise again, step 1.
While this is activated you still use your remote, telemetry and the current state “cruise”, “pushing”, “coasting” is visible. But, you can’t push thw throttle. When you brake the board disables cruise immediatly and goes into coasting and brakes as hard as you push the brakes.
Speeds and times can be adjusted ofcourse, stoppihg because of a “current spike” activated by a foot on the ground is also possible.
— end copy/paste, begin of what I just added
This way the remote must always be connected and is the master override to be able to brake. This works using ADC + UART or UART only.
To get something like mellow I think you’d need to make a custom app config, BUT I have a different idea that might work but I am kinda frightened to try out:
So now when a speed is reached cruise turns on and after some time it turns off again. What if I were to modulate the cruise channel on the vesc instead of hard on / off. (Am I doing PWM here? I think so.) I am scared to try this out because I don’t want to fry my og focbox and don’t know what cruise control modulation (essentially PID speed control turning on and off a lot) will do.
So if the cruise control turns off and on again multiple times a second, it will probably slow down because it is not constantly on. My hope here is that you will also be able to push some more to bring the speed up again. I also wouldn’t know if the on/off modulation of cruise control will be noticeable while riding.