thomas.bergo at gmail.com
Sun Sep 22 05:13:17 HKT 2013
Thanks to you all for participate.
Managed to spend some time on this project yesterday and this this evening.
Yesterday i was able to fix the ODO. And thanks to Matt i was able test the
SOC, ideal range and Charge state.
Added the battery temperature reading form Matt's code.
My car is reporting range and ODO in Km, so added support to handle both
miles and Km for ODO and Range based on can_mileskm.
*"To receive all 0x3nn messages we could use filter SID 0x300 and mask
0x700, but I am worried that may cause a flood of messages."*
The current code runs with this filter and mask, ans seems to be stable so
Still see some errors with the ideal range and the temperature reading. The
app is reporting PEM: -125C, Motor: 144C and Battery: 5C
Pushed the code with updates from Matt to GitHub.
2013/9/21 Michael Jochum <mikeljo at mac.com>
> You can only set the Mask and Filter in a Configuraton Mode.
> From Datasheet:
> 23.3.1 CONFIGURATION MODE
> The CAN module has to be initialized before the activation. This is only
> possible if the module is in the Configuration mode. The Configuration mode
> is requested by setting the REQOP2 bit. Only when the status bit, OPMODE2,
> has a high level can the initial- ization be performed. Afterwards, the
> Configuration registers, the Acceptance Mask registers and the Acceptance
> Filter registers can be written. The module is activated by setting the
> REQOP control bits to zero.
> The module will protect the user from accidentally violating the CAN
> protocol through programming errors. All registers which control the
> configuration of the module can not be modified while the module is on-
> line. The CAN module will not be allowed to enter the Configuration mode
> while a transmission or reception is taking place. The Configuration mode
> serves as a lock to protect the following registers:
> • ConfigurationRegisters
> • FunctionalModeSelectionRegisters • BitTimingRegisters
> • IdentifierAcceptanceFilterRegisters • IdentifierAcceptanceMaskRegisters
> • FilterandMaskControlRegisters
> • MaskSelectionRegisters
> In the Configuration mode, the module will not transmit or receive. The
> error counters are cleared and the interrupt flags remain unchanged. The
> programmer will have access to Configuration registers that are access
> restricted in other modes.
> I don't believe that it will work without bad sideeffects.
> Am 21.09.2013 um 11:32 schrieb Matt Beard OVMS <smvo at mxf.org.uk>:
> I may also try modifying the RX0 mask during the 1-second poll so that it
> cycles through filtering a single SID each time, meaning that it will take
> 4 seconds for a full update. I don't think this will be an issue as none of
> this data is fast changing.
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OvmsDev