-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate raw data from hex code #1703
Comments
IRremoteESP8266/test/IRutils_test.cpp Lines 165 to 206 in 31432b4
|
From the resultToSourceCode() function, I understood that the rawData is not the rawbuf in decode_results structure. |
Yes, No, kind of.
IRremoteESP8266/src/IRrecv.cpp Line 133 in 31432b4
Line 37 in 31432b4
There is some other "magic" done to massage the rawbuf data to rawData's format, namely because you can't fit values > 65535 (usecs) into a rawData ( The conversion/compensation is done in the code as follows: (The code is the best explanation if you can follow it) IRremoteESP8266/src/IRutils.cpp Lines 265 to 280 in 31432b4
or IRremoteESP8266/src/IRutils.cpp Lines 419 to 429 in 31432b4
or IRremoteESP8266/test/IRsend_test.h Lines 89 to 100 in 31432b4
Yes, |
Thanks for the detailed explanation, couple of more questions:
|
If you're getting
Yes. For some protocols we need to be able to capture/record marks/spaces that are longer than 66ms (66000us). We don't use |
Usage: tools/code_to_raw --protocol PROTOCOL_NAME --code <hexidecimal> [--bits 1-424] [--timinginfo] e.g. ``` # Convert an A/C code to rawData[] & Timinginfo tool/code_to_raw --protocol KELVINATOR --code 0x190B8050000000E0190B8070000010F0 --timinginfo # Convert a Samsung TV code to rawData[]. tools/code_to_raw --protocol SAMSUNG --code 0xE0E09966 # Convert a Sony 12 bit message to rawData[]. tools/code_to_raw --protocol Sony --code 0xf50 --bits 12 ``` For #1707 For #1703
* Add tool to convert protocol & code to raw timing info. Usage: tools/code_to_raw --protocol PROTOCOL_NAME --code <hexidecimal> [--bits 1-424] [--timinginfo] e.g. ``` # Convert an A/C code to rawData[] & Timinginfo tool/code_to_raw --protocol KELVINATOR --code 0x190B8050000000E0190B8070000010F0 --timinginfo # Convert a Samsung TV code to rawData[]. tools/code_to_raw --protocol SAMSUNG --code 0xE0E09966 # Convert a Sony 12 bit message to rawData[]. tools/code_to_raw --protocol Sony --code 0xf50 --bits 12 ``` * Add some tests for `code_to_raw`. * Update tools Makefile to be more dynamic For #1707 For #1703 Co-authored-by: Christian Nilsson <[email protected]>
@Nakul93 How are you going with this? Can we mark this issue resolved now? |
_v2.8.1 (20220101)_ **[Bug Fixes]** - Arduino ESP32 Core v2.0.2+ crashes due to our timer hack. (#1715 #1715) - SONY: Fix old Sony CD-Player Remote (12 Bit) (#1714) **[Features]** - Add tool to convert protocol & code to raw timing info. (#1708 #1707 #1703) - Add basic support for COOLIX48 protocol. (#1697 #1694) - MITSUBISHI_AC: Added support for i-SAVE mode. (#1666) - TOSHIBA_AC: Add Filter setting support. aka. Pure. (#1693 #1692) - Airton: Add detailed A/C support. (#1688 #1670) **[Misc]** - Add a structured library version number. (#1717) - Workflows Split UnitTests (#1712) - Reduce time for workflow/Build (#1709) - Fix some compiler & linter warnings (#1699 #1700) - Fujitsu: Update supported A/C models (#1690 #1689 #1702 #1701) - Remove extra `const` qualifier for char pointer (#1704) - TCL: Update supported devices. (#1698) - ESP32-C3: Work around for some C3 specific compiler issues. (#1696 #1695)
## _v2.8.1 (20220101)_ **[Bug Fixes]** - Arduino ESP32 Core v2.0.2+ crashes due to our timer hack. (#1715 #1713 ) - SONY: Fix old Sony CD-Player Remote (12 Bit) (#1714) **[Features]** - Add tool to convert protocol & code to raw timing info. (#1708 #1707 #1703) - Add basic support for COOLIX48 protocol. (#1697 #1694) - MITSUBISHI_AC: Added support for i-SAVE mode. (#1666) - TOSHIBA_AC: Add Filter setting support. aka. Pure. (#1693 #1692) - Airton: Add detailed A/C support. (#1688 #1670) **[Misc]** - Add a structured library version number. (#1717) - Workflows Split UnitTests (#1712) - Reduce time for workflow/Build (#1709) - Fix some compiler & linter warnings (#1699 #1700) - Fujitsu: Update supported A/C models (#1690 #1689 #1702 #1701) - Remove extra `const` qualifier for char pointer (#1704) - TCL: Update supported devices. (#1698) - ESP32-C3: Work around for some C3 specific compiler issues. (#1696 #1695)
Marking closed due to no response in approx 1 month. |
I am trying to use rmt module from esp-idf and was able to receive raw data(raw timings) from it, in order for matching the protocols I have the hex codes for each control(which is unique).
Is there a way where we can generate the raw data (raw timings) from hex (hash) code so that I can send data.
eg: for GREE
convert:
code: 0x09072050002000C0
to:
uint16_t rawData[139] = {9048, 4422, 706, 1616, 674, 474, 726, 524, 650, 1642, 676, 514, 684, 496, 702, 524, 652, 550, 672, 1616, 674, 1620, 650, 1644, 652, 522, 676, 520, 702, 516, 682, 524, 676, 522, 652, 518, 702, 498, 678, 548, 652, 546, 676, 524, 676, 1620, 674, 476, 700, 520, 704, 524, 674, 524, 652, 548, 678, 522, 652, 1616, 676, 548, 676, 1620, 676, 522, 676, 524, 652, 1642, 676, 498, 700, 19896, 706, 526, 676, 522, 678, 520, 678, 520, 680, 522, 676, 494, 706, 520, 678, 520, 678, 520, 680, 518, 680, 520, 682, 516, 684, 516, 682, 1582, 712, 512, 684, 516, 686, 512, 684, 514, 684, 514, 684, 514, 684, 514, 686, 514, 684, 514, 684, 514, 684, 516, 682, 516, 684, 516, 682, 518, 682, 516, 680, 494, 704, 1586, 708, 1588, 706}; // GREE
The text was updated successfully, but these errors were encountered: