I ran into a little snag that took a few years off my life yesterday (until I fixed it, at which time I got those years back - mostly) because I'm planning to rely pretty heavily on RPC.
I'd be curious to see if anyone can repeat it. In luarpc do something like this slv = rpc.connect( your serial device here ) slv.data = { [13] = 1 } data = slv.data:get() =data[13] I found that the setup of the serial port on my linux machine was very politely translating that 13 to 10 (\r -> \n), so data[13] was nil and data[10] was 1. I had to add a ICRNL to the c_iflag (this by judicious googling) in serial_posix.c At any rate, I can create a pull request if needed, or someone else could add it (though I'd be tickled to have a contribution to the project). Matt
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Nice one.
Quite a subtle bug! I just tryed this on mac os and it works as expected ( i.e. =data[13] returns 1 ). I then added the ICRNL and it works the same. Do a pull request. ;) -- Thiago On Wed, Mar 21, 2012 at 9:43 AM, Matt Wilbur <[hidden email]> wrote:
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Markus Korber |
In reply to this post by Matt Wilbur
Thus spake Matt Wilbur:
> I found that the setup of the serial port on my linux machine was very > politely translating that 13 to 10 (\r -> \n), so data[13] was nil and > data[10] was 1. > > I had to add a ICRNL to the c_iflag (this by judicious googling) in > serial_posix.c Are you using the master branch since this should already be fixed there? https://github.com/elua/elua/commit/e823c8d3fcedf6908bfc5a1e92f9139849667355 Regards, Markus Korber _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
On Thursday, 22 March, 2012 at 2:20 AM, Markus Korber wrote:
I have updated to the head of the mater branch. The commit you point to is for the RFS server. I'm looking at the RPC client code. Perhaps there is duplication here that should be eliminated. Matt
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Merged.
-- Thiago On Thu, Mar 22, 2012 at 8:35 AM, Matt Wilbur <[hidden email]> wrote:
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |