[Ovmsdev] Tesla Powered RAV4 EV support
Stephen Casner
casner at acm.org
Sat Jul 3 13:00:43 HKT 2021
On Fri, 2 Jul 2021, Michael Iimura wrote:
> However, I got stuck when populating those metrics into the web
> page. The compiler throws this error for each of my new metrics:
>
> L:/OVMS/home/miimura/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/vehicle_toyotarav4ev/src/vehicle_toyotarav4ev.cpp:
> In static member function 'static void
> OvmsVehicleToyotaRav4Ev::WebCooling(PageEntry_t&, PageContext_t&)':
> L:/OVMS/home/miimura/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/vehicle_toyotarav4ev/src/vehicle_toyotarav4ev.cpp:100:50:
> error: invalid use of member
> 'OvmsVehicleToyotaRav4Ev::m_v_bat_cool_in_temp' in static member function
> c.printf("<p>Battery Coolant Inlet: %.1f C</p>",
> m_v_bat_cool_in_temp->AsFloat());
That error is straightforward. You can only reference non-static
member variables in an object when you have a pointer or reference to
that object. Static member functions are called without referencing
any object, so the processor would not know where to find the member
variable.
-- Steve
More information about the OvmsDev
mailing list