diff --git a/DXLabSuiteCommanderTransceiver.cpp b/DXLabSuiteCommanderTransceiver.cpp index 5cfa45fe6..4961c2a69 100644 --- a/DXLabSuiteCommanderTransceiver.cpp +++ b/DXLabSuiteCommanderTransceiver.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "NetworkServerLookup.hpp" @@ -69,7 +70,13 @@ int DXLabSuiteCommanderTransceiver::do_start () throw error {tr ("Failed to connect to DX Lab Suite Commander\n") + commander_->errorString ()}; } + // sleeps here are to ensure Commander has actually queried the rig + // rather than returning cached data which maybe stale or simply + // read backs of not yet committed values, the 2s delays are + // arbitrary but hopefully enough as the actual time required is rig + // and Commander setting dependent int resolution {0}; + QThread::msleep (2000); auto reply = command_with_reply ("CmdGetFreq"); if (0 == reply.indexOf ("" + f_string).arg (f_string.size ()); simple_command (("CmdSetFreq" + params).arg (params.size ())); + QThread::msleep (2000); reply = command_with_reply ("CmdGetFreq"); if (0 == reply.indexOf ("" + f_string).arg (f_string.size ()); simple_command (("CmdSetFreq" + params).arg (params.size ())); + QThread::msleep (2000); reply = command_with_reply ("CmdGetFreq"); new_frequency = string_to_frequency (reply.mid (reply.indexOf ('>') + 1)); if (9 == static_cast (new_frequency - test_frequency))