gpmf 0.2.0.0 → 0.2.1.0
raw patch · 2 files changed
+13/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ GoPro.DEVC: gpsReadings :: Getter DEVC [GPSReading]
Files
- gpmf.cabal +2/−2
- src/GoPro/DEVC.hs +11/−1
gpmf.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 24504bd0c6a2f98e24691ae35f802bb3853a60ac635490e54c21fb1db4ea89e7+-- hash: f160be98f2fa906a7a80caa675e20a38ee8842e82278601da4c16f6ced885a30 name: gpmf-version: 0.2.0.0+version: 0.2.1.0 description: Please see the README on GitHub at <https://github.com/dustin/gpmf#readme> homepage: https://github.com/dustin/gpmf#readme bug-reports: https://github.com/dustin/gpmf/issues
src/GoPro/DEVC.hs view
@@ -22,7 +22,7 @@ Accelerometer(..), acc_temp, acc_vals, Gyroscope(..), gyro_temp, gyro_vals, Face(..), face_id, face_x, face_y, face_w, face_h, face_smile,- GPSReading(..), gpsr_lat, gpsr_lon, gpsr_alt, gpsr_speed2d, gpsr_speed3d, gpsr_time, gpsr_dop, gpsr_fix,+ GPSReading(..), gpsr_lat, gpsr_lon, gpsr_alt, gpsr_speed2d, gpsr_speed3d, gpsr_time, gpsr_dop, gpsr_fix, gpsReadings, AudioLevel(..), audio_rms, audio_peak, Location(..), _Snow, _Urban, _Indoor, _Water, _Vegetation, _Beach, TVals(..), _TVUnknown, _TVAccl, _TVGyro, _TVFaces, _TVGPS5, _TVGPS9, _TVAudioLevel, _TVScene,@@ -131,6 +131,16 @@ deriving Show makeLenses ''DEVC++-- | Get the best GPS readings from a DEVC.+-- This will attempt to return any TVGPS9 readings,+-- but will fall back to GPS5 readings if available.+gpsReadings :: Getter DEVC [GPSReading]+gpsReadings = to (foldr f [] . _dev_telems)+ where+ f (Telemetry _ _ _ (TVGPS9 v)) _ = v+ f (Telemetry _ _ _ (TVGPS5 v)) [] = v+ f _ o = o -- | Given a FourCC value (specifically, DEVC) and a list of Values, -- produce a DEVC value.