commit e111a323f7e2568b269439e3fa72b1391468c822
parent 8bd67b2096b4abf52b94a35f4ff87450344eaa72
Author: Daniel Barlow <dan@telent.net>
Date: Wed, 6 Nov 2024 19:13:47 +0000
add cadence/power/hr to json
Diffstat:
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/Store.hs b/lib/Store.hs
@@ -61,9 +61,9 @@ toPoint entity =
in Point
pos
(trkptTime tkp)
- Nothing
- Nothing
- Nothing
+ (trkptCadence tkp)
+ (trkptPower tkp)
+ (trkptHeartRate tkp)
save p = do insert $ fromPoint p
diff --git a/lib/Track.hs b/lib/Track.hs
@@ -58,7 +58,10 @@ instance ToJSON Point where
toJSON Point {..} =
object
[ "pos" .= pos,
- "time" .= time
+ "time" .= time,
+ "cadence" .= cadence,
+ "power" .= power,
+ "heartRate" .= heartRate
]
-- TODO do we even need this type?