Inadequate explanation of "embedded in the parameter" for configuration commands

4 years 1 month ago #29534747 by LROBBINS
This is something I discovered when using SetConfig (_DOA, cc, aa) gave me an unexpected behavior, but I suspect that it applies to all paramters for which the manual says "Embedded in the parameter is the motor channel(s) to which the action should apply". For _DOA, the values listed for "aa" are 0 (no action), 1 (motor is on) etc., but if one does SetConfig (_DOA,cc,1) the profile will say action when "Motor is On", but no motor channel is indicated; pin cc actually does nothing at all. By using GetConfig (_DOA,cc) I found that the correct aa values for "Motor is On" are 17 (for channel 1), 33 (for channel 2), and 49 (for channels 1 & 2).

I'm not sure of the best way to summarize the syntax, but it is something like this:

aa = (1, 2, ....) + {0b1000 (channel 1)} + {0b10000 (channel 2) }, or in decimal aa = (1,2, ...) + {16} + {32}

I did notice that the manual does give a partial explanation of this for the serial syntax of AINA, but there too the scripting syntax is completely missing the channel specifiers and on top of that for the serial it says "48" means Motor 3 rather than Motor 1 and Motor 2.

Perhaps the manual could be edited a bit, but in the meantime some other users may be helped by having this information.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.046 seconds