Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ft8af/app/src/main/assets/rigaddress.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ UA3REO Wolf SDR(USB),00,4800,16
(tr)uSDX (TS-480),00,9600,7
Yaesu FT-891 (Hamlib),40C,38400,26
ICOM IC-7300MK2,B6,115200,0
YAESU FTX-1(USB),00,38400,2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* exercises getRigNamesFromFile / getRigNameByIndex / getIndexByAddress,
* which {@link RigNameListTest} can't reach without a Context).
*
* <p>Two invariants matter here beyond the IC-7300MK2 entry itself:
* <p>Per-rig checks pin the profiles of recently added entries (IC-7300MK2,
* FTX-1). Two invariants matter beyond those:
* <ul>
* <li><b>New rigs must be appended, existing lines must not move</b>: the
* selected model is persisted as a raw index into this list
Expand All @@ -24,7 +25,7 @@
* selected rig on upgrade. {@link #rigList_matchesGoldenIndexOrder} pins
* every entry to its index; when you add a rig, append it to both the
* asset file and the end of {@code GOLDEN_ORDER}.</li>
* <li>Its CI-V address (0xB6) is unique in the list, so
* <li>The IC-7300MK2's CI-V address (0xB6) is unique in the list, so
* {@link RigNameList#getIndexByAddress(int)} maps it unambiguously.</li>
* </ul>
*/
Expand Down Expand Up @@ -114,6 +115,7 @@ public class RigAddressAssetTest {
"(tr)uSDX (TS-480)",
"Yaesu FT-891 (Hamlib)",
"ICOM IC-7300MK2",
"YAESU FTX-1(USB)",
};

private RigNameList load() {
Expand Down Expand Up @@ -158,11 +160,30 @@ public void rigList_matchesGoldenIndexOrder() {
}

@Test
public void ic7300mk2_isTheLastEntry() {
// New rigs are append-only (class javadoc); MK2 closed the list.
public void lastEntry_isTheLastGoldenName() {
// New rigs are append-only (class javadoc): the loaded list must end
// with the newest GOLDEN_ORDER entry. Pinned to the array rather than a
// model name so appending a rig doesn't mean rewriting this test.
RigNameList list = load();
assertThat(list.rigList.get(list.rigList.size() - 1).modelName)
.isEqualTo("ICOM IC-7300MK2");
.isEqualTo(GOLDEN_ORDER[GOLDEN_ORDER.length - 1]);
}

@Test
public void ftx1_usesTheFt891991UsbProfile() {
// A user reported (issue #931) working CAT on the FTX-1 with the
// "FT-891/991(USB)" entry: same 38400 baud and 9-digit Yaesu gen-3
// command set, so the named entry mirrors that profile exactly.
RigNameList list = load();
RigNameList.RigName ftx1 = findByName(list, "YAESU FTX-1(USB)");
RigNameList.RigName ft891 = findByName(list, "YAESU FT-891/991(USB)");
assertThat(ftx1).isNotNull();
assertThat(ft891).isNotNull();
assertThat(ftx1.bauRate).isEqualTo(38400);
assertThat(ftx1.instructionSet).isEqualTo(2); // InstructionSet.YAESU_3_9
assertThat(ftx1.address).isEqualTo(ft891.address);
assertThat(ftx1.bauRate).isEqualTo(ft891.bauRate);
assertThat(ftx1.instructionSet).isEqualTo(ft891.instructionSet);
}

@Test
Expand Down
Loading