- websocket source may want to implement a timeout on Get/Set/GetRanged calls and reply with success=false
- enable ssl on websocket by default with option to turn it off
- investigate and enable use of provisioning in ssl websockets
+- improve tryParse in OBD2source
+
supportedPidsList.push_back(new FuelConsumptionPid());
supportedPidsList.push_back(new EngineCoolantPid());
supportedPidsList.push_back(new AirIntakeTemperaturePid());
+ supportedPidsList.push_back(new EngineLoadPid());
+ supportedPidsList.push_back(new ThrottlePositionPid());
}
~Obd2Amb()
}
};
+class EngineLoadPid: public CopyMe<EngineCoolantPid>
+{
+public:
+ EngineLoadPid()
+ :CopyMe(VehicleProperty::EngineLoad,"01041/r",0x04)
+ {
+
+ }
+
+ bool tryParse(ByteArray replyVector)
+ {
+ ByteArray tmp = compress(cleanup(replyVector));
+
+ if (tmp[1] != id)
+ {
+ return false;
+ }
+
+ int load = tmp[2]*100.0/255.0;
+
+ value = boost::lexical_cast<std::string>(load);
+ return true;
+ }
+};
+
+class ThrottlePositionPid: public CopyMe<ThrottlePositionPid>
+{
+public:
+ ThrottlePositionPid()
+ :CopyMe(VehicleProperty::ThrottlePosition,"01111/r",0x11)
+ {
+
+ }
+
+ bool tryParse(ByteArray replyVector)
+ {
+ ByteArray tmp = compress(cleanup(replyVector));
+
+ if (tmp[1] != id)
+ {
+ return false;
+ }
+
+ int load = tmp[2]*100.0/255.0;
+
+ value = boost::lexical_cast<std::string>(load);
+ return true;
+ }
+};
+
#endif