12 Jun
2020
12 Jun
'20
4:09 p.m.
I'd like to add a boolean metric for gas vehicles as a prelude to the phone apps having this info. Would this be ok? #define MS_V_MOT_GAS "v.m.gas" ms_v_mot_gas = new OvmsMetricBool(MS_V_MOT_GAS); The default to false. The other way would be via OvmsMetricInt and an enum (or defines): typedef enum : uint8_t { Battery = 0, Gasoline = 1, } metric_vehicle_t; #define MS_V_MOT_TYPE "v.m.type" ms_v_mot_type = new OvmsMetricInt(MS_V_MOT_TYPE); which would allow for more than two types. Craig