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:
*
* - New rigs must be appended, existing lines must not move: the
* selected model is persisted as a raw index into this list
@@ -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}.
- * - Its CI-V address (0xB6) is unique in the list, so
+ *
- The IC-7300MK2's CI-V address (0xB6) is unique in the list, so
* {@link RigNameList#getIndexByAddress(int)} maps it unambiguously.
*
*/
@@ -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