PRIVATE int
setSquelch(int n, char **p) {
- rx[RL].squelch.thresh = -atof(p[0]);
+ rx[RL].squelch.thresh = atof(p[0]);
return 0;
}
}
}
+PRIVATE int
+setCompandSt(int n, char **p) {
+ if (n < 1) {
+ tx.cpd.flag = FALSE;
+ return 0;
+ } else {
+ BOOLEAN flag = atoi(p[0]);
+ if (n > 1) {
+ switch (atoi(p[1])) {
+ case RX: rx[RL].cpd.flag = flag; break;
+ case TX:
+ default: tx.cpd.flag = flag; break;
+ }
+ } else
+ tx.cpd.flag = flag;
+ return 0;
+ }
+}
+
+PRIVATE int
+setCompand(int n, char **p) {
+ if (n < 1)
+ return -1;
+ else {
+ REAL fac = atof(p[0]);
+ if (n > 1) {
+ switch (atoi(p[1])) {
+ case RX: WSCReset(rx[RL].cpd.gen, fac); break;
+ case TX:
+ default: WSCReset(tx.cpd.gen, fac); break;
+ }
+ } else
+ WSCReset(tx.cpd.gen, fac);
+ return 0;
+ }
+}
+
//------------------------------------------------------------------------
// [type]
uni.spec.rxk = RL;
switch (n) {
case 3:
- uni.spec.rxk = atoi(p[2]);
+ uni.spec.rxk = atoi(p[2]);
case 2:
uni.spec.scale = atoi(p[1]);
+ break;
case 1:
- uni.spec.type = atoi(p[0]);
+ uni.spec.type = atoi(p[0]);
break;
case 0:
- return 0;
+ break;
default:
return -1;
}
+ return uni.spec.type;
}
-#if 0
PRIVATE int
-setSpectrumType(int n, char **p) {
- switch (n) {
- case 3:
- uni.spec.type = atoi(p[0]);
- uni.spec.scale = atoi(p[1]);
- uni.spec.rxk = atoi(p[2]);
- case 2:
- uni.spec.type = atoi(p[0]);
- uni.spec.scale = atoi(p[1]);
- uni.spec.rxk = RL;
- break;
- case 1:
- uni.spec.type = atoi(p[0]);
- uni.spec.scale = SPEC_PWR;
- uni.spec.rxk = RL;
- break;
- case 0:
- uni.spec.type = SPEC_POST_FILT;
- uni.spec.scale = SPEC_PWR;
- uni.spec.rxk = RL;
- break;
- default:
+setDCBlockSt(int n, char **p) {
+ if (n < 1) {
+ tx.dcb.flag = FALSE;
+ return 0;
+ } else {
+ tx.dcb.flag = atoi(p[0]);
+ return 0;
+ }
+}
+
+PRIVATE int
+setDCBlock(int n, char **p) {
+ if (n < 1)
return -1;
+ else {
+ resetDCBlocker(tx.dcb.gen, atoi(p[0]));
+ return 0;
}
- return 0;
}
-#endif
//========================================================================
{"setRXPan", setRXPan},
{"setAuxMixSt", setAuxMixSt},
{"setAuxMixGain", setAuxMixGain},
+ {"setCompandSt", setCompandSt},
+ {"setCompand", setCompand},
{"setMeterType", setMeterType},
{"setSpectrumType", setSpectrumType},
+ {"setDCBlockSt", setDCBlockSt},
+ {"setDCBlock", setDCBlock},
{ 0, 0 }
};