From 5134fc5fdabb56ad66a961c3d4134875dd23f329 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 30 Apr 2023 17:12:57 -0500 Subject: [PATCH] Progress on Expert amplifier --- amplifiers/expert/expert.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/amplifiers/expert/expert.c b/amplifiers/expert/expert.c index 2be064a90..ff1ff3d2b 100644 --- a/amplifiers/expert/expert.c +++ b/amplifiers/expert/expert.c @@ -81,9 +81,26 @@ int expert_init(AMP *amp) return RIG_OK; } +int expert_open(AMP *amp) +{ + unsigned char cmd=0x80; + unsigned char response[256]; + + rig_debug(RIG_DEBUG_TRACE, "%s: entered\n", __func__); + + expert_transaction(amp, &cmd, 1, response, 256); + + return RIG_OK; +} + int expert_close(AMP *amp) { + + unsigned char cmd=0x81; + unsigned char response[256]; + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + expert_transaction(amp, &cmd, 1, response, 4); if (amp->state.priv) { free(amp->state.priv); } @@ -122,10 +139,10 @@ int expert_transaction(AMP *amp, const unsigned char *cmd, int cmd_len, unsigned rs = &->state; cmdbuf[0] = cmdbuf[1] = cmdbuf[2] = 0x55; - memcpy(&cmdbuf,cmd,cmd_len); for(int i=0;i