Page 1 of 1
Posted: September 8th, 2005, 1:09 pm
by [old] Daren C
Using the SDK and CSAFE commands to set the horizontal work distance, I can sat it to, say, 8642m without a problem. However, if I try to set it to 250m, I get an error. Is there a minimum distance for a programmed workout? I know that when programming a distance manually the PM3 says it's 100m, and "Table 18 - Workout Configuration Parameter Limits" also says 100m, so 250m should be OK, shouldn't it?<br /><br />I've tried setting the splits to 0m as well, so I don't think the problem is that my splits are larger than the distance.<br /><br />The error code is <b>Code 65 -35</b>. <br /><br />Here's my code:<br /><br /><!--c1--><table width='95%' cellspacing='1' cellpadding='3' border='0' align='center'><tr><td><b><div class='genmed'>CODE</div></b></td></tr><tr><td class='code'><div><!--ec1--><br />cmd_data_size = 0;<br />cmd_data[cmd_data_size++] = (uint)CSAFE.CSAFE_SETHORIZONTAL_CMD;<br />cmd_data[cmd_data_size++] = 0x03;<br />cmd_data[cmd_data_size++] = (uint) (dlg.TargetDistance & 0xFF);<br />cmd_data[cmd_data_size++] = (uint)((dlg.TargetDistance >> 8) & 0xFF);<br />cmd_data[cmd_data_size++] = (uint)CSAFE.CSAFE_UNITS_METER; <br />cmd_data[cmd_data_size++] = (uint)CSAFE.CSAFE_SETPROGRAM_CMD;<br />cmd_data[cmd_data_size++] = 0x02;<br />cmd_data[cmd_data_size++] = 0x00;<br />cmd_data[cmd_data_size++] = 0x00;<br />cmd_data[cmd_data_size++] = (uint)CSAFE.CSAFE_GOINUSE_CMD;<br /><br />tkcmdsetCSAFE_command(0, cmd_data_size, cmd_data, ref rsp_data_size, rsp_data);<br /><!--c2--></div></td></tr></table><br />
Posted: September 8th, 2005, 1:30 pm
by [old] rspenger
[quote=Daren C,Sep 8 2005, 10:09 AM]<br />Using the SDK and CSAFE commands to set the horizontal work distance, I can sat it to, say, 8642m without a problem. However, if I try to set it to 250m, I get an error. Is there a minimum distance for a programmed workout? I know that when programming a distance manually the PM3 says it's 100m, and "Table 18 - Workout Configuration Parameter Limits" also says 100m, so 250m should be OK, shouldn't it?<br /><br />I've tried setting the splits to 0m as well, so I don't think the problem is that my splits are larger than the distance.<br /><br />The error code is <b>Code 65 -35</b>. <br /><br />Have you tried a number of meters divisible by 4, like 248 or 252? I get the impression that the new (i.e. C and D) ergs are designed to regard a split as a quarter of whatever time or distance you have set. Perhaps they cannot accept numbers, like 250, that are not evenly divisible by 4. I can't test this out since my model B with a PM1 doesn't have splits.<br /><br />Bob S.<br />
Posted: September 8th, 2005, 2:20 pm
by [old] Daren C
Thanks for the idea, Bob. I tried 256 to no avail, and I've also been able to set distances like 3333, so I don't think that's it.
Posted: September 8th, 2005, 2:21 pm
by [old] mlyons
Daren,<br /><br />You've identified a bug in the Beta PM3 firmware. When we opened the public interface to allow configuring of workouts via public CSAFE, we added a function to attempt to "validate" workout parameters before actually configuring the workout. This feature hasn't gotten much use so there was some incorrect logic in determining whether the WORKOUTDURATION/SPLITDURATION exceeded the maximum number of splits allowed by the PM3 (30).<br /><br />This has been fixed and will be available in the next Beta release probably next week. If you have an immediate need then send me a personal message w/ an email address and I'll send you an early copy.<br /><br />Thanks for the help.<br /><br />Mark
Posted: September 8th, 2005, 2:24 pm
by [old] Daren C
Ah, cool. Thanks for the reply, Mark. There's no immediate need as I can just assume that things will work as I wish and use larger distances for now, so I'll wait for the next beta release. Thanks again.