9 lines
260 B
Mojo
9 lines
260 B
Mojo
def make_drive[num_motors: Int]() -> Int:
|
|
# The drive train must pair motors across an even motor count.
|
|
comptime assert num_motors % 2 == 0, "num_motors must be even"
|
|
return num_motors * 64
|
|
|
|
|
|
def main():
|
|
print("Drive slots:", make_drive[7]())
|