Page 1 of 1
Bug in Bit Mode Channel Mapping? Doesn't work above 20?
Posted: Mon Dec 09, 2019 11:46 pm
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.
Posted: Thu Feb 13, 2020 9:48 pm
by brentp
Hi, sorry we missed this earlier.
To clarify, are you trying to map individual bits to 1/0 channel values?
Posted: Sun Feb 23, 2020 5:48 pm
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.
Posted: Sun Feb 23, 2020 6:10 pm
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.
Posted: Fri Apr 10, 2020 6:43 pm
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.
Posted: Tue May 12, 2020 7:54 pm
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.
Posted: Tue Aug 11, 2020 11:06 am
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?
Re: Bug in Bit Mode Channel Mapping? Doesn't work above 20?
Posted: Thu Aug 13, 2020 4:17 am
by brentp
Still have it in the issue tracker, we'll see what we can do with it.
Re: Bug in Bit Mode Channel Mapping? Doesn't work above 20?
Posted: Sun Aug 16, 2020 12:59 pm
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.