GithubHelp home page GithubHelp logo

Comments (4)

fingolfin avatar fingolfin commented on June 26, 2024

Note that the comment above the function explicitly states that it begins at the LSB, not at the MSB. I.e. this was intentional done. And with your proposed change in isolation, the other send() method as well as sendTriState(), would be left broken.

Since you don't mention those, I assume this means you are using send() directly?

Anyway, looking at the code, I see now that I got it wrong: I thought the old behaviour was to start at LSB, but it wasn't. It didn't help that the expected behavior of send() was not documented anywhere that I could find (not even on the Wiki).

In any case, I'll change it to work the other way around again. Thanks for reporting this!

Still: ARGH! I find it extremly weird to start at the MSB! But since that is how the code used to behave, of course it should stay like that for backwards compatibility.

from rc-switch.

rotv avatar rotv commented on June 26, 2024

Yeah, I noticed that. Didn't have time at the moment for a full on solution. Regarding MSB/LSB in the code I guess it's just design, but my remotes for sure wants the MSB order :) I had to look at the signals and compare to old screendumps to figure out why it wasn't working and then it was clear what was going wrong.

from rc-switch.

fingolfin avatar fingolfin commented on June 26, 2024

This is a bit offtopic, but: I am not sure what you mean with "your remotes want MSB order" -- first off, the order we send bits has nothing to do with the order we store them. Secondly, and more importantly, for the "encoding types" A-D we support, no actual integer values are encoded, so I don't see how one could talk about an LSB / MSB there. I guess if something was sending a value that had a natural range from 0 to N (say a rotary dial... or a temperature sensor...), then we could discuss where the LSB and MSB are in that signal, but for simple switches?!? :-)

Anyway, I hope this resolves the issue for you. If not, please reopen!

from rc-switch.

rotv avatar rotv commented on June 26, 2024

True. I was thinking of my previously recorded decimal codes and that the wrong bit order produced a lot of 1-0:s in the signal, which can't be expressed by the TriState letters.

from rc-switch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.