Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightbar footpad sensor VISUAL indications not working on 2.4.1 up to 2.5.4 #88

Open
guerradr opened this issue Dec 6, 2023 · 11 comments

Comments

@guerradr
Copy link

guerradr commented Dec 6, 2023

Hardware-Version: v3.1 (old board biggest one)

the lightbar footpad sensor VISUAL indications are not working on firmware versions 2.4.1 and up to 2.5.4

I reverted back to 2.3.3 and then they work.

@thankthemaker
Copy link
Owner

Could you please give me some details? What isn't working?
I just tested 2.5.4 with my board and indicators seem to work.

20231210_112941.mp4

@guerradr
Copy link
Author

guerradr commented Dec 10, 2023 via email

@guerradr
Copy link
Author

guerradr commented Jan 9, 2024

Here is a short video. Apparently it's hard to replicate the behaviour when switching firmware versions. Could it be that the eeprom settings are somehow retained when flashing new firmware?
https://youtu.be/6uUoVD5nSK8?si=3yO6029yzBX9r0gn

@thankthemaker
Copy link
Owner

thankthemaker commented Jan 11, 2024

Thanks for the video, it makes it much clearer. I'll check it again in the evening. Looks like pushing the left hand side gets recognized like an ADC-FULL while the right hand side is recognized as ADC-HALF, which is correct if only one side is pressed.

Maybe you could also check the ADC values and status in VESC tool. Maybe one ADC has too low tresholds or an higher idle value.

@guerradr
Copy link
Author

guerradr commented Jan 11, 2024 via email

@thankthemaker
Copy link
Owner

thankthemaker commented Jan 16, 2024

Did you find some time to check the values in VESC tool?

I tried to reproduce the behavior but wasn't successful. I still think something is wrong with your sensor / wiring.

@guerradr
Copy link
Author

Hi, the settings are fine in the VESC Tool. You can also see in the video that the board only activates when pressing both footpad sides down. I see the same behaviour on both of my boards (UBOX Single with rESCue light and Raiden 7 with rESCue s3). There is not much I can do wrong with my wiring since I'm can bus only and i have connection via VESC Phone App. Since I had different behaviours and indications when swapping between rESCue Software Versions - are there any setting values retained in the eeprom when flashing?
Maybe you can answer me another question not related to the lightbar. When I want to do the "Setup Motors FOC" via the rESCue bluetooth bridge (CAN-Bus only), I always get an error that it is unable to write the motor settings. However I can use the VESC App fine when changing settings in the motor and app configs. I always have to use an USB Cable for the initial motor config.

@thankthemaker
Copy link
Owner

Sorry for asking again. Could yous check which state is shown in VESC tool when pressing the pads?
There's nothing configured in rESCue itself, it just checks the state it gets from VESC. So it would be very helpful to know what the stat looks like in VESC.

@guerradr
Copy link
Author

I meant the footpad indicator configuration. When I use the rESCue App I sometimes had to save the config two or three times to have the whole configuration saved on the esp32. Thus seeing different behaviours between the saved configs. I used different phones to check if my app had a problem.
Here is a screen record of my VESC App showing correct behaviour of my footpads.
https://youtu.be/eR7gBGYLcno

@thankthemaker
Copy link
Owner

Thanks for the video. You're right. The behaviour in VESC tool looks as it should.
I have an idea what's going wrong, but I first have to try to reproduce the problem to fix the issue.
Thanks for your help!

@0x41kravchenko
Copy link

0x41kravchenko commented Jun 25, 2024

Hi guys! I had exactly same situation and after checking the logs I saw "Unknown switch state" log. The cause was that in vescData.switchState the value was 3 for fully activated footpads. After logging switchState and comparing output from VESC tool I got following relations:

  • switchState==0 - when adc1 and adc2 are both 0
  • switchState==1 - when adc1 is active
  • switchState==2 - when adc2 is active
  • switchState==3 - when adc1 and adc2 are both active
    Basically now (in relatively new VESC firmwares?) switchState fully corresponds to AdcState enum values, following code change confirmed it:
Screenshot 2024-06-25 at 17 52 25

But I'm not sure about old versions of VESC firmwares and whether 4th value (0,1,2,3) of switchState was added recently.
I have 6.2 CheapFOCer2.

UPD: Oh... I missed this switch statement in CanBus.cpp, so we receive 3 not from VESC but from this place:
https://github.com/thankthemaker/rESCue/blob/master/src/CanBus.cpp#L560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants