Fix ref and tune on 7851

translations
Phil Taylor 2023-09-27 12:28:43 +01:00
rodzic 2765ab0844
commit 75b77a2792
8 zmienionych plików z 546 dodań i 533 usunięć

Wyświetl plik

@ -340,7 +340,10 @@ bool cachingQueue::compare(QVariant a, QVariant b)
changed=true;
} else if (!strcmp(a.typeName(),"uint")) {
if (a.value<uint>() != b.value<uint>())
changed=true;
changed=true;
} else if (!strcmp(a.typeName(),"int")) {
if (a.value<int>() != b.value<int>())
changed=true;
} else if (!strcmp(a.typeName(),"modeInfo")) {
if (a.value<modeInfo>().mk != b.value<modeInfo>().mk || a.value<modeInfo>().reg != b.value<modeInfo>().reg
|| a.value<modeInfo>().filter != b.value<modeInfo>().filter) {

Wyświetl plik

@ -124,6 +124,10 @@ QString debugWindow::getValue(QVariant val)
{
value = QString("Gr: %0 Me: %1").arg(val.value<uint>() >> 16 & 0xffff).arg(val.value<uint>() & 0xffff);
}
else if (!strcmp(val.typeName(),"int"))
{
value = QString("int: %0").arg(val.value<int>());
}
else if (!strcmp(val.typeName(),"modeInfo"))
{
modeInfo mi = val.value<modeInfo>();

Wyświetl plik

@ -5700,7 +5700,7 @@ void rigCommander::receiveCommand(funcs func, QVariant value, bool sub)
// will fail on some commands so they would need to be added here:
if (func != funcScopeFixedEdgeFreq && func != funcSpeech && func != funcBandStackReg && func != funcMemoryContents)
{
queue->addUnique(priorityImmediate,func);
queue->addUnique(priorityImmediate,func,false,sub);
}
}
prepDataAndSend(payload);

Wyświetl plik

@ -649,13 +649,13 @@ Commands\125\Max=1
Commands\125\Command29=false
Commands\126\Type=Scope Main Ref
Commands\126\String=\\x27\\x19\\x00
Commands\126\Min=-512
Commands\126\Max=512
Commands\126\Min=-300
Commands\126\Max=100
Commands\126\Command29=false
Commands\127\Type=Scope Sub Ref
Commands\127\String=\\x27\\x19\\x01
Commands\127\Min=-512
Commands\127\Max=512
Commands\127\Min=-300
Commands\127\Max=100
Commands\127\Command29=false
Commands\128\Type=Scope Main Speed
Commands\128\String=\\x27\\x1a\\x00
@ -863,61 +863,51 @@ Bands\14\Name=Gen
Bands\size=14
Modes\1\Num=0
Modes\1\Reg=0
Modes\1\BW=1
Modes\1\Min=50
Modes\1\Max=3600
Modes\1\Name=LSB
Modes\2\Num=1
Modes\2\Reg=1
Modes\2\BW=1
Modes\2\Min=50
Modes\2\Max=3600
Modes\2\Name=USB
Modes\3\Num=2
Modes\3\Reg=2
Modes\3\BW=1
Modes\3\Min=200
Modes\3\Max=10000
Modes\3\Name=AM
Modes\4\Num=3
Modes\4\Reg=3
Modes\4\BW=1
Modes\4\Min=50
Modes\4\Max=3600
Modes\4\Name=CW
Modes\5\Num=4
Modes\5\Reg=4
Modes\5\BW=1
Modes\5\Min=50
Modes\5\Max=2700
Modes\5\Name=RTTY
Modes\6\Num=5
Modes\6\Reg=5
Modes\6\BW=0
Modes\6\Min=0
Modes\6\Max=0
Modes\6\Name=FM
Modes\7\Num=6
Modes\7\Reg=7
Modes\7\BW=1
Modes\7\Min=50
Modes\7\Max=3600
Modes\7\Name=CW-R
Modes\8\Num=7
Modes\8\Reg=8
Modes\8\BW=1
Modes\8\Min=50
Modes\8\Max=2700
Modes\8\Name=RTTY-R
Modes\9\Num=8
Modes\9\Reg=18
Modes\9\BW=1
Modes\9\Min=50
Modes\9\Max=3600
Modes\9\Name=PSK
Modes\10\Num=9
Modes\10\Reg=19
Modes\10\BW=1
Modes\10\Min=50
Modes\10\Max=3600
Modes\10\Name=PSK-R

Plik diff jest za duży Load Diff

Wyświetl plik

@ -300,12 +300,12 @@ spectrumScope::spectrumScope(QWidget *parent)
connect(configRef, &QSlider::valueChanged, this, [=](const int &val) {
currentRef = (val/5) * 5; // rounded to "nearest 5"
queue->add(priorityImmediate,queueItem(sub?funcScopeSubRef:funcScopeMainRef,QVariant::fromValue(currentRef),false,sub));
queue->add(priorityImmediate,queueItem(sub?funcScopeSubRef:funcScopeMainRef,QVariant::fromValue(currentRef),false,this->sub));
});
connect(configSpeed, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](const int &val) {
queue->add(priorityImmediate,queueItem(sub?funcScopeSubSpeed:funcScopeMainSpeed,configSpeed->itemData(val),false,sub));
queue->add(priorityImmediate,queueItem(sub?funcScopeSubSpeed:funcScopeMainSpeed,configSpeed->itemData(val),false,this->sub));
});
connect(configTheme, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](const int &val) {
@ -1654,3 +1654,13 @@ void spectrumScope::newFrequency(qint64 freq)
queue->add(priorityImmediate,queueItem((sub?funcUnselectedFreq:funcSelectedFreq),QVariant::fromValue<freqt>(f),false,sub));
}
}
void spectrumScope::setRef(int ref)
{
configRef->setValue(ref);
}
void spectrumScope::setRefLimits(int lower, int upper)
{
configRef->setRange(lower,upper);
}

