kopia lustrzana https://github.com/Hamlib/Hamlib
don't save split and repeater shift properties when not necessary
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1652 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.0
rodzic
c32a13e7c6
commit
c54ab64e79
|
@ -2,7 +2,7 @@
|
||||||
* memsave.c - Copyright (C) 2003 Thierry Leconte
|
* memsave.c - Copyright (C) 2003 Thierry Leconte
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Id: memsave.c,v 1.3 2004-01-15 22:43:59 fillods Exp $
|
* $Id: memsave.c,v 1.4 2004-01-21 19:47:15 f4dwv Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -159,21 +159,14 @@ int dump_xml_chan(RIG *rig, xmlNodePtr root, int i, int chan_num)
|
||||||
sprintf(attrbuf,"%d",(int)chan.tx_width);
|
sprintf(attrbuf,"%d",(int)chan.tx_width);
|
||||||
xmlNewProp(node, "tx_width", attrbuf);
|
xmlNewProp(node, "tx_width", attrbuf);
|
||||||
}
|
}
|
||||||
if (rig->state.chan_list[i].mem_caps.split) {
|
if (rig->state.chan_list[i].mem_caps.split && chan.split!=RIG_SPLIT_OFF) {
|
||||||
switch(chan.split) {
|
xmlNewProp(node, "split", "on");
|
||||||
case RIG_SPLIT_OFF:
|
if (rig->state.chan_list[i].mem_caps.tx_vfo) {
|
||||||
xmlNewProp(node, "split", "off");
|
sprintf(attrbuf,"%x",chan.tx_vfo);
|
||||||
break;
|
xmlNewProp(node, "tx_vfo", attrbuf);
|
||||||
case RIG_SPLIT_ON:
|
|
||||||
xmlNewProp(node, "split", "on");
|
|
||||||
if (rig->state.chan_list[i].mem_caps.tx_vfo) {
|
|
||||||
sprintf(attrbuf,"%x",chan.tx_vfo);
|
|
||||||
xmlNewProp(node, "tx_vfo", attrbuf);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rig->state.chan_list[i].mem_caps.rptr_shift) {
|
if (rig->state.chan_list[i].mem_caps.rptr_shift && chan.rptr_shift!=RIG_RPT_SHIFT_NONE) {
|
||||||
switch(chan.rptr_shift) {
|
switch(chan.rptr_shift) {
|
||||||
case RIG_RPT_SHIFT_NONE:
|
case RIG_RPT_SHIFT_NONE:
|
||||||
xmlNewProp(node, "rptr_shift", "=");
|
xmlNewProp(node, "rptr_shift", "=");
|
||||||
|
@ -185,10 +178,10 @@ int dump_xml_chan(RIG *rig, xmlNodePtr root, int i, int chan_num)
|
||||||
xmlNewProp(node, "rptr_shift", "-");
|
xmlNewProp(node, "rptr_shift", "-");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rig->state.chan_list[i].mem_caps.rptr_offs && chan.rptr_shift!=RIG_RPT_SHIFT_NONE) {
|
if (rig->state.chan_list[i].mem_caps.rptr_offs) {
|
||||||
sprintf(attrbuf,"%d",(int)chan.rptr_offs);
|
sprintf(attrbuf,"%d",(int)chan.rptr_offs);
|
||||||
xmlNewProp(node, "rptr_offs", attrbuf);
|
xmlNewProp(node, "rptr_offs", attrbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rig->state.chan_list[i].mem_caps.tuning_step && chan.tuning_step !=0) {
|
if (rig->state.chan_list[i].mem_caps.tuning_step && chan.tuning_step !=0) {
|
||||||
sprintf(attrbuf,"%d",(int)chan.tuning_step);
|
sprintf(attrbuf,"%d",(int)chan.tuning_step);
|
||||||
|
@ -230,7 +223,6 @@ int dump_xml_chan(RIG *rig, xmlNodePtr root, int i, int chan_num)
|
||||||
sprintf(attrbuf,"%x",chan.flags);
|
sprintf(attrbuf,"%x",chan.flags);
|
||||||
xmlNewProp(node, "flags", attrbuf);
|
xmlNewProp(node, "flags", attrbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue