Skip to content

Commit

Permalink
New protocols NEC-Yamaha and NEC1-Yamaha (from Graham).
Browse files Browse the repository at this point in the history
  • Loading branch information
bengtmartensson committed Jun 27, 2021
1 parent faf66a5 commit 2aa21ab
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 14 deletions.
39 changes: 38 additions & 1 deletion src/main/resources/IrpProtocols.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ ordering is not required but it improves the readability of the entry.
xmlns:rm="https://sourceforge.net/projects/controlremote/files/RemoteMaster"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2021-06-15"
version="2021-06-27"
xsi:schemaLocation="http://www.harctoolbox.org/irp-protocols http://www.harctoolbox.org/schemas/irp-protocols.xsd"
xmlns:irp="http://www.harctoolbox.org/irp-protocols">

Expand Down Expand Up @@ -1454,6 +1454,24 @@ C3=D:1:2 + #(F&44) + #(D&2)
<irp:documentation xml:space="preserve">The <a href="#NEC-Shirriff">NEC-Shirriff</a> protocol with payload length set to 32, making it viable for decoding.</irp:documentation>
</irp:protocol>

<irp:protocol name="NEC-Yamaha">
<irp:irp>
<![CDATA[{38.4k,564}<1,-1|1,-3>(16,-8,D:8,S:8,F:8,E0:1,~F:6:1,E7:1,1,^108m) {E0=(~Y:1:1)^(F:1),E7=(~Y:1)^(F:1:7)}[D:0..255,S:0..255=255-D,F:0..255,Y:1..3]]]>
</irp:irp>
<irp:documentation xml:space="preserve">Variant of the <a href="#NEC1">NEC1</a> protocol with the checksum in byte 4 different
(complement all of F except the MSB).
</irp:documentation>
<irp:parameter name="prefer-over">NEC-f16</irp:parameter>
<irp:parameter name="prefer-over">NEC1-f16</irp:parameter>
<irp:parameter name="prefer-over">NEC2-f16</irp:parameter>
<irp:parameter name="prefer-over">NECx1-f16</irp:parameter>
<irp:parameter name="prefer-over">NECx2-f16</irp:parameter>
<irp:parameter name="prefer-over">NEC-Shirriff-32</irp:parameter>
<irp:parameter name="uei-executor">011A:JP1[D?0,S?0,D?1,S?1,D?2,S?2,D?3,S?3;F,??,,Y]</irp:parameter>
<irp:parameter name="uei-executor">01AD[;D,S,F:8,(~F:8)^(128*Y:1|Y:1:1)]</irp:parameter>
<irp:parameter name="uei-executor">01BA[D,S;F:8,(~F:8)^(128*Y:1|Y:1:1)]</irp:parameter>
</irp:protocol>

<irp:protocol name="NEC1">
<!--irp:parameter name="prefer-over">NEC1-f16</irp:parameter-->
<!--irp:parameter name="frequencyTolerance">100</irp:parameter>
Expand Down Expand Up @@ -1532,6 +1550,25 @@ C3=D:1:2 + #(F&44) + #(D&2)
<irp:parameter name="uei-executor">01AD[;D,S,F,~(((F:4)&lt;&lt;4)|F:4:4):8]</irp:parameter>
</irp:protocol>

<irp:protocol name="NEC1-Yamaha">
<irp:irp>
<![CDATA[{38.4k,564}<1,-1|1,-3>(16,-8,D:8,S:8,F:8,E0:1,~F:6:1,E7:1,1,^108m,(16,-4,1,^108m)*) {E0=(~Y:1:1)^(F:1),E7=(~Y:1)^(F:1:7)}[D:0..255,S:0..255=255-D,F:0..255,Y:1..3]]]>
</irp:irp>
<irp:documentation xml:space="preserve">Variant of the <a href="#NEC1">NEC1</a> protocol with the checksum in byte 4 different
(complement all of F except the MSB).
</irp:documentation>
<irp:parameter name="prefer-over">NEC-f16</irp:parameter>
<irp:parameter name="prefer-over">NEC1-f16</irp:parameter>
<irp:parameter name="prefer-over">NEC2-f16</irp:parameter>
<irp:parameter name="prefer-over">NECx1-f16</irp:parameter>
<irp:parameter name="prefer-over">NECx2-f16</irp:parameter>
<irp:parameter name="prefer-over">NEC-Yamaha</irp:parameter>
<irp:parameter name="prefer-over">NEC-Shirriff-32</irp:parameter>
<irp:parameter name="uei-executor">011A:JP1[D?0,S?0,D?1,S?1,D?2,S?2,D?3,S?3;F,??,,Y]</irp:parameter>
<irp:parameter name="uei-executor">01AD[;D,S,F:8,(~F:8)^(128*Y:1|Y:1:1)]</irp:parameter>
<irp:parameter name="uei-executor">01BA[D,S;F:8,(~F:8)^(128*Y:1|Y:1:1)]</irp:parameter>
</irp:protocol>

