Stephen Wille Padnos wrote:
> Sebastian Kuzminsky wrote:
>> I agree what's there now is a bit silly... I considered doing it like
>> you suggest, but decided against it. The reason why is that the config
>> info get told to the llio drivers but handled (exclusively) by the
>> generic hostmot2 driver. These things get passed to hm2_register() by
>> the llio init functions. Having a single argument seems simpler and
>> more flexible than having five (currently) different ones, and changing
>> all the llios whenever the set of config parameters changes. The llios
>> dont know and they dont care, and i like that.
>>
>>
> It's the individual board drivers that have to validate that data anyway
> (right?). Even if it isn't, it's a heck of a lot easier to copy an
> array of ints than it is to scan for strings, do proper error checking
> (which it isn't doing right now - what happens if you have
> "num_stepgens=z2"?), and then put the numbers in the master structure
> anyway. Might as well just copy numbers from several arrays of ints
> into an array of structs.
The board-drivers dont even look at the config string, they pass it to
the generic hostmot2 driver and *it* does all the processing, in
hm2_parse_config_string().
>> My plan is to eventually add a field to the config parameter like
>> "stepgen=on,off,on:width=2", which would mean: enable stepgen.00,
>> disable stepgen.01, and enable stepgen.02 and make it just 2 bits wide
>> (instead of the default 6). Similar for pwmgen and encoder.
>>
> That could work, but you could also have an array of
> stepgen_width=-1,-1,2 (or possibly ,,2 - I don't know if you can leave
> out the ones you don't want to explicitly change).
That wont work, stepgen_width would have to be a two-dimensional array,
one dimension indexed by board number and the other by stepgen number on
that board.
--
Sebastian Kuzminsky
Theo: "Julian? I haven't seen you in twenty years. You look good.
The picture the police have of you doesn't do you justice."
Julian: "What do the police know about justice?"
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers