From 83fa83586490976f2cfa71fd7974fb2e6b403ecf Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Tue, 23 Jan 2024 15:52:32 -0600 Subject: [PATCH] Update simft991.c --- simulators/simft991.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/simulators/simft991.c b/simulators/simft991.c index 29644b7a4..38d8c0c0b 100644 --- a/simulators/simft991.c +++ b/simulators/simft991.c @@ -28,6 +28,9 @@ int keyspd = 20; int bandselect = 5; int width = 21; int narrow = 0; +int vd = 0; +int sm0 = 0; +int sm1 = 0; // ID 0310 == 310, Must drop leading zero typedef enum nc_rigid_e @@ -330,6 +333,33 @@ int main(int argc, char *argv[]) { sscanf(buf, "NA0%d", &narrow); } + else if (strncmp(buf, "VD;", 3) == 0) + { + sprintf(buf, "VD%d;", vd); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "VD", 2) == 0) + { + sscanf(buf, "VD%d", &vd); + } + else if (strncmp(buf, "SM0;", 4) == 0) + { + sprintf(buf, "SM0%d;", sm0); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "SM0", 3) == 0) + { + sscanf(buf, "SM0%3d", &sm0); + } + else if (strncmp(buf, "SM1;", 4) == 0) + { + sprintf(buf, "SM1%d;", sm1); + n = write(fd, buf, strlen(buf)); + } + else if (strncmp(buf, "SM1", 3) == 0) + { + sscanf(buf, "SM1%3d", &sm1); + } else if (strlen(buf) > 0) {