mattjlewis / diozero

Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
https://www.diozero.com
MIT License
261 stars 59 forks source link

Trivial "copy-pasted" bug in DigitalMotor #37

Closed Sergeant007 closed 5 years ago

Sergeant007 commented 6 years ago

Constructor of DigitalMotor looks as:

    public DigitalMotor(GpioDeviceFactoryInterface deviceFactory, int forwardGpio, int backwardGpio) throws RuntimeIOException {
        forward = new DigitalOutputDevice(deviceFactory, forwardGpio, true, false);
        backward = new DigitalOutputDevice(deviceFactory, forwardGpio, true, false);
    }

backward should be initialized with backwardGpio

Sergeant007 commented 6 years ago

Created PR https://github.com/mattjlewis/diozero/pull/38 to address this

Sergeant007 commented 6 years ago

@mattjlewis , I saw the commit and believe this issue can be closed.