<irp:protocol name="NEC2">
<!--irp:parameter name="prefer-over">Pioneer</irp:parameter-->
<irp:irp>
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/harctoolbox/irp/IrpDatabaseNGTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void testGetMatchingNamesRegexp() {
System.out.println("getMatchingNamesRegexp");
String regexp = "NEC.*";
List<String> result = instance.getMatchingNamesRegexp(regexp);
assertEquals(result.size(), 14);
assertEquals(result.size(), 16);
result = instance.getMatchingNamesRegexp("RC6.*");
assertTrue(result.contains("rc6-6-32"));
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/teaserfiles/NEC-f16.exp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Left: NEC1-f16: {D=134,E=114,F=2,S=228}, beg=0, end=75, reps=2
Right: NEC1-f16: {D=134,E=116,F=2,S=228}, beg=0, end=71, reps=1
Enter: NEC1-f16: {D=134,E=115,F=2,S=228}, beg=0, end=75, reps=2
Escape: NEC1-f16: {D=134,E=117,F=2,S=228}, beg=0, end=75, reps=2
Play: NEC1-y1: {D=134,F=2,S=228}, beg=0, end=79, reps=3
Stop: NEC1-y3: {D=134,F=2,S=228}, beg=0, end=75, reps=2
Play: NEC1-Yamaha: {D=134,F=2,S=228,Y=1}, beg=0, end=79, reps=3
Stop: NEC1-Yamaha: {D=134,F=2,S=228,Y=3}, beg=0, end=75, reps=2
Pause: NEC1-f16: {D=134,E=126,F=2,S=228}, beg=0, end=75, reps=2
Rewind: NEC1-f16: {D=134,E=120,F=2,S=228}, beg=0, end=75, reps=2
FastForward: NEC1-f16: {D=134,E=123,F=2,S=228}, beg=0, end=75, reps=2
12 changes: 6 additions & 6 deletions src/test/teaserfiles/NEC1-y1_nofinalA.exp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FM: NEC1-y1: {D=127,F=88,S=1}, beg=0, end=67
AM: NEC1-y1: {D=127,F=85,S=1}, beg=0, end=67
Preset up: NEC1-y1: {D=127,F=91,S=1}, beg=0, end=67
Preset down: NEC1-y1: {D=127,F=94,S=1}, beg=0, end=67
Tuning up: NEC1-y1: {D=127,F=97,S=1}, beg=0, end=67
Tuning down: NEC1-y1: {D=127,F=100,S=1}, beg=0, end=67
FM: NEC1-Yamaha: {D=127,F=88,S=1,Y=1}, beg=0, end=67
AM: NEC1-Yamaha: {D=127,F=85,S=1,Y=1}, beg=0, end=67
Preset up: NEC1-Yamaha: {D=127,F=91,S=1,Y=1}, beg=0, end=67
Preset down: NEC1-Yamaha: {D=127,F=94,S=1,Y=1}, beg=0, end=67
Tuning up: NEC1-Yamaha: {D=127,F=97,S=1,Y=1}, beg=0, end=67
Tuning down: NEC1-Yamaha: {D=127,F=100,S=1,Y=1}, beg=0, end=67
8 changes: 4 additions & 4 deletions src/test/teaserfiles/NEC1-y1_nofinal_B.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Scene 1 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-y1: {D=122,F=0}, beg=0, end=67
Scene 2 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-y1: {D=122,F=3}, beg=0, end=67
Scene 3 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-y1: {D=122,F=6}, beg=0, end=67
Scene 4 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-y1: {D=122,F=9}, beg=0, end=67
Scene 1 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-Yamaha: {D=122,F=0,Y=1}, beg=0, end=67
Scene 2 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-Yamaha: {D=122,F=3,Y=1}, beg=0, end=67
Scene 3 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-Yamaha: {D=122,F=6,Y=1}, beg=0, end=67
Scene 4 button for Yamaha htr5063. Protocol appears to be the same one Rob worked out for his "gap helper" upgrade. Any idea what the EFC or OBC would be?: NEC1-Yamaha: {D=122,F=9,Y=1}, beg=0, end=67

0 comments on commit 2aa21ab

Please sign in to comment.