@@ -28,15 +28,15 @@ func (d *bts7960) Forward(ctx context.Context) error {
28
28
"mode" : "out" ,
29
29
}).Infoln ("Open the pin" )
30
30
forwardPWM := rpio .Pin (d .forwardPWM )
31
- forwardPWM .Ouput ()
31
+ forwardPWM .Output ()
32
32
33
33
// Open the forwardEnable and set OUT mode
34
34
logrus .WithFields (logrus.Fields {
35
35
"pin_number" : d .forwardEnable ,
36
36
"mode" : "out" ,
37
37
}).Infoln ("Open the pin" )
38
38
forwardEnable := rpio .Pin (d .forwardEnable )
39
- forwardEnable .Ouput ()
39
+ forwardEnable .Output ()
40
40
41
41
// Set the motor rotation
42
42
logrus .Infoln ("Set the motor rotation" )
@@ -76,15 +76,15 @@ func (d *bts7960) Backward(ctx context.Context) error {
76
76
"mode" : "out" ,
77
77
}).Infoln ("Open the pin" )
78
78
reversePWM , err := rpio .Pin (d .reversePWM )
79
- reversePWM .Ouput ()
79
+ reversePWM .Output ()
80
80
81
81
// Open the reverseEnable and set OUT mode
82
82
logrus .WithFields (logrus.Fields {
83
83
"pin_number" : d .reverseEnable ,
84
84
"mode" : "out" ,
85
85
}).Infoln ("Open the pin" )
86
86
reverseEnable := rpio .Pin (d .reverseEnable )
87
- reverseEnable .Ouput ()
87
+ reverseEnable .Output ()
88
88
89
89
// Set the motor rotation
90
90
logrus .Infoln ("Set the motor rotation" )
@@ -124,15 +124,15 @@ func (d *bts7960) Stop() error {
124
124
"mode" : "out" ,
125
125
}).Infoln ("Open the pin" )
126
126
forwardEnable := rpio .Pin (d .motor1B )
127
- forwardEnable .Ouput ()
127
+ forwardEnable .Output ()
128
128
129
129
// Open the backwardEnable and set OUT mode
130
130
logrus .WithFields (logrus.Fields {
131
131
"pin_number" : d .backwardEnable ,
132
132
"mode" : "out" ,
133
133
}).Infoln ("Open the pin" )
134
134
backwardEnable := rpio .Pin (d .backwardEnable )
135
- backwardEnable .Ouput ()
135
+ backwardEnable .Output ()
136
136
137
137
// Set to LOW
138
138
logrus .Infoln ("Stop the motor" )
0 commit comments