diff --git a/rigcommander.cpp b/rigcommander.cpp index a3c5585..8719fe7 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -2140,8 +2140,8 @@ void rigCommander::parseBandStackReg() // "INDEX: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 " // "DATA: 1a 01 05 01 60 03 23 14 00 00 03 10 00 08 85 00 08 85 fd " - //char band = payloadIn[2]; - //char regCode = payloadIn[3]; + char band = payloadIn[2]; + char regCode = payloadIn[3]; freqt freqs = parseFrequency(payloadIn, 7); //float freq = (float)freqs.MHzDouble; @@ -2156,7 +2156,7 @@ void rigCommander::parseBandStackReg() // 14, 15 tone squelch freq setting // if more, memory name (label) ascii - //qDebug(logRig()) << "band: " << QString("%1").arg(band) << " regCode: " << (QString)regCode << " freq float: " << freq; + qDebug(logRig()) << "BSR in rigCommander: band: " << QString("%1").arg(band) << " regCode: " << (QString)regCode << " freq Hz: " << freqs.Hz << ", mode: " << (unsigned int)mode << ", filter: " << (unsigned int)filter << " data: " << dataOn; //qDebug(logRig()) << "mode: " << (QString)mode << " dataOn: " << dataOn; //qDebug(logRig()) << "Freq Hz: " << freqs.Hz; diff --git a/rigctld.h b/rigctld.h index 3221b65..2501df0 100644 --- a/rigctld.h +++ b/rigctld.h @@ -15,33 +15,33 @@ #include "rigcommander.h" typedef void (*voidFunction)(void); -struct Interface { +//struct Interface { - std::map> m1; +// std::map> m1; - template - void insert(std::string s1, std::string s2, T f1) { - auto tt = std::type_index(typeid(f1)); - m1.insert(std::make_pair(s1, - std::make_pair((voidFunction)f1, tt))); - m1.insert(std::make_pair(s2, - std::make_pair((voidFunction)f1, tt))); - } +// template +// void insert(std::string s1, std::string s2, T f1) { +// auto tt = std::type_index(typeid(f1)); +// m1.insert(std::make_pair(s1, +// std::make_pair((voidFunction)f1, tt))); +// m1.insert(std::make_pair(s2, +// std::make_pair((voidFunction)f1, tt))); +// } - template - T searchAndCall(std::string s1, Args&&... args) { - auto mapIter = m1.find(s1); - /*chk if not end*/ - auto mapVal = mapIter->second; +// template +// T searchAndCall(std::string s1, Args&&... args) { +// auto mapIter = m1.find(s1); +// /*chk if not end*/ +// auto mapVal = mapIter->second; - // auto typeCastedFun = reinterpret_cast(mapVal.first); - auto typeCastedFun = (T(*)(Args ...))(mapVal.first); +// // auto typeCastedFun = reinterpret_cast< nowT(*)(Args ...)>(mapVal.first); +// auto typeCastedFun = (T(*)(Args ...))(mapVal.first); - //compare the types is equal or not - assert(mapVal.second == std::type_index(typeid(typeCastedFun))); - return typeCastedFun(std::forward(args)...); - } -}; +// //compare the types is equal or not +// assert(mapVal.second == std::type_index(typeid(typeCastedFun))); +// return typeCastedFun(std::forward(args)...); +// } +//}; class rigCtlD : public QTcpServer { @@ -104,7 +104,7 @@ private: unsigned char getMode(QString modeString); QString getFilter(unsigned char mode, unsigned char filter); - Interface commands; + //Interface commands; }; diff --git a/wfmain.cpp b/wfmain.cpp index e96f251..b33e3f9 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -2958,6 +2958,7 @@ void wfmain::receiveBandStackReg(freqt freq, char mode, char filter, bool dataOn { // read the band stack and apply by sending out commands + qDebug(logSystem()) << __func__ << "BSR received into main: Freq: " << freq.Hz << ", mode: " << (unsigned int)mode << ", filter: " << (unsigned int)filter << ", data mode: " << dataOn; emit setFrequency(freq); setModeVal = (unsigned char) mode; setFilterVal = (unsigned char) filter;