17 lines
316 B
Mojo
Generated
17 lines
316 B
Mojo
Generated
struct MotorHandle:
|
|
var motor_id: Int
|
|
|
|
def __init__(out self, motor_id: Int):
|
|
self.motor_id = motor_id
|
|
print("Acquired motor", self.motor_id)
|
|
|
|
|
|
def drive():
|
|
var handle = MotorHandle(0)
|
|
print("Driving with motor", handle.motor_id)
|
|
|
|
|
|
def main():
|
|
drive()
|
|
print("Scheduler idle")
|