Csafe_pm_get_horizontal != Csafe_gethoriz...
Found this one momentarily confusing and was wondering if it was intended or not. You can easily replicate it with the PM3 API Demo:<br /><br />Set PM3 to Pre-programmed workout #1 - the loathsome 2K test:<br /><br />Send CSAFE CMD "0xA1" (CSAFE_GETHORIZONTAL_CMD)<br />Receive: A1 03 00 00 24 -> 0 meters<br /><br />Send CSAFE CMD "0x1A 0x01 0xA3' (CSAFE_PM_GET_WORKDISTANCE)<br />Receive: '1A 07 A3 05 20 4E 00 00 00' -> 2000 meters<br /><br />I was/am hoping the former command is meant to return the 2000m version of how far I've gone (if you begin rowing the CSAFE_GETHORIZONTAL_CMD will tell you how many meters you have gone, whereas the CSAFE_PM_GET_WORKOUTDISTANCE matches what is on the PM3 screen and reports how many meters are left).<br /><br />My goal is to fetch everything I'm interested in about the current workout in a single transaction with the PM3. To this end I am trying to keep the receive buffer's potential size under the max (taking into account all of the byte stuffing and such that must be subtracted from what otherwise seems like a lot of room). <br /><br />In short - is this what is intended?<br /><br />PM3 at FW 90 (but about to go 92B for the fish game - perhaps I should have checked that first?).
CSAFE_GETHORIZONTAL_CMD is the PM3's implementation of CSAFE's cmdGetHorizontal. It's specified by CSAFE to be the accumulated distance of the current workout and so it has to follow that format. It's limited to two bytes of data that represent an arbitrary unit.<br /><br />The CSAFE_GET_WORKDISTANCE is a Concept2 CSAFE extension command and so C2 has full reign to specify the format. I believe that it's main purpose is to extend the available horizontal distance resolution without compromising range. Specifically, it has four bytes of storage and it's response is always is decimeters (0.1 meter). <br /><br />It just so happens that C2 chose to return the value displayed by the monitor, rather than always the accumlated distance. I say always, because if you were rowing a JustRow rather than a programmed workout, I would assume that it would accumulate much like GETHORIZONTAL.<br /><br />Maybe Mark or Scott can shed some light as to why this choice was made. (if they have any rationale other than simply trying to match the monitor)<br /><br />The primary reason to use the Concept2 extension command is the higher resolution over an extended range. If the resolution isn't needed, then you can save a few transmission bytes. I'd personally recommend trying to keep the command and response within the 62-byte report format, if possible. Although I believe the current version of the SDK always sends 120-byte reports, it should be well over twice as fast when sending 62.<br /><br />Mike