Wyświetl plik

@ -93,6 +93,8 @@ public:
void setSpeed(uchar s);
void displaySettings(int NumDigits, qint64 Minf, qint64 Maxf, int MinStep,FctlUnit unit,std::vector<bandType>* bands = Q_NULLPTR);
void setUnit(FctlUnit unit);
void setRefLimits(int lower, int upper);
void setRef(int ref);
public slots: // Can be called directly or updated via signal/slot
void selectScopeMode(spectrumMode_t m);
@ -129,7 +131,6 @@ private slots:
void clearPeaks();
void newFrequency(qint64 freq);
private:
void clearPlasma();
void computePlasma();
@ -245,6 +246,8 @@ private:
double pbtDefault = 0.0;
quint16 cwPitch = 600;
quint16 stepSize = 100;
int refLower=0;
int refUpper=0;
// Waterfall items;
QCPColorMap * colorMap = Q_NULLPTR;

Wyświetl plik

@ -3435,6 +3435,7 @@ funcs wfmain::getInputTypeCommand(inputTypes input)
void wfmain:: getInitialRigState()
{
// Initial list of queries to the radio.
// These are made when the program starts up
// and are used to adjust the UI to match the radio settings
@ -3479,8 +3480,24 @@ void wfmain:: getInitialRigState()
{
queue->add(priorityImmediate,queueItem(funcScopeOnOff,QVariant::fromValue(quint8(1)),false));
queue->add(priorityImmediate,queueItem(funcScopeDataOutput,QVariant::fromValue(quint8(1)),false));
// Find the scope ref limits
auto mr = rigCaps.commands.find(funcScopeMainRef);
if (mr != rigCaps.commands.end())
{
ui->mainScope->setRefLimits(mr.value().minVal,mr.value().maxVal);
queue->add(priorityImmediate,(funcScopeMainRef),false,false);
}
auto sr = rigCaps.commands.find(funcScopeSubRef);
if (sr != rigCaps.commands.end())
{
ui->subScope->setRefLimits(sr.value().minVal,sr.value().maxVal);
queue->add(priorityImmediate,(funcScopeSubRef),false,true);
}
}
ui->mainScope->enableScope(this->rigCaps.commands.contains(funcScopeMainMode));
ui->subScope->enableScope(this->rigCaps.commands.contains(funcScopeSubMode));
@ -5883,15 +5900,11 @@ void wfmain::receiveValue(cacheItem val){
ui->subScope->setHold(val.value.value<bool>());
break;
case funcScopeMainRef:
{
// scope reference level
// [1] 0x19
// [2] 0x00
// [3] 10dB digit, 1dB digit
// [4] 0.1dB digit, 0
// [5] 0x00 = +, 0x01 = -
ui->mainScope->setRef(val.value.value<int>());
break;
case funcScopeSubRef:
ui->subScope->setRef(val.value.value<int>());
break;
}
case funcScopeMainSpeed:
ui->mainScope->setSpeed(val.value.value<uchar>());
break;