Bug in Bit Mode Channel Mapping? Doesn't work above 20?

Discussions on CAN mapping for ECUs, sensors, PDMs, and more.
Post Reply
GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Bug in Bit Mode Channel Mapping? Doesn't work above 20?

Post by GTIspirit »

Seems like there could be a bug in the Bit Mode Channel Mapping. Bits with offset >20 don't seem to work. The green highlighted bits work. I have toggled the ECU internal variables for lamctrl_b and oillamp_b and see the corresponding signals toggle in the RC Dashboard. The yellow highlighted ones don't seem to work. RC Track configuration file attached.

Yes, the raw values of 0x77A Byte 2 all work. With a simple 1:1 conversion I can toggle bits 4, 5, 6, 7 and see the physical value for that Byte change accordingly in the Dashboard.

And no, I didn't try Byte 3 yet, so I can't say if this is only limited to bit offset 21 to 24, or if also higher is affected.
Attachments
20191208.zip
RC Track configuration with CAN channel mapping. (Well, that's awkward. Can't directly upload .rcp files....)
(3.95 KiB) Downloaded 6 times
Description of bit states
Description of bit states
77A_FRM_snapshot.png (53.08 KiB) Viewed 382 times
CAN definition file snapshot
CAN definition file snapshot
77A_DBC_snapshot.png (24.29 KiB) Viewed 382 times

brentp
Site Admin
Posts: 5955
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi, sorry we missed this earlier.

To clarify, are you trying to map individual bits to 1/0 channel values?
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post by GTIspirit »

I'm trying to use the "Bit Mode" to map individual signal to a 0/1 bit flag. It's much more convenient than bitmasking the byte via Lua script. :)

It works up to 20. So oillamp_b work just fine. But mil_b, laptrig_b and lap_b don't work. It's like Offset >20 just doesn't work. I've tried both Little and Big Endian. And yes, I see the values change when I map the entire Byte 2. No signals mapped with Offset >20 work.
Attachments
Bit_Mode.png
Bit_Mode.png (153.99 KiB) Viewed 366 times

brentp
Site Admin
Posts: 5955
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Tracking here:

https://github.com/autosportlabs/RaceCa ... ssues/1070

What we will do to reproduce is to connect CAN1 and CAN2 in loopback, and then send data from CAN1 to CAN2 using Lua, and test for the expected behavior by using the direct mapping on CAN2.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post by GTIspirit »

Hi brentp, what did you find out? I assume you are able to reproduce it using Lua as CAN generator. Otherwise, I can send you a CAN trace in .csv format for playback.

brentp
Site Admin
Posts: 5955
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Sorry - no update yet. We will schedule looking at it in the next firmware update, hopefully out within the next month.

What you can do in the meantime is create a virtual channel + Lua mapping using the built-in bitwise operators.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Post by GTIspirit »

Hi @brentp how does this look? I assume you were able to replicate the bug. Because I don't think I yet reached the limit on number of CAN signals for the RC Track 2. When do you think this fix will be available?

brentp
Site Admin
Posts: 5955
Joined: Wed Jan 24, 2007 6:36 am

Re: Bug in Bit Mode Channel Mapping? Doesn't work above 20?

Post by brentp »

Still have it in the issue tracker, we'll see what we can do with it.

GTIspirit
Posts: 233
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Re: Bug in Bit Mode Channel Mapping? Doesn't work above 20?

Post by GTIspirit »

@brentp I figured it out. It's not that they don't work above 20, it's that the bit numbering is backwards.
viewtopic.php?f=38&t=6314

I'm hoping this is an easy fix, and you can get this updated right away since all you have to do is start counting from the other end ;)

P.S. so I think it was kind of dumb luck that I got some bits to work correctly by adding 1 to the offset.

Post Reply