packages icon indicating copy to clipboard operation
packages copied to clipboard

Enable serial moduls for luasockets

Open PhracturedBlue opened this issue 1 year ago • 1 comments

Maintainer: @flyn-org Compile tested: ath79/generic OpenWRT 23.05.3 Run tested: ath79/generic OpenWRT 23.05.3 Description: Includes the serial module for luasockets (which is already being built) in the final package. This allows using socket.select() on a serial port (eg /dev/ttyACM0) which is the easiest way to use a serial-port with coroutines. For instance copas can now be used via:

local copas = require("copas")
local serial = require("socket.serial")

copas.addthread(function()
        tty = copas.wrap(serial("/dev/ttyACM0"))
        l, e = tty:receivepartial()
        while not e do
                print(">" .. l)
                l, e = tty:receivepartial()
        end
end)
copas()

PhracturedBlue avatar Jul 05 '24 16:07 PhracturedBlue

Looks good. Recommend merge.

flyn-org avatar Jul 05 '24 17:07 flyn-org

@PhracturedBlue Can you please increase the PKG_RELEASE number.

feckert avatar Jul 08 '24 13:07 feckert

@PhracturedBlue Can you please increase the PKG_RELEASE number.

Done, Thanks.

PhracturedBlue avatar Jul 08 '24 14:07 PhracturedBlue

There is missing commit description. It needs to be added or copy&pasted from the pull request.

BKPepe avatar Jul 09 '24 12:07 BKPepe

There is missing commit description. It needs to be added or copy&pasted from the pull request.

Done.

PhracturedBlue avatar Jul 09 '24 13:07 PhracturedBlue