Coder Social home page Coder Social logo

addixon / ergcompetepm Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 1.98 MB

An application that polls data from a Concept2 Performance Monitor (PM), displays data on-screen, and optionally feeds the data to a SignalR Hub. Also allows workouts to be programmed onto the PM via SignalR messages, affording the ability to program via connection to Beyond the Whiteboard APIs or manual UI entry.

License: BSD 2-Clause "Simplified" License

C# 99.97% Shell 0.03%
concept2 performancemonitor pm5 pm3 csafe erg libusb libusbdotnet rowing performance-monitor

ergcompetepm's Introduction

ErgCompetePM

Built in .NET 5.0, this application establishes and maintains communication wtih a Concept2 PerformanceMonitor. Standard workout data is polled at minimum intervals and, if desired, forwarded to a listening SignalR hub.

This application leverages LibUsb (by means of LibUsbDotNet) and is therefore platform-independent. The PM3 libraries provided by CSAFE were dlls compiled for Windows only and for that reason were not compatible with my project.

Additionally, while many CSAFE and PM3 commands are not currently used in this application, they do exist and can be leveraged. Many SET commands include convenience constructors to allow a friendly invocation of them with their relevant data.

Known issues

At this time, the Runtime Identifiers do not seem to be respected. These are used in establishing the correct libusb library to use. A workaround is to manually specify the desired library based on OS in LibUsbDotNet.LibUsbDotNet.Generated.NativeMethods.cs

If a device is disconnected and then reconnected within the auto discovery window, any write command results in a Timeout. I intend to explore events instead of polling to get a faster read on when a device is disconnected, but a workaround is to lower the AutoDiscovery period.

Recognitions

In the process of converting this application from the PM3 libraries to a lower-level usb implementation, there were a few projects that helped provide insight into troubleshooting and communication standards. Those are:

Notes

This is one of my first attempts at device communication, so I am sure that there are many areas for improvement. This code is also in-development and there are many areas of cleanup that need to be performed left over from various iterations of experimentation in addition to some functionality being pulled into additional services. Exception handling throughout the project also needs to be improved and made consistent. That said, I do hope that it proves useful to someone who is wanting to integrate with a Performance Monitor via the CSAFE protocols.

ergcompetepm's People

Contributors

addixon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.