Initial support for cmd29 (main/sub)

rigcreator
Phil Taylor 2023-05-25 23:17:54 +01:00
rodzic 778ed8817a
commit 5cae813ad6
12 zmienionych plików z 359 dodań i 172 usunięć

Wyświetl plik

@ -211,7 +211,7 @@ void cachingQueue::message(QString msg)
waiting.wakeOne();
}
void cachingQueue::receiveValue(funcs func, QVariant value)
void cachingQueue::receiveValue(funcs func, QVariant value, bool sub)
{
QMutexLocker locker(&mutex);
cacheItem c = cacheItem(func,value);

Wyświetl plik

@ -42,12 +42,13 @@ struct queueItem {
struct cacheItem {
cacheItem () {};
cacheItem (funcs command, QVariant value) : command(command), value(value) {};
cacheItem (funcs command, QVariant value, bool sub=false) : command(command), value(value), sub(sub) {};
funcs command = funcNone;
QDateTime req=QDateTime();
QDateTime reply=QDateTime();
QVariant value=QVariant();
bool sub;
};
class cachingQueue : public QThread
@ -60,7 +61,7 @@ signals:
public slots:
// Can be called directly or via emit.
void receiveValue(funcs func, QVariant value);
void receiveValue(funcs func, QVariant value, bool sub);
private:

Wyświetl plik

@ -52,8 +52,9 @@ void debugWindow::getCache()
ui->cacheView->item(c,0)->setText(QString::number(i.value().command).rightJustified(3,'0'));
ui->cacheView->item(c,1)->setText(funcString[i.value().command]);
ui->cacheView->item(c,2)->setText(getValue(i.value().value));
ui->cacheView->item(c,3)->setText((i.value().req.isValid()?i.value().req.toString("hh:mm:ss.zzz"):"<none>"));
ui->cacheView->item(c,4)->setText((i.value().reply.isValid()?i.value().reply.toString("hh:mm:ss.zzz"):"<none>"));
ui->cacheView->item(c,3)->setText((i.value().sub)?"true":"false");
ui->cacheView->item(c,4)->setText((i.value().req.isValid()?i.value().req.toString("hh:mm:ss.zzz"):"<none>"));
ui->cacheView->item(c,5)->setText((i.value().reply.isValid()?i.value().reply.toString("hh:mm:ss.zzz"):"<none>"));
c++;
i++;
}

Wyświetl plik

@ -77,6 +77,11 @@
<string>Value</string>
</property>
</column>
<column>
<property name="text">
<string>Sub</string>
</property>
</column>
<column>
<property name="text">
<string>Request</string>

Wyświetl plik

@ -220,7 +220,7 @@ void rigCommander::commonSetup()
// Add the below commands so we can get a response until we have received rigCaps
rigCaps.commands.clear();
rigCaps.commandsReverse.clear();
rigCaps.commands.insert(funcTransceiverId,funcType(funcTransceiverId, QString("Transceiver ID"),QByteArrayLiteral("\x19\x00"),0,0));
rigCaps.commands.insert(funcTransceiverId,funcType(funcTransceiverId, QString("Transceiver ID"),QByteArrayLiteral("\x19\x00"),0,0,false));
rigCaps.commandsReverse.insert(QByteArrayLiteral("\x19\x00"),funcTransceiverId);
queue = cachingQueue::getInstance(this);
@ -321,7 +321,7 @@ void rigCommander::prepDataAndSend(QByteArray data)
emit dataForComm(data);
}
bool rigCommander::getCommand(funcs func, QByteArray &payload, int value)
bool rigCommander::getCommand(funcs func, QByteArray &payload, int value, bool sub)
{
// Value is set to INT_MIN by default as this should be outside any "real" values
auto it = rigCaps.commands.find(func);
@ -333,6 +333,12 @@ bool rigCommander::getCommand(funcs func, QByteArray &payload, int value)
qDebug(logRig()) << QString("%0 with no value (get)").arg(funcString[func]);
else
qDebug(logRig()) << QString("%0 with value %1 (Range: %2-%3)").arg(funcString[func]).arg(value).arg(it.value().minVal).arg(it.value().maxVal);
if (rigCaps.hasCommand29 && it.value().cmd29)
{
// This can use cmd29 so add sub/main to the command
payload.append('\x29');
payload.append(static_cast<uchar>(sub));
}
payload.append(it.value().data);
return true;
}
@ -1972,6 +1978,13 @@ void rigCommander::parseCommand()
#endif
funcs func = funcNone;
bool sub = false;
if (rigCaps.hasCommand29 && payloadIn[0] == '\x29')
{
sub = static_cast<bool>(payloadIn[1]);
payloadIn.remove(0,2);
}
// As some commands bave both single and multi-byte options, start at 4 characters and work down to 1.
// This is quite wasteful as many commands are single-byte, but I can't think of an easier way?
@ -2399,7 +2412,7 @@ void rigCommander::parseCommand()
#endif
if (value.isValid() && queue != Q_NULLPTR) {
queue->receiveValue(func,value);
queue->receiveValue(func,value,sub);
}
}
@ -4354,6 +4367,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasDV = settings->value("HasDV",false).toBool();
rigCaps.hasTransmit = settings->value("HasTransmit",false).toBool();
rigCaps.hasFDcomms = settings->value("HasFDComms",false).toBool();
rigCaps.hasCommand29 = settings->value("HasCommand29",false).toBool();
rigCaps.useRTSforPTT = settings->value("UseRTSforPTT",false).toBool();
rigCaps.memGroups = settings->value("MemGroups",0).toUInt();
@ -4385,12 +4399,13 @@ void rigCommander::determineRigCaps()
{
funcs func = funcsLookup.find(settings->value("Type", "").toString().toUpper()).value();
rigCaps.commands.insert(func, funcType(func, funcString[int(func)],
QByteArray::fromHex(settings->value("String", "").toString().toUtf8()),
settings->value("Min", 0).toString().toInt(), settings->value("Max", 0).toString().toInt()));
QByteArray::fromHex(settings->value("String", "").toString().toUtf8()),
settings->value("Min", 0).toString().toInt(), settings->value("Max", 0).toString().toInt(),
settings->value("Command29",false).toBool()));
rigCaps.commandsReverse.insert(QByteArray::fromHex(settings->value("String", "").toString().toUtf8()),func);
} else {
qInfo(logRig()) << "Function" << settings->value("Type", "").toString() << "Not Found!";
qWarning(logRig()) << "**** Function" << settings->value("Type", "").toString() << "Not Found, rig file may be out of date?";
}
}
settings->endArray();
@ -6906,7 +6921,7 @@ void rigCommander::receiveCommand(queueItemType type, funcs func, QVariant value
if (func == funcAfGain && value.isValid() && udp != Q_NULLPTR) {
// Ignore the AF Gain command, just queue it for processing
emit haveSetVolume(static_cast<uchar>(value.toInt()));
queue->receiveValue(func,value);
queue->receiveValue(func,value,false);
return;
}
@ -6932,7 +6947,7 @@ void rigCommander::receiveCommand(queueItemType type, funcs func, QVariant value
}
QByteArray payload;
if (getCommand(func,payload,val))
if (getCommand(func,payload,val,false))
{
if (value.isValid())
{
@ -6940,7 +6955,7 @@ void rigCommander::receiveCommand(queueItemType type, funcs func, QVariant value
{
payload.append(value.value<bool>());
}
if (!strcmp(value.typeName(),"QString"))
else if (!strcmp(value.typeName(),"QString"))
{
QString text = value.value<QString>();
if (pttAllowed && func == funcSendCW)

Wyświetl plik

@ -454,7 +454,7 @@ private:
void parsePTT();
void parseATU();
void parseLevels(); // register 0x14
bool getCommand(funcs func, QByteArray& payload, int value=INT_MIN);
bool getCommand(funcs func, QByteArray& payload, int value=INT_MIN, bool sub=false);
QByteArray getLANAddr();
QByteArray getUSBAddr();
QByteArray getACCAddr(unsigned char ab);

Wyświetl plik

@ -15,23 +15,25 @@ rigCreator::rigCreator(QWidget *parent) :
ui->commands->setItemDelegateForColumn(0, commandsList);
ui->commands->setColumnWidth(0,120);
ui->commands->setColumnWidth(1,115);
ui->commands->setColumnWidth(1,100);
ui->commands->setColumnWidth(2,50);
ui->commands->setColumnWidth(3,50);
ui->commands->setColumnWidth(4,25);
ui->commands->setColumnWidth(4,40);
connect(ui->commands,SIGNAL(rowAdded(int)),this,SLOT(commandRowAdded(int)));
}
void rigCreator::commandRowAdded(int row)
{
if (ui->commands->item(row,4) == NULL) {
// Add checkbox
QTableWidgetItem * item = new QTableWidgetItem();
item->setFlags(Qt::ItemFlag::ItemIsEnabled | Qt::ItemFlag::ItemIsUserCheckable);
item->setCheckState(Qt::Unchecked);
ui->commands->setItem(row,4,item);
}
// Create a widget that will contain a checkbox
QWidget *checkBoxWidget = new QWidget();
QCheckBox *checkBox = new QCheckBox(); // We declare and initialize the checkbox
checkBox->setObjectName("check");
QHBoxLayout *layoutCheckBox = new QHBoxLayout(checkBoxWidget); // create a layer with reference to the widget
layoutCheckBox->addWidget(checkBox); // Set the checkbox in the layer
layoutCheckBox->setAlignment(Qt::AlignCenter); // Center the checkbox
layoutCheckBox->setContentsMargins(0,0,0,0); // Set the zero padding
ui->commands->setCellWidget(row,4, checkBoxWidget);
}
@ -124,6 +126,7 @@ void rigCreator::loadRigFile(QString file)
ui->hasWifi->setChecked(settings->value("HasWiFi",false).toBool());
ui->hasTransmit->setChecked(settings->value("HasTransmit",false).toBool());
ui->hasFDComms->setChecked(settings->value("HasFDComms",false).toBool());
ui->hasCommand29->setChecked(settings->value("HasCommand29",false).toBool());
ui->memGroups->setText(settings->value("MemGroups","0").toString());
ui->memories->setText(settings->value("Memories","0").toString());
@ -143,20 +146,26 @@ void rigCreator::loadRigFile(QString file)
{
settings->setArrayIndex(c);
ui->commands->insertRow(ui->commands->rowCount());
// Add checkbox for row 4 (command 39)
QTableWidgetItem * item = new QTableWidgetItem();
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
if (settings->value("Command39",false).toBool())
item->setCheckState(Qt::Checked);
else
item->setCheckState(Qt::Unchecked);
ui->commands->setItem(c,4,item);
// Create a widget that will contain a checkbox
QWidget *checkBoxWidget = new QWidget();
QCheckBox *checkBox = new QCheckBox(); // We declare and initialize the checkbox
checkBox->setObjectName("check");
QHBoxLayout *layoutCheckBox = new QHBoxLayout(checkBoxWidget); // create a layer with reference to the widget
layoutCheckBox->addWidget(checkBox); // Set the checkbox in the layer
layoutCheckBox->setAlignment(Qt::AlignCenter); // Center the checkbox
layoutCheckBox->setContentsMargins(0,0,0,0); // Set the zero padding
if (settings->value("Command29",false).toBool()) {
checkBox->setChecked(true);
} else {
checkBox->setChecked(false);
}
ui->commands->model()->setData(ui->commands->model()->index(c,0),settings->value("Type", "").toString());
ui->commands->model()->setData(ui->commands->model()->index(c,1),settings->value("String", "").toString());
ui->commands->model()->setData(ui->commands->model()->index(c,2),QString::number(settings->value("Min", 0).toInt(),16));
ui->commands->model()->setData(ui->commands->model()->index(c,3),QString::number(settings->value("Max", 0).toInt(),16));
ui->commands->setCellWidget(c,4, checkBoxWidget);
}
settings->endArray();
@ -382,6 +391,7 @@ void rigCreator::saveRigFile(QString file)
settings->setValue("HasWiFi",ui->hasWifi->isChecked());
settings->setValue("HasTransmit",ui->hasTransmit->isChecked());
settings->setValue("HasFDComms",ui->hasFDComms->isChecked());
settings->setValue("HasCommand29",ui->hasCommand29->isChecked());
settings->setValue("MemGroups",ui->memGroups->text().toInt());
settings->setValue("Memories",ui->memories->text().toInt());
@ -400,6 +410,13 @@ void rigCreator::saveRigFile(QString file)
settings->setValue("String", (ui->commands->item(n,1) == NULL) ? "" : ui->commands->item(n,1)->text());
settings->setValue("Min", (ui->commands->item(n,2) == NULL) ? 0 : ui->commands->item(n,2)->text().toInt(nullptr,16));
settings->setValue("Max", (ui->commands->item(n,3) == NULL) ? 0 : ui->commands->item(n,3)->text().toInt(nullptr,16));
QCheckBox* chk = ui->commands->cellWidget(n,4)->findChild<QCheckBox*>();
if (chk != nullptr)
{
settings->setValue("Command29", chk->isChecked());
}
}
settings->endArray();
@ -537,3 +554,7 @@ QStandardItemModel* rigCreator::createModel(QStandardItemModel* model, QString s
return model;
}
void rigCreator::on_hasCommand29_toggled(bool checked)
{
ui->commands->setColumnHidden(4,!checked);
}

Wyświetl plik

@ -29,6 +29,7 @@ public:
private slots:
void on_loadFile_clicked(bool clicked);
void on_saveFile_clicked(bool clicked);
void on_hasCommand29_toggled(bool checked);
void on_defaultRigs_clicked(bool clicked);
void loadRigFile(QString filename);
void saveRigFile(QString filename);
@ -39,7 +40,6 @@ private:
Ui::rigCreator *ui;
QMenu* context;
tableCombobox* commandsList;
tableCheckbox* command39;
QStandardItemModel* commandsModel;
QStandardItemModel* command36Model;
QStandardItemModel* createModel(QStandardItemModel* model, QString strings[]);

Wyświetl plik

@ -210,6 +210,9 @@ struct rigCapabilities {
bool hasAdvancedRptrToneCmds = false;
bool hasQuickSplitCommand = false;
bool hasCommand29 = false;
QByteArray quickSplitCommand;
QHash<funcs,funcType> commands;
QHash<QByteArray,funcs> commandsReverse;

Wyświetl plik

@ -15,6 +15,7 @@ HasEthernet=true
HasWiFi=false
HasTransmit=true
HasFDComms=true
HasCommand29=true
MemGroups=1
Memories=101
MemStart=1
@ -25,519 +26,658 @@ Commands\1\Type=Freq (TRX)
Commands\1\String=\\x00
Commands\1\Min=0
Commands\1\Max=0
Commands\1\Command29=false
Commands\2\Type=Mode (TRX)
Commands\2\String=\\x01
Commands\2\Min=0
Commands\2\Max=0
Commands\2\Command29=false
Commands\3\Type=Band Edge Freq
Commands\3\String=\\x02
Commands\3\Min=0
Commands\3\Max=0
Commands\3\Command29=false
Commands\4\Type=Freq Get
Commands\4\String=\\x03
Commands\4\Min=0
Commands\4\Max=0
Commands\4\Command29=false
Commands\5\Type=Mode Get
Commands\5\String=\\x04
Commands\5\Min=0
Commands\5\Max=0
Commands\5\Command29=false
Commands\6\Type=Freq Set
Commands\6\String=\\x05
Commands\6\Min=0
Commands\6\Max=0
Commands\6\Command29=false
Commands\7\Type=Mode Set
Commands\7\String=\\x06
Commands\7\Min=0
Commands\7\Max=0
Commands\7\Command29=false
Commands\8\Type=VFO Swap M/S
Commands\8\String=\\x07\\xb0
Commands\8\Min=0
Commands\8\Max=0
Commands\8\Command29=false
Commands\9\Type=VFO Equal MS
Commands\9\String=\\x07\\xb1
Commands\9\Min=0
Commands\9\Max=0
Commands\9\Command29=false
Commands\10\Type=VFO Dual Watch Off
Commands\10\String=\\x07\\xc0
Commands\10\Min=0
Commands\10\Max=0
Commands\10\Command29=false
Commands\11\Type=VFO Dual Watch On
Commands\11\String=\\x07\\xc1
Commands\11\Min=0
Commands\11\Max=0
Commands\11\Command29=false
Commands\12\Type=VFO Dual Watch
Commands\12\String=\\x07\\xc2
Commands\12\Min=0
Commands\12\Max=1
Commands\12\Command29=false
Commands\13\Type=VFO Main Select
Commands\13\String=\\x07\\xd0
Commands\13\Min=0
Commands\13\Max=0
Commands\13\Command29=false
Commands\14\Type=VFO Sub Select
Commands\14\String=\\x07\\xd1
Commands\14\Min=0
Commands\14\Max=0
Commands\14\Command29=false
Commands\15\Type=VFO Main/Sub Band
Commands\15\String=\\x07\\xd2
Commands\15\Min=0
Commands\15\Max=1
Commands\15\Command29=false
Commands\16\Type=Memory Mode
Commands\16\String=\\x08
Commands\16\Min=1
Commands\16\Max=101
Commands\16\Command29=false
Commands\17\Type=Memory Write
Commands\17\String=\\x09
Commands\17\Min=1
Commands\17\Max=101
Commands\17\Command29=false
Commands\18\Type=Memory to VFO
Commands\18\String=\\x0a
Commands\18\Min=1
Commands\18\Max=101
Commands\18\Command29=false
Commands\19\Type=Memory Clear
Commands\19\String=\\x0b
Commands\19\Min=1
Commands\19\Max=101
Commands\19\Command29=false
Commands\20\Type=Scanning
Commands\20\String=\\x0e
Commands\20\Min=0
Commands\20\Max=255
Commands\20\Command29=false
Commands\21\Type=Split/Duplex
Commands\21\String=\\x0f
Commands\21\Min=0
Commands\21\Max=1
Commands\21\Command29=false
Commands\22\Type=Tuning Step
Commands\22\String=\\x10
Commands\22\Min=0
Commands\22\Max=8
Commands\22\Command29=false
Commands\23\Type=Attenuator Status
Commands\23\String=\\x11
Commands\23\Min=0
Commands\23\Max=69
Commands\23\Command29=true
Commands\24\Type=Antenna
Commands\24\String=\\x12
Commands\24\Min=0
Commands\24\Max=1
Commands\24\Command29=true
Commands\25\Type=Speech
Commands\25\String=\\x13
Commands\25\Min=0
Commands\25\Max=2
Commands\25\Command29=false
Commands\26\Type=AF Gain
Commands\26\String=\\x14\\x01
Commands\26\Min=0
Commands\26\Max=255
Commands\26\Command29=true
Commands\27\Type=RF Gain
Commands\27\String=\\x14\\x02
Commands\27\Min=0
Commands\27\Max=255
Commands\27\Command29=true
Commands\28\Type=Squelch
Commands\28\String=\\x14\\x03
Commands\28\Min=0
Commands\28\Max=255
Commands\28\Command29=true
Commands\29\Type=APF Type Level
Commands\29\String=\\x14\\x05
Commands\29\Min=0
Commands\29\Max=255
Commands\29\Command29=true
Commands\30\Type=NR Level
Commands\30\String=\\x14\\x06
Commands\30\Min=0
Commands\30\Max=255
Commands\30\Command29=true
Commands\31\Type=PBT Inner
Commands\31\String=\\x14\\x07
Commands\31\Min=0
Commands\31\Max=255
Commands\31\Command29=true
Commands\32\Type=PBT Outer
Commands\32\String=\\x14\\x08
Commands\32\Min=0
Commands\32\Max=255
Commands\32\Command29=true
Commands\33\Type=CW Pitch
Commands\33\String=\\x14\\x09
Commands\33\Min=0
Commands\33\Max=255
Commands\33\Command29=false
Commands\34\Type=RF Power
Commands\34\String=\\x14\\x0a
Commands\34\Min=0
Commands\34\Max=255
Commands\34\Command29=false
Commands\35\Type=Mic Gain
Commands\35\String=\\x14\\x0b
Commands\35\Min=0
Commands\35\Max=255
Commands\35\Command29=false
Commands\36\Type=Key Speed
Commands\36\String=\\x14\\x0c
Commands\36\Min=0
Commands\36\Max=255
Commands\36\Command29=false
Commands\37\Type=Compressor Level
Commands\37\String=\\x14\\x0e
Commands\37\Min=0
Commands\37\Max=255
Commands\37\Command29=false
Commands\38\Type=Break-In Delay
Commands\38\String=\\x14\\x0f
Commands\38\Min=0
Commands\38\Max=255
Commands\38\Command29=false
Commands\39\Type=NB Level
Commands\39\String=\\x14\\x12
Commands\39\Min=0
Commands\39\Max=255
Commands\39\Command29=true
Commands\40\Type=DIGI-SEL Shift
Commands\40\String=\\x14\\x13
Commands\40\Min=0
Commands\40\Max=255
Commands\40\Command29=true
Commands\41\Type=Drive Gain
Commands\41\String=\\x14\\x14
Commands\41\Min=0
Commands\41\Max=255
Commands\41\Command29=false
Commands\42\Type=Monitor Gain
Commands\42\String=\\x14\\x15
Commands\42\Min=0
Commands\42\Max=255
Commands\42\Command29=false
Commands\43\Type=Vox Gain
Commands\43\String=\\x14\\x16
Commands\43\Min=0
Commands\43\Max=255
Commands\43\Command29=false
Commands\44\Type=Anti-Vox Gain
Commands\44\String=\\x14\\x17
Commands\44\Min=0
Commands\44\Max=255
Commands\44\Command29=false
Commands\45\Type=S Meter Sql Status
Commands\45\String=\\x15\\x01
Commands\45\Min=0
Commands\45\Max=255
Commands\45\Command29=true
Commands\46\Type=S Meter
Commands\46\String=\\x15\\x02
Commands\46\Min=0
Commands\46\Max=255
Commands\46\Command29=true
Commands\47\Type=Various Squelch
Commands\47\String=\\x15\\x05
Commands\47\Min=0
Commands\47\Max=255
Commands\47\Command29=true
Commands\48\Type=Overflow Status
Commands\48\String=\\x15\\x07
Commands\48\Min=0
Commands\48\Max=1
Commands\48\Command29=true
Commands\49\Type=Power Meter
Commands\49\String=\\x15\\x11
Commands\49\Min=0
Commands\49\Max=255
Commands\49\Command29=false
Commands\50\Type=SWR Meter
Commands\50\String=\\x15\\x12
Commands\50\Min=0
Commands\50\Max=255
Commands\50\Command29=false
Commands\51\Type=ALC Meter
Commands\51\String=\\x15\\x13
Commands\51\Min=0
Commands\51\Max=255
Commands\51\Command29=false
Commands\52\Type=Comp Meter
Commands\52\String=\\x15\\x14
Commands\52\Min=0
Commands\52\Max=255
Commands\52\Command29=false
Commands\53\Type=Vd Meter
Commands\53\String=\\x15\\x15
Commands\53\Min=0
Commands\53\Max=255
Commands\53\Command29=false
Commands\54\Type=Id Meter
Commands\54\String=\\x15\\x16
Commands\54\Min=0
Commands\54\Max=255
Commands\54\Command29=false
Commands\55\Type=Preamp Status
Commands\55\String=\\x16\\x02
Commands\55\Min=0
Commands\55\Max=2
Commands\55\Command29=true
Commands\56\Type=AGC Time Constant
Commands\56\String=\\x16\\x12
Commands\56\Min=0
Commands\56\Max=3
Commands\56\Command29=true
Commands\57\Type=Noise Blanker
Commands\57\String=\\x16\\x22
Commands\57\Min=0
Commands\57\Max=1
Commands\57\Command29=true
Commands\58\Type=Audio Peak Filter
Commands\58\String=\\x16\\x32
Commands\58\Min=0
Commands\58\Max=3
Commands\58\Command29=true
Commands\59\Type=Noise Reduction
Commands\59\String=\\x16\\x40
Commands\59\Min=0
Commands\59\Max=1
Commands\59\Command29=true
Commands\60\Type=Auto Notch
Commands\60\String=\\x16\\x41
Commands\60\Min=0
Commands\60\Max=1
Commands\60\Command29=true
Commands\61\Type=Repeater Tone
Commands\61\String=\\x16\\x42
Commands\61\Min=0
Commands\61\Max=1
Commands\61\Command29=true
Commands\62\Type=Repeater TSQL
Commands\62\String=\\x16\\x43
Commands\62\Min=0
Commands\62\Max=1
Commands\62\Command29=true
Commands\63\Type=Compressor Status
Commands\63\String=\\x16\\x44
Commands\63\Min=0
Commands\63\Max=1
Commands\63\Command29=false
Commands\64\Type=Monitor Status
Commands\64\String=\\x16\\x45
Commands\64\Min=0
Commands\64\Max=1
Commands\64\Command29=false
Commands\65\Type=Vox Status
Commands\65\String=\\x16\\x46
Commands\65\Min=0
Commands\65\Max=1
Commands\65\Command29=false
Commands\66\Type=Break-In Status
Commands\66\String=\\x16\\x47
Commands\66\Min=0
Commands\66\Max=2
Commands\66\Command29=false
Commands\67\Type=Manual Notch
Commands\67\String=\\x16\\x48
Commands\67\Min=0
Commands\67\Max=1
Commands\67\Command29=true
Commands\68\Type=DIGI-Sel Status
Commands\68\String=\\x16\\x4e
Commands\68\Min=0
Commands\68\Max=1
Commands\68\Command29=true
Commands\69\Type=Twin Peak Filter
Commands\69\String=\\x16\\x4f
Commands\69\Min=0
Commands\69\Max=1
Commands\69\Command29=true
Commands\70\Type=Dial Lock Status
Commands\70\String=\\x16\\x50
Commands\70\Min=0
Commands\70\Max=1
Commands\70\Command29=false
Commands\71\Type=RX Antenna
Commands\71\String=\\x16\\x53
Commands\71\Min=0
Commands\71\Max=1
Commands\71\Command29=true
Commands\72\Type=DSP IF Filter
Commands\72\String=\\x16\\x56
Commands\72\Min=0
Commands\72\Max=1
Commands\72\Command29=true
Commands\73\Type=SSB Bandwidth
Commands\73\String=\\x16\\x58
Commands\73\Min=0
Commands\73\Max=2
Commands\73\Command29=false
Commands\74\Type=Main/Sub Tracking
Commands\74\String=\\x16\\x5e
Commands\74\Min=0
Commands\74\Max=1
Commands\74\Command29=false
Commands\75\Type=IP Plus Status
Commands\75\String=\\x16\\x65
Commands\75\Min=0
Commands\75\Max=1
Commands\75\Command29=true
Commands\76\Type=Send CW
Commands\76\String=\\x17
Commands\76\Min=0
Commands\76\Max=30
Commands\76\Command29=false
Commands\77\Type=Power Control
Commands\77\String=\\x18
Commands\77\Min=0
Commands\77\Max=1
Commands\77\Command29=false
Commands\78\Type=Transceiver ID
Commands\78\String=\\x19
Commands\78\Min=0
Commands\78\Max=0
Commands\78\Command29=false
Commands\79\Type=Memory Contents
Commands\79\String=\\x1a\\00
Commands\79\Min=1
Commands\79\Max=101
Commands\79\Command29=false
Commands\80\Type=Band Stacking Reg
Commands\80\String=\\x1a\\x01
Commands\80\Min=1
Commands\80\Max=11
Commands\80\Command29=false
Commands\81\Type=Filter Width
Commands\81\String=\\x1a\\x03
Commands\81\Min=0
Commands\81\Max=10000
Commands\82\Type=Quick Dual Watch
Commands\82\String=\\x1a\\x05\\x00\\x32
Commands\81\Command29=true
Commands\82\Type=AGC Time Constant
Commands\82\String=\\x1a\\x04
Commands\82\Min=0
Commands\82\Max=1
Commands\83\Type=Quick Split
Commands\83\String=\\x1a\\x05\\x00\\x33
Commands\82\Max=0
Commands\82\Command29=true
Commands\83\Type=Quick Dual Watch
Commands\83\String=\\x1a\\x05\\x00\\x32
Commands\83\Min=0
Commands\83\Max=1
Commands\84\Type=REF Adjust
Commands\84\String=\\x1a\\x05\\x00\\x72
Commands\83\Command29=false
Commands\84\Type=Quick Split
Commands\84\String=\\x1a\\x05\\x00\\x33
Commands\84\Min=0
Commands\84\Max=255
Commands\85\Type=REF Adjust Fine
Commands\85\String=\\x1A\\x05\\x00\\x73
Commands\84\Max=1
Commands\84\Command29=false
Commands\85\Type=REF Adjust
Commands\85\String=\\x1a\\x05\\x00\\x72
Commands\85\Min=0
Commands\85\Max=255
Commands\86\Type=ACC1 Mod Level
Commands\86\String=\\x1A\\x05\\x00\\x88
Commands\85\Command29=false
Commands\86\Type=REF Adjust Fine
Commands\86\String=\\x1A\\x05\\x00\\x73
Commands\86\Min=0
Commands\86\Max=255
Commands\87\Type=USB Mod Level
Commands\87\String=\\x1a\\x05\\x00\\x89
Commands\86\Command29=false
Commands\87\Type=ACC1 Mod Level
Commands\87\String=\\x1A\\x05\\x00\\x88
Commands\87\Min=0
Commands\87\Max=255
Commands\88\Type=LAN Mod Level
Commands\88\String=\\x1a\\x05\\x00\\x90
Commands\87\Command29=false
Commands\88\Type=USB Mod Level
Commands\88\String=\\x1a\\x05\\x00\\x89
Commands\88\Min=0
Commands\88\Max=255
Commands\89\Type=Data Off Mod Input
Commands\89\String=\\x1a\\x05\\x00\\x91
Commands\88\Command29=false
Commands\89\Type=LAN Mod Level
Commands\89\String=\\x1a\\x05\\x00\\x90
Commands\89\Min=0
Commands\89\Max=5
Commands\90\Type=DATA1 Mod Input
Commands\90\String=\\x1a\\x05\\x00\\x92
Commands\89\Max=255
Commands\89\Command29=false
Commands\90\Type=Data Off Mod Input
Commands\90\String=\\x1a\\x05\\x00\\x91
Commands\90\Min=0
Commands\90\Max=5
Commands\91\Type=DATA2 Mod Input
Commands\91\String=\\x1a\\x05\\x00\\x93
Commands\90\Command29=false
Commands\91\Type=DATA1 Mod Input
Commands\91\String=\\x1a\\x05\\x00\\x92
Commands\91\Min=0
Commands\91\Max=5
Commands\92\Type=DATA3 Mod Input
Commands\92\String=\\x1a\\x05\\x00\\x94
Commands\91\Command29=false
Commands\92\Type=DATA2 Mod Input
Commands\92\String=\\x1a\\x05\\x00\\x93
Commands\92\Min=0
Commands\92\Max=5
Commands\93\Type=CIV Transceive
Commands\93\String=\\x1a\\x05\\x01\\x12
Commands\92\Command29=false
Commands\93\Type=DATA3 Mod Input
Commands\93\String=\\x1a\\x05\\x00\\x94
Commands\93\Min=0
Commands\93\Max=1
Commands\94\Type=System Date
Commands\94\String=\\x1a\\x05\\x01\\x58
Commands\93\Max=5
Commands\93\Command29=false
Commands\94\Type=CIV Transceive
Commands\94\String=\\x1a\\x05\\x01\\x12
Commands\94\Min=0
Commands\94\Max=0
Commands\95\Type=System Time
Commands\95\String=\\x1a\\x05\\x01\\x59
Commands\94\Max=1
Commands\94\Command29=false
Commands\95\Type=System Date
Commands\95\String=\\x1a\\x05\\x01\\x58
Commands\95\Min=0
Commands\95\Max=0
Commands\96\Type=UTC Offset
Commands\96\String=\\x1a\\x05\\x01\\x62
Commands\95\Command29=false
Commands\96\Type=System Time
Commands\96\String=\\x1a\\x05\\x01\\x59
Commands\96\Min=0
Commands\96\Max=0
Commands\97\Type=Dash Ratio
Commands\97\String=\\x1a\\x05\\x02\\x28
Commands\97\Min=28
Commands\97\Max=45
Commands\98\Type=Data Mode Filter
Commands\98\String=\\x1a\\x06
Commands\98\Min=0
Commands\98\Max=65535
Commands\99\Type=Transceiver Status
Commands\99\String=\\x1c\\x00
Commands\96\Command29=false
Commands\97\Type=UTC Offset
Commands\97\String=\\x1a\\x05\\x01\\x62
Commands\97\Min=0
Commands\97\Max=0
Commands\97\Command29=false
Commands\98\Type=Dash Ratio
Commands\98\String=\\x1a\\x05\\x02\\x28
Commands\98\Min=28
Commands\98\Max=45
Commands\98\Command29=false
Commands\99\Type=Data Mode Filter
Commands\99\String=\\x1a\\x06
Commands\99\Min=0
Commands\99\Max=1
Commands\100\Type=Tuner/ATU Status
Commands\100\String=\\x1c\\x01
Commands\99\Max=65535
Commands\99\Command29=true
Commands\100\Type=AF Mute Status
Commands\100\String=\\x1a\\x09
Commands\100\Min=0
Commands\100\Max=2
Commands\101\Type=XFC Status
Commands\101\String=\\x1c\\x02
Commands\100\Max=1
Commands\100\Command29=true
Commands\101\Type=Transceiver Status
Commands\101\String=\\x1c\\x00
Commands\101\Min=0
Commands\101\Max=1
Commands\102\Type=Read TX Freq
Commands\102\String=\\x1c\\x03
Commands\101\Command29=false
Commands\102\Type=Tuner/ATU Status
Commands\102\String=\\x1c\\x01
Commands\102\Min=0
Commands\102\Max=1
Commands\103\Type=CI-V Output
Commands\103\String=\\x1c\\x04
Commands\102\Max=2
Commands\102\Command29=false
Commands\103\Type=XFC Status
Commands\103\String=\\x1c\\x02
Commands\103\Min=0
Commands\103\Max=1
Commands\104\Type=RIT Frequency
Commands\104\String=\\x21\\x00
Commands\104\Min=-9999
Commands\104\Max=9999
Commands\105\Type=RIT Status
Commands\105\String=\\x21\\x01
Commands\103\Command29=false
Commands\104\Type=Read TX Freq
Commands\104\String=\\x1c\\x03
Commands\104\Min=0
Commands\104\Max=1
Commands\104\Command29=false
Commands\105\Type=CI-V Output
Commands\105\String=\\x1c\\x04
Commands\105\Min=0
Commands\105\Max=1
Commands\106\Type=RIT TX Status
Commands\106\String=\\x21\\x02
Commands\106\Min=0
Commands\106\Max=1
Commands\107\Type=Selected Freq
Commands\107\String=\\x25\\x00
Commands\105\Command29=false
Commands\106\Type=RIT Frequency
Commands\106\String=\\x21\\x00
Commands\106\Min=-9999
Commands\106\Max=9999
Commands\106\Command29=false
Commands\107\Type=RIT Status
Commands\107\String=\\x21\\x01
Commands\107\Min=0
Commands\107\Max=0
Commands\108\Type=Unselected Freq
Commands\108\String=\\x25\\x01
Commands\107\Max=1
Commands\107\Command29=false
Commands\108\Type=RIT TX Status
Commands\108\String=\\x21\\x02
Commands\108\Min=0
Commands\108\Max=0
Commands\109\Type=Selected Mode
Commands\109\String=\\x26\\x00
Commands\108\Max=1
Commands\108\Command29=false
Commands\109\Type=Selected Freq
Commands\109\String=\\x25\\x00
Commands\109\Min=0
Commands\109\Max=0
Commands\110\Type=Unselected Mode
Commands\110\String=\\x26\\x01
Commands\109\Command29=false
Commands\110\Type=Unselected Freq
Commands\110\String=\\x25\\x01
Commands\110\Min=0
Commands\110\Max=0
Commands\111\Type=Scope Main Wave Data
Commands\111\String=\\x27\\x00\\x00
Commands\110\Command29=false
Commands\111\Type=Selected Mode
Commands\111\String=\\x26\\x00
Commands\111\Min=0
Commands\111\Max=0
Commands\112\Type=Scope On/Off
Commands\112\String=\\x27\\x10
Commands\111\Command29=false
Commands\112\Type=Unselected Mode
Commands\112\String=\\x26\\x01
Commands\112\Min=0
Commands\112\Max=1
Commands\113\Type=Scope Data Output
Commands\113\String=\\x27\\x11
Commands\112\Max=0
Commands\112\Command29=false
Commands\113\Type=Scope Main Wave Data
Commands\113\String=\\x27\\x00\\x00
Commands\113\Min=0
Commands\113\Max=1
Commands\114\Type=Scope Main/Sub
Commands\114\String=\\x27\\x12
Commands\113\Max=0
Commands\113\Command29=false
Commands\114\Type=Scope On/Off
Commands\114\String=\\x27\\x10
Commands\114\Min=0
Commands\114\Max=1
Commands\115\Type=Scope Single/Dual
Commands\115\String=\\x27\\x13
Commands\114\Command29=false
Commands\115\Type=Scope Data Output
Commands\115\String=\\x27\\x11
Commands\115\Min=0
Commands\115\Max=1
Commands\116\Type=Scope Main Mode
Commands\116\String=\\x27\\x14\\x00
Commands\115\Command29=false
Commands\116\Type=Scope Main/Sub
Commands\116\String=\\x27\\x12
Commands\116\Min=0
Commands\116\Max=4
Commands\117\Type=Scope Main Span
Commands\117\String=\\x27\\x15\\x00
Commands\116\Max=1
Commands\116\Command29=false
Commands\117\Type=Scope Single/Dual
Commands\117\String=\\x27\\x13
Commands\117\Min=0
Commands\117\Max=7
Commands\118\Type=Scope Main Edge
Commands\118\String=\\x27\\x16\\x00
Commands\118\Min=1
Commands\117\Max=1
Commands\117\Command29=false
Commands\118\Type=Scope Main Mode
Commands\118\String=\\x27\\x14\\x00
Commands\118\Min=0
Commands\118\Max=4
Commands\119\Type=Scope Main Hold
Commands\119\String=\\x27\\x17\\x00
Commands\118\Command29=false
Commands\119\Type=Scope Main Span
Commands\119\String=\\x27\\x15\\x00
Commands\119\Min=0
Commands\119\Max=1
Commands\120\Type=Scope Main Ref
Commands\120\String=\\x27\\x19\\x00
Commands\120\Min=-30
Commands\120\Max=10
Commands\121\Type=Scope Main Speed
Commands\121\String=\\x27\\x1a\\x00
Commands\119\Max=7
Commands\119\Command29=false
Commands\120\Type=Scope Main Edge
Commands\120\String=\\x27\\x16\\x00
Commands\120\Min=1
Commands\120\Max=4
Commands\120\Command29=false
Commands\121\Type=Scope Main Hold
Commands\121\String=\\x27\\x17\\x00
Commands\121\Min=0
Commands\121\Max=2
Commands\122\Type=Scope During TX
Commands\122\String=\\x27\\x1b
Commands\122\Min=0
Commands\122\Max=1
Commands\123\Type=Scope Center Type
Commands\123\String=\\x27\\x1c
Commands\121\Max=1
Commands\121\Command29=false
Commands\122\Type=Scope Main Ref
Commands\122\String=\\x27\\x19\\x00
Commands\122\Min=-30
Commands\122\Max=10
Commands\122\Command29=false
Commands\123\Type=Scope Main Speed
Commands\123\String=\\x27\\x1a\\x00
Commands\123\Min=0
Commands\123\Max=2
Commands\124\Type=Scope Main VBW
Commands\124\String=\\x27\\x1d\\x00
Commands\123\Command29=false
Commands\124\Type=Scope During TX
Commands\124\String=\\x27\\x1b
Commands\124\Min=0
Commands\124\Max=1
Commands\125\Type=Scope Fixed Edge Freq
Commands\125\String=\\x27\\x1e
Commands\125\Min=1
Commands\125\Max=12
Commands\126\Type=Scope Main RBW
Commands\126\String=\\x27\\x1f
Commands\124\Command29=false
Commands\125\Type=Scope Center Type
Commands\125\String=\\x27\\x1c
Commands\125\Min=0
Commands\125\Max=2
Commands\125\Command29=false
Commands\126\Type=Scope Main VBW
Commands\126\String=\\x27\\x1d\\x00
Commands\126\Min=0
Commands\126\Max=2
Commands\127\Type=Main/Sub Prefix
Commands\127\String=\\x29
Commands\127\Min=0
Commands\127\Max=1
Commands\128\Type=Command Error FA
Commands\128\String=\\xfa
Commands\126\Max=1
Commands\126\Command29=false
Commands\127\Type=Scope Fixed Edge Freq
Commands\127\String=\\x27\\x1e
Commands\127\Min=1
Commands\127\Max=12
Commands\127\Command29=false
Commands\128\Type=Scope Main RBW
Commands\128\String=\\x27\\x1f
Commands\128\Min=0
Commands\128\Max=0
Commands\129\Type=Command OK FB
Commands\129\String=\\xfb
Commands\128\Max=2
Commands\128\Command29=false
Commands\129\Type=Main/Sub Prefix
Commands\129\String=\\x29
Commands\129\Min=0
Commands\129\Max=0
Commands\size=129
Commands\129\Max=1
Commands\129\Command29=false
Commands\130\Type=Command Error FA
Commands\130\String=\\xfa
Commands\130\Min=0
Commands\130\Max=0
Commands\130\Command29=false
Commands\131\Type=Command OK FB
Commands\131\String=\\xfb
Commands\131\Min=0
Commands\131\Max=0
Commands\131\Command29=false
Commands\size=131
Spans\1\Num=0
Spans\1\Name=±2.5 KHz
Spans\1\Freq=2500

Wyświetl plik

@ -39,14 +39,14 @@ void tableWidget::mouseReleaseEvent(QMouseEvent *event)
}
else if( selectedAction == clone )
{
int row=this->currentRow();
int rown=this->rowCount();
this->insertRow(this->rowCount());
int row=this->currentRow(); // This will be the new row with the old one as row+1
this->insertRow(this->currentRow());
for (int i=0;i<this->columnCount();i++)
{
if (this->item(row,i) != NULL) this->model()->setData(this->model()->index(rown,i),this->item(row,i)->text());
if (this->item(row+1,i) != NULL && dynamic_cast<QComboBox*>(this->item(row+1,i)) == nullptr) // Don't try to copy checkbox
this->model()->setData(this->model()->index(row,i),this->item(row+1,i)->text());
}
emit rowAdded(rown);
emit rowAdded(row);
}
else if( selectedAction == del )
{

Wyświetl plik

@ -295,12 +295,13 @@ struct spanType {
struct funcType {
funcType() {}
funcType(funcs cmd, QString name, QByteArray data, int minVal, int maxVal) : cmd(cmd), name(name), data(data), minVal(minVal), maxVal(maxVal) {}
funcType(funcs cmd, QString name, QByteArray data, int minVal, int maxVal, bool cmd29) : cmd(cmd), name(name), data(data), minVal(minVal), maxVal(maxVal), cmd29(cmd29) {}
funcs cmd;
QString name;
QByteArray data;
int minVal;
int maxVal;
bool cmd29;
};
struct commandtype {