Closed rananna closed 3 years ago
ok - looking
ok.... now I can see how I might be affecting your walk assist state! :)
Right - I'll go back to doing what I suggested in about my third post yesterday. I'll set a flag to track whether walk assist was actually pressed locally - and only process it if so.
if I comment out the following
void walk_assist_state(void) { // kevinh - note on the sw102 we show WALK in the box normally used for BRAKE display - the display code is handled there now if (ui_vars.ui8_walk_assist_feature_enabled) { // if down button is still pressed if (ui_vars.ui8_walk_assist && buttons_get_down_state()) { // ui8_walk_assist_timeout = 2; // 0.2 seconds } else if (buttons_get_down_state() == 0 && --ui8_walk_assist_timeout == 0) { // led_release_queue(); // ui_vars.ui8_walk_assist = 0; } } else { //ui_vars.ui8_walk_assist = 0; } }
pressing plus on your remote increase walk speed.
I think the speed adjustment needs to be a part of the Android app, so we can set it globally for use with both remotes.
there's nothing in that code that changes the walk assist level - oh i see - ok let me look
oh no that's expected - because walk assist level increases with assist level no? Don't see that as a problem - it's how it is supposed to work.
And it won't do it if you have the button depressed - so a moot point surely. The issue only occurs because you've commented out the code that handles that button press properly...
i.e. does it increase walk speed if you're holding down - then click up?
OK, but how do you bring the speed down if the minus button needs to be held to keep walk assist going?
i don;t understand.. my speed doesn't change when I use walk assist...
walk assist level is based on assist level - plus increases assist level - so also increases walk assist level.
What am I missing? :)
It's probably me not getting it, as I never used walk mode on the older firmware. OK to play back how I now think it is intended to work:
have I got it right?
yes that;s my understanding too
What's not happening?
OK, user error on my part. it is probably working fine. once you add the flag for the external command, I will test again with that new understanding. sorry to be so dense about this....
ah no problem :)
i thought i was going crazy about walk_assist_state - until i realised we weren't looking at the same code :)
I am mystified why there was the timeout happening though.....hopefully that was part of the same user error also... ;)
another mystery -why is github reporting you up to date when you are missing this PR?
because I don't know how to use github - well - also I can't work out whether upstream-master or latest is the most recent. I think it changed recently...
ok - be back in a hour - and will then make the change to only process walk assist locally if pressed on wired buttons
Since I remember, for walk assist on the configurations we set a PWM value for each assist level, then the motor firmware just set that fixed PWM. So the idea is just to turn on or off the walk assist from the display / TSDZ2 wireless.
Ok - PR submitted - i can't test as I don't have a remote - but seems to still work for me...
@casainho , I have removed the unwanted icon in the lower right from the garmin display. @4var1 , the walk mode signal from the wireless remote is a simple on/off flag, when MINUS is held down ui_vars.ui8_walk_assist = 1;, when released, ui_vars.ui8_walk_assist = 0. My expectation is that walk assist comes on when MINUS is pressed and held down, and stops when the button is released. All walk assist settings should be handled by the android app.
That is not how it is currently working, as I think you have integrated walk assist levels with button changing, and the walk assist is timing out after a few seconds. Could you please have a look at this?