packages feed

lifx-lan 0.5.1 → 0.5.1.1

raw patch · 3 files changed

+25/−14 lines, 3 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Lifx.Internal.Product: instance GHC.Classes.Eq Lifx.Internal.Product.Features
+ Lifx.Internal.Product: instance GHC.Classes.Ord Lifx.Internal.Product.Features
+ Lifx.Internal.Product: instance GHC.Generics.Generic Lifx.Internal.Product.Features
+ Lifx.Lan: instance GHC.Classes.Eq Lifx.Lan.Product
+ Lifx.Lan: instance GHC.Classes.Ord Lifx.Lan.Product
+ Lifx.Lan: instance GHC.Generics.Generic Lifx.Lan.Product

Files

lifx-lan.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               lifx-lan-version:            0.5.1+version:            0.5.1.1 license:            BSD-3-Clause license-file:       LICENSE author:             George Thomas
src/Lifx/Internal/Product.hs view
@@ -3,6 +3,7 @@  import Data.Text (Text) import Data.Word (Word16, Word32)+import GHC.Generics (Generic)  data VendorInfo = VendorInfo     { vid :: Word32@@ -35,18 +36,28 @@     deriving (Show)  data Features = Features-    { hev :: Bool-    , color :: Bool-    , chain :: Bool-    , matrix :: Bool-    , relays :: Bool-    , buttons :: Bool-    , infrared :: Bool-    , multizone :: Bool-    , temperatureRange :: Maybe (Word16, Word16)-    , extendedMultizone :: Bool+    { -- | The light supports emitting HEV light+      hev :: Bool+    , -- | The light changes physical appearance when the Hue value is changed+      color :: Bool+    , -- | The light may be connected to physically separated hardware (currently only the LIFX Tile)+      chain :: Bool+    , -- | The light supports a 2D matrix of LEDs (the Tile and Candle)+      matrix :: Bool+    , -- | The device has relays for controlling physical power to something (the LIFX Switch)+      relays :: Bool+    , -- | The device has physical buttons to press (the LIFX Switch)+      buttons :: Bool+    , -- | The light supports emitting infrared light+      infrared :: Bool+    , -- | The light supports a 1D linear array of LEDs (the Z and Beam)+      multizone :: Bool+    , -- | An array of the minimum and maximum kelvin values this device supports. If the numbers are the same then the device does not support variable kelvin values. It is null for devices that aren't lighting products (the LIFX Switch)+      temperatureRange :: Maybe (Word16, Word16)+    , -- | The more capable extended API for multizone control that lets us control all the zones on the device with a single message instead of many.+      extendedMultizone :: Bool     }-    deriving (Show)+    deriving (Eq, Ord, Show, Generic)  data Upgrade = Upgrade     { major :: Word16
src/Lifx/Lan.hs view
@@ -682,9 +682,9 @@     , productId :: Word32     , features :: Features     }-    deriving (Show)+    deriving (Eq, Ord, Show, Generic) --- | Ask a device for it's vendor and product ID, and look up info on it from the official database.+-- | Ask a device for its vendor and product ID, and look up info on it from the official database. getProductInfo :: MonadLifx m => Device -> m Product getProductInfo dev = do     StateHostFirmware{..} <- sendMessage dev GetHostFirmware