Hi Michael, Am 06.02.2013 13:10, schrieb mikeljo@mac.com:
witch bits is now what? My understanding is that the MSB is "FrontLeftDoor" and the LSB is "CarON".
My fault, I should have added a remark. The original bit values are documented in the "OVMS Protocol" document (environment message). "OVMS Development" adds: PIC18F is little endian, i.e. [...] Bit fields are packed right to left So, it's LSB first, 0x01 .. 0x80.
I think it is better to use the bits direct. Like this: car_doors1bits.ChargePort = 1
"Better" will be dependant on your concrete needs. I like to be able to access single bits like this due to better readability. But if you need to set or query a larger group of bits, the combined byte value will be more readable and perform better. Regards, Michael -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26