Skip to content

Commit

Permalink
Update pwm_pin.go
Browse files Browse the repository at this point in the history
changed so the SetPeriod uses the value from the parameter
  • Loading branch information
Jwen98 authored Sep 25, 2023
1 parent ba8136f commit 856d711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/jetson/pwm_pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (p *PWMPin) SetPeriod(period uint32) error {
if period < minimumPeriod {
return errors.New("Cannot set the period more then minimum")
}
if err := p.writeFile(fmt.Sprintf("pwm%s/period", p.fn), fmt.Sprintf("%v", p.period)); err != nil {
if err := p.writeFile(fmt.Sprintf("pwm%s/period", p.fn), fmt.Sprintf("%v", period)); err != nil {
return err
}
p.period = period
Expand Down

0 comments on commit 856d711

Please sign in to comment.