thankthemaker / rESCue

rESCue - add more safety and control to your VESC based vehicle
GNU General Public License v3.0
104 stars 27 forks source link

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

Open guerradr opened 9 months ago

guerradr commented 9 months ago

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 commented 9 months ago

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.

https://github.com/thankthemaker/rESCue/assets/33477197/cae385dd-faef-42c1-b84c-a188a6ac5178

guerradr commented 9 months ago

Yeah its wierd. The startup sequence and battery indication work fine. But the footpad sensor indicatior did not show on the lightbar. Only when I downgraded to the stated version nr. did it work again for me. Do you need further info?Am 10.12.2023 10:34 schrieb ThankTheMaker @.***>: 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. https://github.com/thankthemaker/rESCue/assets/33477197/cae385dd-faef-42c1-b84c-a188a6ac5178

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

guerradr commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

Yes that seems so. I’m on the newest VESC 6.02 and I have the same behavior on the UBOX SINGLE 100V and the Raiden7. I have them wired up via CAN-BUS.

Von: ThankTheMaker @.> Gesendet: Donnerstag, 11. Januar 2024 16:40 An: thankthemaker/rESCue @.> Cc: guerradr @.>; Author @.> Betreff: Re: [thankthemaker/rESCue] lightbar footpad sensor VISUAL indications not working on 2.4.1 up to 2.5.4 (Issue #88)

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.

— Reply to this email directly, https://github.com/thankthemaker/rESCue/issues/88#issuecomment-1887439210 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AE6Y6KNF2EPCETGWIMO5S3DYOABWXAVCNFSM6AAAAABAJ3B3KKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBXGQZTSMRRGA unsubscribe. You are receiving this because you authored the thread. https://github.com/notifications/beacon/AE6Y6KNSRNTQ4F2LGPUPZK3YOABWXA5CNFSM6AAAAABAJ3B3KKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQQAEWU.gif Message ID: < @.> @.>

thankthemaker commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 2 months ago

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:

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