kafka-device-spacenav 0.2.1.0 → 0.2.1.2
raw patch · 3 files changed
+42/−16 lines, 3 filesdep −lineardep −milenadep ~aesondep ~binarydep ~bytestringPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: linear, milena
Dependency ranges changed: aeson, binary, bytestring, cereal, kafka-device, yaml
API changes (from Hackage documentation)
- Network.UI.Kafka.SpaceNav.Interpretation: spacenavLoop :: Interpretation Double -> IO (ExitAction, LoopAction)
+ Network.UI.Kafka.SpaceNav.Interpretation: spacenavLoop :: Interpretation FilePath Double -> IO (ExitAction, LoopAction)
Files
- kafka-device-spacenav.cabal +11/−13
- sample.yaml +28/−0
- src/Network/UI/Kafka/SpaceNav/Interpretation.hs +3/−3
@@ -1,5 +1,5 @@ name: kafka-device-spacenav-version: 0.2.1.0+version: 0.2.1.2 synopsis: Linux SpaceNavigator events via a Kafka message broker description: This package contains functions for passing Linux device events from a SpaceNavigator \<<http://www.3dconnexion.com/products/spacemouse/spacenavigator.html>\> to topics on a Kafka message broker \<<https://kafka.apache.org/>\>. Also see \<<https://hackage.haskell.org/package/kafka-device/>\>. license: MIT@@ -13,9 +13,10 @@ stability: Experimental homepage: https://bitbucket.org/functionally/kafka-device-spacenav bug-reports: https://bwbush.atlassian.net/projects/HKAFDEV/issues/-package-url: https://bitbucket.org/functionally/kafka-device-spacenav/downloads/kafka-device-spacenav-0.1.5.0.tar.gz+package-url: https://bitbucket.org/functionally/kafka-device-spacenav/downloads/kafka-device-spacenav-$version.tar.gz extra-source-files: ReadMe.md+ sample.yaml source-repository head type: git@@ -27,14 +28,13 @@ System.Hardware.Linux.Input System.Hardware.Linux.SpaceNav build-depends: base >= 4.8 && < 5- , aeson- , binary- , bytestring- , cereal- , kafka-device- , milena+ , aeson >= 0.11.3+ , binary >= 0.7.2+ , bytestring >= 0.10.6+ , cereal >= 0.5.4+ , kafka-device >= 0.2.1.2 hs-source-dirs: src- ghc-options: -O2 -Wall+ ghc-options: -Wall default-language: Haskell2010 executable kafka-device-spacenav@@ -45,9 +45,7 @@ , bytestring , cereal , kafka-device- , linear- , milena- , yaml+ , yaml >= 0.8.22 hs-source-dirs: src- ghc-options: -O2 -Wall+ ghc-options: -Wall default-language: Haskell2010
+ sample.yaml view
@@ -0,0 +1,28 @@+kafka :+ client : spacenav-interpretation+ address : [localhost, 9092]+ topic : events+sensor : spacenav+device : /dev/input/spacenavigator+xAxis :+ axisNumber: 0+ increment : 0.020+yAxis :+ axisNumber: 1+ increment : 0.020+zAxis :+ axisNumber: 2+ increment : 0.020+phiAxis :+ axisNumber: 3+ increment : 0.020+thetaAxis :+ axisNumber: 4+ increment : 0.020+psiAxis :+ axisNumber: 5+ increment : 0.020+location : [0, 0.5, 0]+orientation : [0, 0, 0]+flying : false+resetButton : 1
@@ -27,8 +27,8 @@ -- | Interpret events from a Linux SpaceNav.-spacenavLoop :: Interpretation Double -- ^ Instructions for interpretation.- -> IO (ExitAction, LoopAction) -- ^ Action to create the exit and loop actions.+spacenavLoop :: Interpretation FilePath Double -- ^ Instructions for interpretation.+ -> IO (ExitAction, LoopAction) -- ^ Action to create the exit and loop actions. spacenavLoop interpretation@TrackInterpretation{..} = do let@@ -36,7 +36,7 @@ analogHandler _ = Nothing buttonHandler SpaceNavButton{..} = Just (number, pressed) buttonHandler _ = Nothing- spacenav <- openFile path ReadMode+ spacenav <- openFile device ReadMode (exit, loop) <- interpretationLoop analogHandler buttonHandler interpretation $ interpretSpaceNav <$> hGet spacenav byteLength