kopia lustrzana https://gitlab.com/eliggett/wfview
Fix invalid filter width being sent to rig by rigctld.
rodzic
996c813251
commit
5c210f0699
|
@ -897,8 +897,6 @@ void rigCommander::setPassband(quint16 pass)
|
|||
calc = quint16((pass / 50) - 1);
|
||||
}
|
||||
|
||||
qDebug() << "Setting rig passband" << pass << "Sending" << calc;
|
||||
|
||||
char tens = (calc / 10);
|
||||
char units = (calc - (10 * tens));
|
||||
|
||||
|
@ -4695,7 +4693,7 @@ void rigCommander::stateUpdated()
|
|||
if (i.value()._valid) {
|
||||
setDataMode(state.getBool(DATAMODE), state.getChar(FILTER));
|
||||
}
|
||||
getDuplexMode();
|
||||
getDataMode();
|
||||
break;
|
||||
case ANTENNA:
|
||||
case RXANTENNA:
|
||||
|
|
56
rigctld.cpp
56
rigctld.cpp
|
@ -663,16 +663,60 @@ void rigCtlClient::socketReadyRead()
|
|||
|
||||
if (passband > 0)
|
||||
{
|
||||
if (passband > 1800 && passband < 2700) {
|
||||
switch ((mode_kind)getMode(mode)) {
|
||||
|
||||
case modeAM:
|
||||
if (passband > 6000) {
|
||||
width = 1;
|
||||
}
|
||||
else if (passband <= 1800)
|
||||
{
|
||||
else if (passband > 3000 && passband <= 6000) {
|
||||
width = 2;
|
||||
}
|
||||
else if (passband >= 2700)
|
||||
{
|
||||
width = 0;
|
||||
else if (passband <= 3000) {
|
||||
width = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
case modeFM:
|
||||
if (passband > 10000) {
|
||||
width = 1;
|
||||
}
|
||||
else if (passband > 7000 && passband <= 10000) {
|
||||
width = 2;
|
||||
}
|
||||
else if (passband <= 7000) {
|
||||
width = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
case modeCW:
|
||||
case modeRTTY:
|
||||
case modeCW_R:
|
||||
case modeRTTY_R:
|
||||
case modePSK:
|
||||
if (passband > 500) {
|
||||
width = 1;
|
||||
}
|
||||
else if (passband > 250 && passband <= 500) {
|
||||
width = 2;
|
||||
}
|
||||
else if (passband <= 250) {
|
||||
width = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (passband > 2400) {
|
||||
width = 1;
|
||||
}
|
||||
else if (passband > 1800 && passband <= 2400) {
|
||||
width = 2;
|
||||
}
|
||||
else if (passband <= 1800) {
|
||||
width = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
rigState->set(FILTER, width, true);
|
||||
rigState->set(PASSBAND, passband, true);
|
||||
|
|
Ładowanie…
Reference in New Issue