karoo-ride-replay — replay a recorded ride's data to test your extension (no ride needed)

Comments

3 comments

  • Avatar
    Lockevod

    It's a good extesion for developer, I use a lot .. many thanks

    2
    Comment actions Permalink
  • Avatar
    Luigi

    Thank you, Lockevod! Glad it's useful, and thanks again for the KPower pattern it's built on.

    v1.1.0 is out, with three changes for testing extensions:

    • Sensor dropouts: Power, HR, Cadence and Speed are now four separate virtual sensors (the post above still says one). Tap one in the Replay screen's sensor strip to cycle it through streaming, searching and missing, and the Karoo shows that sensor's status while the others keep streaming.
    • Replay data field: add Replay to a ride page to control playback from the ride screen. At full width it's a control bar with ‹10s, play/pause, 10s›, the time and the speed; at half width a tap plays or pauses.
    • Scripting over adb: load a FIT file, play, pause, seek, change speed and read the state from a laptop with adb shell am broadcast. Every command answers with the replay state, so tests can be scripted and repeated. Commands are in the README.

    The dropouts are Johannes Weytjens's work (jpweytjens on GitHub), and the field and the adb commands were his ideas. Thanks!

    Upgrading from v0.9.0-beta: remove the old Karoo Ride Replay sensor and pair Replay Power, Replay HR, Replay Cadence and Replay Speed.

    Release and APK: https://github.com/lgangitano/karoo-ride-replay/releases/latest
    README: https://github.com/lgangitano/karoo-ride-replay#readme

    Tested on a Karoo 3. Reports from Karoo 2 users are welcome.

    0
    Comment actions Permalink
  • Avatar
    Luigi

    Karoo Ride Replay v1.2.0 publishes the replayed ride's grade for other extensions. During a desk replay the Karoo's own grade stays near 0, because it comes from the barometer, and extensions can't publish it. Ride Replay now publishes the replayed grade as its own data type, so your extension can opt in to it during a replay:

    • Data type: TYPE_EXT::ride-replay::grade, in percent, positive uphill, under DataType.Field.SINGLE
    • One value per replayed record while a replay is open, and NotAvailable otherwise, so you can fall back to the Karoo's grade on a real ride
    • Source: the grade recorded in the FIT file, or computed from altitude and distance when the file has none

    There's also a Replay grade field you can add to a ride page.

    Thanks to lockevod (https://github.com/lockevod), author of KPower and KGhost, for the proposal and the review.

    Download: https://github.com/lgangitano/karoo-ride-replay/releases/latest
    Contract and consumer snippet: https://github.com/lgangitano/karoo-ride-replay#grade-for-other-extensions

    0
    Comment actions Permalink

Please sign in to leave a comment.