Steering Wheel CAN Switches - Assigning to a Function

I have the wireless steering wheel kit. Connected 4 x non-latching switches.

I have paired to the receiver. Switches work as they should in Light Client.

Have loaded the CANX file in ADU. Switches work as they should in “edit CANbus input” page.

My question - how do i assign a CAN switch to a function? How do i assign S1 to a_nextpage?

To use analogue and digital switches you choose an input e.g. A1, but obviously it’s different for CAN switches.

I have 4 analog switches connected via an ADC (so you get 1V / 2V / 3 V / 4V / 5V depending on which switch you press) which is exposed via a CAN input channel (BUTTONS_ADC11).

I have made functions for each of the buttons that detect when the BUTTONS_ADC11 is in the correct voltage range (e.g. 3V +/- 0.2V) and then under Configuration > Buttons > xxx - channel I choose the function the for button I want assigned (e.g. f_btn_up and f_btn_dn).

I struggled a bit to get it to work, for two reasons:

  1. The “divisor” and “Decimal places” are dividing your input cumulative. The BUTTONS_ADC11 is a 16bit signed number in mV, but putting divisor=1000 and Decimal places=3 made the ADU think the voltage was in uV, not mV. Only use divisor when Decimal places isn’t scaling the number the correct way.
  2. To get the buttons to go to the next/previous page, the engine has to be running(!). I only figured this out yesterday. Maybe there’s a way around this.

Hope this helps.

Thanks. Now i’m completely lost!

I’m assuming the CAN buttons can be assigned much the same as digital or analogue switches..

Odd that engine has to be running for next/previous page. Not doubting, but are you sure? It doesn’t for non-CAN switches. How does the ADU know if the engine is running or not?

rf-receiver.zip (692 Bytes)

Here is the Canx file for wireless Kit

Yes, pretty sure - see the screenshot with analog switch voltage, the f_btn_* functions, and the rpm. I can get the mode button to work, but that’s because I can pick up the resulting ECU mode from another CAN input (WORKMODE_ACTIVE). @Matthias_avp posts are more on-the-money for you.

As for why the ADU needs the engine to run, beats me. I have sent the info to tech support but Maciej is busy with high priority requests so it’ll take him some time before he can get back to me. Maybe it’s just a matter of a default configuration option that I’m not aware of.

And apologies if I’m confusing you. I thought that getting a working example (even from analog switches) would help.

I checked your project, and since the symptoms you described sound impossible, I looked deeper - and indeed, you have an incorrect configuration of the page up/down buttons. Change the trigger to “press” instead of “click”.

Was this in reply to me? I’ve tried both “press” and “click” before, I’ll change to “press” and test again tonight.

According to the manual:
“Click – function activated by quickly pressing and releasing a button”

Based on the log you sent me via email: both the down/up events that didn’t trigger the page change were longer than 500ms - this is the threshold for triggering the button in Click mode. Every single button up event that triggered the page change was shorter than this threshold - those clicks were quick. It works as expected.

500ms :open_mouth: okay, that’s far longer than I would have expected for a quick press. Definitely changing them tonight.

The ECU can detect far quicker presses - as I recall the standard setup in the ECU says 25ms for adjusting the traction control factor up/down via the buttons. Long presses (e.g. 2-5 seconds) are used for zeroing the suspension pots.

@mfudala_ECUMASTER Tested out “Press” yesterday evening - worked like you said it would :slight_smile:

Thanks for your help!

Thanks everyone. Sorted! I already had the CANX imported and the switches working. Now i have my functions working.

As an aside everything works on the bench including next/previous page. No engine running.

Hi.
Would you be willing to share your project file? I’m tinkering with an ADU and a rotary switch myself and can’t get it to work. I’ve tried the suggestions that have been posted here.