Only set the posit_count parameter on motors that need to drive to discrete positions.

This commit is contained in:
Ferdi Franceschini
2015-02-05 17:00:34 +11:00
parent e8601615e6
commit fae83b3d9e
2 changed files with 5 additions and 21 deletions

View File

@@ -140,9 +140,11 @@ proc mk_motconf {mot fh absEnc posnum posit_list} {
puts $fh " maxAccel \$$maxAccel\\"
puts $fh " maxDecel \$$maxDecel\\"
puts $fh " stepsPerX \$$stepsPerX\\"
puts $fh " posit_count $posnum\\"
foreach positline $::posit_list {
puts $fh " $positline\\"
if {$posnum > 0} {
puts $fh " posit_count $posnum\\"
foreach positline $::posit_list {
puts $fh " $positline\\"
}
}
if {$absEnc} {
puts $fh " absEnc 1\\"