diff --git a/ft8af/app/src/main/assets/rigaddress.txt b/ft8af/app/src/main/assets/rigaddress.txt index a1a09823f..6020e90e2 100644 --- a/ft8af/app/src/main/assets/rigaddress.txt +++ b/ft8af/app/src/main/assets/rigaddress.txt @@ -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 diff --git a/ft8af/app/src/test/java/com/k1af/ft8af/database/RigAddressAssetTest.java b/ft8af/app/src/test/java/com/k1af/ft8af/database/RigAddressAssetTest.java index 58210ff36..94eb3f3fc 100644 --- a/ft8af/app/src/test/java/com/k1af/ft8af/database/RigAddressAssetTest.java +++ b/ft8af/app/src/test/java/com/k1af/ft8af/database/RigAddressAssetTest.java @@ -15,7 +15,8 @@ * exercises getRigNamesFromFile / getRigNameByIndex / getIndexByAddress, * which {@link RigNameListTest} can't reach without a Context). * - *

Two invariants matter here beyond the IC-7300MK2 entry itself: + *

Per-rig checks pin the profiles of recently added entries (IC-7300MK2, + * FTX-1). Two invariants matter beyond those: *

*/ @@ -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() { @@ -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