mirror of
https://git.code.sf.net/p/fldigi/flrig
synced 2026-08-13 17:28:24 -04:00
Pmax
* return maximum available power to rig.get_pwrmax
This commit is contained in:
parent
b9030b3184
commit
eaeb72120a
25 changed files with 44 additions and 30 deletions
|
|
@ -71,7 +71,7 @@ public:
|
|||
int get_power_out();
|
||||
int get_power_control();
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
void set_volume_control(int val);
|
||||
int get_volume_control();
|
||||
void get_vol_min_max_step(int &min, int &max, int &step);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
int get_power_out();
|
||||
int get_power_control();
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
void set_volume_control(int val);
|
||||
int get_volume_control();
|
||||
void get_vol_min_max_step(int &min, int &max, int &step);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 10; max = 200; step = 1; }
|
||||
min = 10; pmax = max = 200; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
virtual int get_power_control();
|
||||
virtual void set_power_control(double val);
|
||||
virtual void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
virtual void set_volume_control(int val);
|
||||
virtual int get_volume_control();
|
||||
|
|
@ -147,7 +147,7 @@ public:
|
|||
~RIG_FTdx101MP() {}
|
||||
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 200; step = 1; }
|
||||
min = 5; pmax = max = 200; step = 1; }
|
||||
int get_power_out();
|
||||
int get_power_control();
|
||||
void set_power_control(double val);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 200; step = 1; }
|
||||
min = 5; pmax = max = 200; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public:
|
|||
void set_volume_control(int val);
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 200; step = 1; }
|
||||
min = 5; pmax = max = 200; step = 1; }
|
||||
|
||||
int get_volume_control();
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
const char **bwtable(int m);
|
||||
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 200; step = 1; }
|
||||
min = 5; pmax = max = 200; step = 1; }
|
||||
|
||||
void set_PTT_control(int val);
|
||||
int get_PTT();
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
void set_power_control(double val);
|
||||
int get_power_control();
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 0; max = 2; step = 1; }
|
||||
min = 0; pmax = max = 2; step = 1; }
|
||||
|
||||
void set_mic_gain(int val);
|
||||
int get_mic_gain();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ enum TS2000MODES { LSB, USB, CW, FM, AM, FSK, CWR, FSKR, DIGI };
|
|||
// int get_volume_control();
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
// void tune_rig();
|
||||
void set_attenuator(int val);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
void set_power_control(double val);
|
||||
int get_power_control();
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
void set_if_shift(int val);
|
||||
bool get_if_shift(int &val);
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public:
|
|||
void set_power_control(double val);
|
||||
int get_power_control(void);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 0; max = 200; step = 1; }
|
||||
min = 0; pmax = max = 200; step = 1; }
|
||||
int get_power_out();
|
||||
|
||||
void set_PTT_control(int val);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public:
|
|||
int get_power_control();
|
||||
void set_power_control(double val);
|
||||
void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 5; max = 100; step = 1; }
|
||||
min = 5; pmax = max = 100; step = 1; }
|
||||
|
||||
void set_volume_control(int val);
|
||||
int get_volume_control();
|
||||
|
|
|
|||
|
|
@ -397,10 +397,11 @@ public:
|
|||
virtual int get_power_out(void) {return -1;}
|
||||
|
||||
int po_, po_val;
|
||||
int pmax;
|
||||
virtual int get_power_control(void) {return po_;}
|
||||
virtual void set_power_control(double val) {po_ = val;}
|
||||
virtual void get_pc_min_max_step(double &min, double &max, double &step) {
|
||||
min = 0; max = 100; step = 1; }
|
||||
min = 0; pmax = max = 100; step = 1; }
|
||||
|
||||
int vl_;
|
||||
virtual void set_volume_control(int val) {vl_ = val;}
|
||||
|
|
@ -649,7 +650,12 @@ int vfo_;
|
|||
|
||||
// KX3 power scale
|
||||
int powerScale;
|
||||
virtual int power_scale() { return 1; }
|
||||
virtual int power_scale() {
|
||||
return 1;
|
||||
}
|
||||
virtual int power_max() {
|
||||
return pmax;
|
||||
}
|
||||
};
|
||||
|
||||
extern rigbase *rigs[];
|
||||
|
|
|
|||
|
|
@ -1126,7 +1126,7 @@ int RIG_IC7100::get_power_control()
|
|||
|
||||
void RIG_IC7100::get_pc_min_max_step(double &min, double &max, double &step)
|
||||
{
|
||||
min = 0; max = 100; step = 1;
|
||||
min = 0; pmax = max = 100; step = 1;
|
||||
}
|
||||
|
||||
void RIG_IC7100::set_rf_gain(int val)
|
||||
|
|
|
|||
|
|
@ -1248,7 +1248,7 @@ int RIG_IC7300::get_power_control()
|
|||
|
||||
void RIG_IC7300::get_pc_min_max_step(double &min, double &max, double &step)
|
||||
{
|
||||
min = 0; max = 100; step = 1;
|
||||
min = 0; pmax = max = 100; step = 1;
|
||||
}
|
||||
|
||||
int RIG_IC7300::get_smeter()
|
||||
|
|
|
|||
|
|
@ -873,7 +873,7 @@ int RIG_IC7600::get_power_control()
|
|||
|
||||
void RIG_IC7600::get_pc_min_max_step(double &min, double &max, double &step)
|
||||
{
|
||||
min = 2; max = 100; step = 1;
|
||||
min = 2; pmax = max = 100; step = 1;
|
||||
}
|
||||
|
||||
int RIG_IC7600::get_smeter()
|
||||
|
|
|
|||
|
|
@ -1281,7 +1281,7 @@ int RIG_IC7610::get_power_control()
|
|||
|
||||
void RIG_IC7610::get_pc_min_max_step(double &min, double &max, double &step)
|
||||
{
|
||||
min = 2; max = 100; step = 1;
|
||||
min = 2; pmax = max = 100; step = 1;
|
||||
}
|
||||
|
||||
int RIG_IC7610::get_smeter()
|
||||
|
|
|
|||
|
|
@ -822,7 +822,7 @@ int RIG_IC7851::get_PTT()
|
|||
|
||||
void RIG_IC7851::get_pc_min_max_step(double &min, double &max, double &step)
|
||||
{
|
||||
min = 5; max = 200; step = 1;
|
||||
min = 5; pmax = max = 200; step = 1;
|
||||
}
|
||||
|
||||
// Volume control val 0 ... 100
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ int RIG_IC9100::get_power_control()
|
|||
|
||||
void RIG_IC9100::get_pc_min_max_step(double &min, double &max, double &step)
|
||||
{
|
||||
min = 0; max = 100; step = 1;
|
||||
min = 0; pmax = max = 100; step = 1;
|
||||
}
|
||||
|
||||
void RIG_IC9100::set_rf_gain(int val)
|
||||
|
|
|
|||
|
|
@ -1066,13 +1066,20 @@ public:
|
|||
rig_get_pwrmeter_scale(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_pwrmeter_scale", s) {}
|
||||
|
||||
void execute(XmlRpcValue& params, XmlRpcValue& result) {
|
||||
if (!xcvr_online || !selrig->has_power_out)
|
||||
result = (int)(0);
|
||||
else
|
||||
result = (int)(selrig->power_scale());
|
||||
result = (int)(selrig->power_scale());
|
||||
}
|
||||
} rig_get_pwrmeter_scale(&rig_server);
|
||||
|
||||
class rig_get_maxpwr : public XmlRpcServerMethod {
|
||||
public:
|
||||
rig_get_maxpwr(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_maxpwr", s) {}
|
||||
|
||||
void execute(XmlRpcValue& params, XmlRpcValue& result) {
|
||||
result = (int)(selrig->power_max());
|
||||
}
|
||||
} rig_get_maxpwr(&rig_server);
|
||||
|
||||
|
||||
class rig_get_pwrmeter : public XmlRpcServerMethod {
|
||||
public:
|
||||
rig_get_pwrmeter(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_pwrmeter", s) {}
|
||||
|
|
@ -2002,6 +2009,7 @@ struct MLIST {
|
|||
{ "rig.get_power", "s:n", "return power level control value" },
|
||||
{ "rig.get_pwrmeter", "s:n", "return PWR out" },
|
||||
{ "rig.get_pwrmeter_scale", "s:n", "return scale for power meter" },
|
||||
{ "rig.get_pwrmax", "s:n", "return maximum power available" },
|
||||
{ "rig.get_swrmeter", "s:n", "return SWR out" },
|
||||
{ "rig.get_smeter", "s:n", "return Smeter" },
|
||||
{ "rig.get_split", "s:n", "return split state" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue