packages feed

obd 0.2.1.0 → 0.2.1.1

raw patch · 3 files changed

+5/−2 lines, 3 files

Files

obd.cabal view
@@ -1,5 +1,5 @@ name:                obd-version:             0.2.1.0+version:             0.2.1.1 synopsis:            Communicate to OBD interfaces over ELM327 description:     Haskell library to communicate with OBD-II over ELM327,
src/System/Hardware/ELM327/Connection.hs view
@@ -147,7 +147,7 @@                 >>= (`orThrow` ConOBDError (OBDDecodeError NotEnoughBytesError)) . hexToBytes                 >>= (`orThrow` ConOBDError (OBDDecodeError NoResponseHeaderError)) . stripHeader -    statusPrefixes = ["SEARCHING..."]+    statusPrefixes = ["BUS INIT: OK", "SEARCHING..."]     removeStatusPrefixes x = foldl stripPrefix' x statusPrefixes     stripPrefix' x pref = fromMaybe x (stripPrefix pref x)     stripHeader = stripPrefix [0x40 + obdMode cmd, obdPID cmd]
src/System/Hardware/ELM327/Errors.hs view
@@ -10,6 +10,7 @@  -- | Error messages sent by the ELM327 when issuing OBD commands data OBDErrorMessage = UnableToConnect+                     | BusInitError                      | NoData                      deriving (Eq, Show) @@ -18,9 +19,11 @@ obdErrorMessage = prism' conv mConv   where     conv UnableToConnect = "UNABLE TO CONNECT"+    conv BusInitError = "BUS INIT: ... ERROR"     conv NoData = "NO DATA"      mConv "UNABLE TO CONNECT" = Just UnableToConnect+    mConv "BUS INIT: ... ERROR" = Just BusInitError     mConv "NO DATA" = Just NoData     mConv _ = Nothing