n3roGit / DPVControl

Your DIY diving vehicle controlled by ESP32
GNU General Public License v3.0
4 stars 1 forks source link

[FEATURE] More Click Codes #8

Closed n3roGit closed 7 months ago

n3roGit commented 7 months ago

Add Click Codes for:

Switch 1 Switch 2 Function
1 Click 1 Click cruise control
2 Clicks 2 Clicks Boost Mode

Cruise control hold the actual speed till you press any button. Boost mode jump to max speed but only how long you hold the button while pressing. after one time driving in boost mode the speed goes back to old value. maybe its easier to implement "click click hold" to enable it easier than of 3 click

n3roGit commented 7 months ago

I've just tested cruise control. it's already working great! Please add that cruise control is also canceled if you press both buttons again. currently I have to press left or right.

happyherp commented 7 months ago

I've just tested cruise control. it's already working great! Please add that cruise control is also canceled if you press both buttons again. currently I have to press left or right.

I know. unfortunately that is very awkward to code. Technically, when you do anything, you leave cruise. So when you press down one lever, you already left. Then when you also click the other button at the same time, you enter cruise mode again.

happyherp commented 7 months ago

Check a79ccb645fc679210c0aa98de0e25ad2f29ecb95 for turbo mode. When in normal mode, do click-click-hold on both buttons at the same time. it should enter turbo mode and accelerate to 100% duty. until you let go of any of the buttons. then it returns to its normal speed.

n3roGit commented 7 months ago

almost perfect. the only thing missing is the setBarSpeed set to maximum during turbo. then we can merge

n3roGit commented 7 months ago

and maybe add that the boost stays on as long as you keep pressing at least one button. but that's just a nice to have.

happyherp commented 7 months ago

Both those things should work now. Try eab7424313f01328d96973a071e42a7cf1ae587f