Hi Mark, Or anyone out there that can help. This is the D message.
D 92,0,0,28,29,23,0,0,0,13281,-127,3,60,-1,14.2,0,0.0,16
The first byte is 92 decimal and 0101 1100 binary. In my build this value can be 3 (0000 0011), or 64 (0100 0000). This first byte should correspond to cardoors1 byte. Now which one is bit nr. 5 that is always supposed be 1? Or how do I find which bit is bit nr.7? Nikolay
hi Nikolay,
The comments on the struct definition tell you which bits are which. From ohms.h:
typedef struct { unsigned FrontLeftDoor:1; // 0x01 unsigned FrontRightDoor:1; // 0x02 unsigned ChargePort:1; // 0x04 unsigned PilotSignal:1; // 0x08 unsigned Charging:1; // 0x10 unsigned :1; // 0x20 unsigned HandBrake:1; // 0x40 unsigned CarON:1; // 0x80 } car_doors1bits_t;
I don't know why bit 5 needs to always be on. It's not for the roadster. Here's a sample D record from my car:
D 128,0,3,48,75,30,310,390213,21,0,33,2,119,120,12.8,161,11.4,0
As you can see, the first byte has only the high bit (CarON) set.
Another record shows (97 = 0x61) the car is off, the front left door is open, the handbrake is on, and the unnamed bit is set. I guess we haven't figured out what the unnamed bit means.
D 97,0,3,39,61,27,191,390093,0,332,32,2,120,119,12.8,33,11.4,0
Tom
On 6/16/14, 12:50 PM, "Nikolay Shishkov" <nshishkov@yahoo.com> wrote:
Hi Mark, Or anyone out there that can help. This is the D message. D 92,0,0,28,29,23,0,0,0,13281,-127,3,60,-1,14.2,0,0.0,16 The first byte is 92 decimal and 0101 1100 binary. In my build this value can be 3 (0000 0011), or 64 (0100 0000). This first byte should correspond to cardoors1 byte. Now which one is bit nr. 5 that is always supposed be 1? Or how do I find which bit is bit nr.7? Nikolay _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
participants (2)
-
Nikolay Shishkov -
Tom Saxton