[Ovmsdev] i-Miev/C-Zero/iOn

Mark Webb-Johnson mark at webb-johnson.net
Thu Jan 23 20:11:51 HKT 2014


Michael,

Yep, that’s it.

Problem is OVMS_POLLER is a compile-time definition, so it must be shared by all cars in the configuration. I’ve re-worked it slightly to call the poll0 function even there is no poll list defined:

diff --git a/vehicle/OVMS.X/vehicle.c b/vehicle/OVMS.X/vehicle.c
index 9c1e9d9..a706bf1 100644
--- a/vehicle/OVMS.X/vehicle.c
+++ b/vehicle/OVMS.X/vehicle.c
@@ -295,15 +295,21 @@ void high_isr(void)
     can_databuffer[7] = RXB0D7;
     RXB0CONbits.RXFUL = 0; // All bytes read, Clear flag
 #ifdef OVMS_POLLER
-    if ((vehicle_poll_plist != NULL)&&
-        (can_id >= vehicle_poll_moduleid_low)&&
-        (can_id <= vehicle_poll_moduleid_high))
+    if (vehicle_poll_plist != NULL)
       {
-      if (vehicle_poll_poll0())
+      if ((can_id >= vehicle_poll_moduleid_low)&&
+          (can_id <= vehicle_poll_moduleid_high))
         {
-        vehicle_fn_poll0();
+        if (vehicle_poll_poll0())
+          {
+          vehicle_fn_poll0();
+          }
         }
       }
+    else
+      {
+      vehicle_fn_poll0();
+      }
 #else // #ifdef OVMS_POLLER
     vehicle_fn_poll0();
 #endif //#ifdef OVMS_POLLER

I hope this fixes it.

Thomas: Can you try to build this version (it is in github master now).

Regards, Mark.

On 23 Jan, 2014, at 4:29 pm, Michael Balzer <dexter at expeedo.de> wrote:

> Mark,
> 
> if the Mitsubishi code does not use the new polling hooks, poll0() will not be called if the polling code is compiled in.
> 
> I had the same problem for the Twizy, that's why I introduced the OVMS_POLLER compiler switch.
> 
> Regards,
> Michael
> 
> 
> Am 22.01.2014 02:18, schrieb Mark Webb-Johnson:
>> Thomas, 
>> 
>> Strange. So far, I see 4 cars using 2.6.2, but only one (presumably yours) is showing authentication errors.
>> 
>> I also can't see any changes to the vehicle_mitsubishi.c code that would cause poll0 to stop working. It is certainly working in other vehicle modules.
>> 
>> I'll keep looking, but would be grateful if you could try to narrow down the poll0 problem.
>> 
>> Regards, Mark.
>> 
>> On 22 Jan, 2014, at 5:00 am, Thomas Bergo <thomas.bergo at gmail.com> wrote:
>> 
>>> Mark,
>>> 
>>> Was testing the new 2.6.2 code on i-Miev today. 
>>> 
>>> Two observations:
>>> - Lots of restarts and "Vehicle authentication failed" messages in the iOS app 
>>> - No CAN bus messages form PID in poll0, while messages in poll1 is working OK.
>>> 
>>> Programmed the OVMS module with a version, and verified that the module was OK.
>>> 
>>> Regards, Thomas
>>> 
>>> 
>>> 2013/10/30 Thomas Bergo <thomas.bergo at gmail.com>
>>> Matt,
>>> 
>>> Please report back when you have done some testing on the QC.
>>> 
>>> If the car report 0A while QC, the current code will not detect that we are charging. So then we need to rely on the estimated range reported as 255 to detecting that the car is QC.
>>> 
>>> Regards, Thomas 
>>> 
>>> 
>>> 2013/10/30 Matt Beard OVMS <smvo at mxf.org.uk>
>>> Hi Thomas,
>>> 
>>> During QC you don't get valid values reported in 0x389 - it seems to be constant 255V, 0A during QC.
>>> 
>>> My code is relying on the fact that the estimated range only ever seems to be reported as 255 during QC (except for the first few messages at startup, but those are easy to filter out). In my testing so far this seems to work for detecting the start and end of QC. I am going to be doing 3 more tests today with my latest code and will report back later.
>>> 
>>> Matt
>>> 
>>> 
>>> 
>>> On 27 October 2013 20:13, Thomas Bergo <thomas.bergo at gmail.com> wrote:
>>> Hi Matt
>>> 
>>> I have started to look into the QC code. And i have one concern. 
>>> Have you seen if the voltage and charging current (PID 0x389) is reported during QC? 
>>> If not, we are not able to detect that the car is charging during QC with current code.
>>> 
>>> Thomas
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>> 
>> 
>> 
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk
>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
> 
> -- 
> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
> <dexter.vcf>_______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20140123/cb6fedec/attachment.htm>


More information about the OvmsDev mailing list