Skip to content

How can I convert from uint16_t rawData to uint8_t state? #1885

Answered by crankyoldgit
Damix48 asked this question in Q&A
Discussion options

You must be logged in to vote

There is no direct method to convert a "RAW" message representation into a state[] for a given protocol.
You can have a look at code that does this in the tools directory. i.e. gc_decode.cpp

It does this by simulating sending the raw data, and capturing it, and then decoding it.
i.e. it prepares all the data the way IRrecv::decode() expects, and then decode() does the rest, and provides the state[] array in the result.

With a little bit more data massaging, you could directly call the specific decode you want. e.g. IRrecv::decodeFujitsuAC()

I'd strongly suggest against using "RAW" data format if you can avoid it. It's long, huge, and as you're finding out, needs to be decoded if you want …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Damix48
Comment options

@Damix48
Comment options

Answer selected by Damix48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants