Compare commits

...

2 Commits

82 changed files with 101404 additions and 11802 deletions

View File

@ -206,6 +206,7 @@
"071","HD8","Galapagos Is.","SA","2.00S","92.00W","10","12","A","11-15-45","HC8,HD8","",""
"072","HI","Dominican Republic","NA","18.30N","70.00W","8","11","A","11-15-45","HI","",""
"074","YS","El Salvador","NA","14.00N","89.00W","7","11","A","11-15-45","YS,HU","",""
"074","HU","El Salvador","NA","14.00N","89.00W","7","11","A","11-15-45","YS,HU","",""
"075","4L","Georgia","AS","41.30N","45.00E","21","29","A","11-15-45","4L > 03-01-93,UF < 03-01-93,RF,R6F,4J5F,U6F,EK6F,EM6F,EN6F,EO6F,ER6F < 06-30-93,EX6F,EY6F,EZ6F,RK6F,EX8F,4J5F,UK6F,UK6O,UK6Q,UK6V","",""
"075","UF","Georgia","AS","41.30N","45.00E","21","29","A","11-15-45","4L > 03-01-93,UF < 03-01-93,RF,R6F,4J5F,U6F,EK6F,EM6F,EN6F,EO6F,ER6F < 06-30-93,EX6F,EY6F,EZ6F,RK6F,EX8F,4J5F,UK6F,UK6O,UK6Q,UK6V","",""
"075","R6F","Georgia","AS","41.30N","45.00E","21","29","A","11-15-45","4L > 03-01-93,UF < 03-01-93,RF,R6F,4J5F,U6F,EK6F,EM6F,EN6F,EO6F,ER6F < 06-30-93,EX6F,EY6F,EZ6F,RK6F,EX8F,4J5F,UK6F,UK6O,UK6Q,UK6V","",""
@ -223,6 +224,7 @@
"079","FG","Guadeloupe","NA","17.00N","62.00W","8","11","A","11-15-45","FG","",""
"079","TO2","Guadeloupe","NA","17.00N","62.00W","8","11","A","11-15-45","FG","",""
"079","TO3","Guadeloupe","NA","17.00N","62.00W","8","11","A","11-15-45","FG","",""
"079","TO7","Guadeloupe","NA","17.00N","62.00W","8","11","A","11-15-45","FG","",""
"080","HR","Honduras","NA","14.00N","87.00W","7","11","A","11-15-45","HR,HQ","",""
"080","HQ","Honduras","NA","14.00N","87.00W","7","11","A","11-15-45","HR,HQ","",""
"081","DL/D","Germany ","EU","51.41N","11.83E","14","28","D","07-17-73","DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM","",""
@ -489,6 +491,7 @@
"179","ER","Moldavia","EU","47.00N","29.00E","16","29","A","11-15-45","UO,RO,U5O,R5O,EK5O,EM5O,EN5O,EO5O,ER5O,EX5O,EY5O,EZ5O,RK5O,EU5O,UK5O,ER > 07-01-93","",""
"180","SV/A","Mount Athos","EU","40.12N","24.18E","20","28","A","11-15-45","SY1MA,SV1JG/A,SV2ASP/A,SV0GV/3,SY,SV/A","",""
"181","C8","Mozambique","AF","15.00S","41.00E","37","53","A","11-15-45","C8,C9 > 09-17-63","",""
"181","C9","Mozambique","AF","15.00S","41.00E","37","53","A","11-15-45","C8,C9 > 09-17-63","",""
"182","KP1","Navassa I.","NA","18.00N","75.00W","8","11","A","11-15-45","KP1,NP1,WP1","",""
"183","PK5","Borneo Netherlands","OC","6.00S","107.00E","28","54","D","05-01-63","PK5","",""
"184","JZ0","N. Guinea Netherlands","OC","4.52S","140.73E","28","51","D","04-30-63","JZ0","",""
@ -505,6 +508,8 @@
"193","KR6","Okinawa Ryukyu Is.","AS","26.5N","127.99E","25","45","D","05-16-72","KR6,KR8,JR6,KA6","",""
"194","7J1","Okino Tori-shima","AS","27.30N","141.00E","27","45","D","12-01-80","7J1","",""
"196","ZC6","Palestine","AS","32.00N","35.00E","20","39","D","07-01-68","ZC6,4X1","",""
"196","E44","Palestine","AS","32.00N","35.00E","20","39","D","07-01-68","ZC6,4X1","",""
"196","4X1","Palestine","AS","32.00N","35.00E","20","39","D","07-01-68","ZC6,4X1","",""
"197","KH5","Palmyra & Jarvis Is.","OC","6.00N","162.00W","31","61","A","11-15-45","KH5,WH5,AH5,NH5.KH5J,WH5J,AH5J,NH5J","",""
"198","P2/P","Papua Territory","OC","5.12S","145.36E","28","51","D","09-16-75","P2,VK9/P","",""
"199","3Y/P","Peter I I.","AN","68.50S","90.45W","12","72","A","11-15-45","3Y1EE,3Y0PI,3Y/P","",""
@ -528,6 +533,8 @@
"212","LZ","Bulgaria","EU","43.14N","25.83E","20","28","A","11-15-45","LZ","",""
"213","FJ","Saint Martin","NA","18.00N","63.00W","8","11","A","11-15-45","FS,FJ","",""
"213","FS","Saint Martin","NA","18.00N","63.00W","8","11","A","11-15-45","FS,FJ","",""
"213","TO0","Saint Martin","NA","18.00N","63.00W","8","11","A","11-15-45","FS,FJ","",""
"213","TO9","Saint Martin","NA","18.00N","63.00W","8","11","A","11-15-45","FS,FJ","",""
"214","TK","Corsica","EU","42.00N","9.00E","15","28","A","11-15-45","TK","",""
"215","5B","Cyprus","AS","34.94N","32.97E","20","39","A","11-15-45","5B,H2,C4,P3","",""
"215","H2","Cyprus","AS","34.94N","32.97E","20","39","A","11-15-45","5B,H2,C4,P3","",""
@ -1114,6 +1121,15 @@
"023","2","Blenheim Reef","AF","5.70S","72.00E","39","41","D","06-30-75","1/BR,2","",""
"227","F","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TM","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TO","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TV","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TH,"France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","HW","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TX","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","HX","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TW","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TP","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"227","TQ","France","EU","48.48N","2.18E","14","27","A","11-15-45","F,TO,TV,HW,TX,TH,HX,HY,TW,TM,TP,TQ","",""
"093","3","Geyser Reef","AF","12.00S","46.50E","39","53","D","02-28-78","1/GR,3","",""
"111","VK0","Heard I.","AF","53.00S","73.24E","39","68","A","11-15-45","VK0HI,VK0IR","",""
"050","X","Mexico","NA","19.40N","99.42W","6","10","A","11-15-45","XE,XF,4A,4B,4C,6D,6E,6F,6G,6H,6I,6J,XB,XA,XC,XD,XG,XH,XI","",""

File diff suppressed because one or more lines are too long

9035
SWL.csv

File diff suppressed because it is too large Load Diff

View File

@ -233,13 +233,11 @@ kHz:75;Time(UTC):93;Days:59;ITU:49;Station:201;Lng:49;Target:62;Remarks:135;P:35
4687;0000-2400;;USA;HFDL-Barrow;;AK;;1;;
5095;0000-2400;;CAN;Stanag 75l CAN;;CAN;;1;;
5200;0000-2400;;USA;DRM-USCG;;USA;;1;;
5330.5;0000-2400;;EU;ALE-EU;Afica;Mideast;;EU;;1;;
5330.5;0000-2400;;USA;ALE-USA;;USA;;1;;
5346.5;0000-2400;;USA;ALE-USA;;USA;;1;;
5346.5;0000-2400;;EU;ALE-EU;Afica;Mideast;;EU;;1;;
5357;0000-2400;;Wld;ALE-World;;Wld;;1;;
5371.5;0000-2400;;Wld;ALE-World;;Wld;;1;;
5403.5;0000-2400;;Wld;ALE-World;;Wld;;1;;
5330.5;0000-2400;;USA;60mCh1-USA;;USA;;1;;
5346.5;0000-2400;;USA;60mCh2-USA;;USA;;1;;
5357.0;0000-2400;;USA;60mCh3-USA;;USA;;1;;
5371.5;0000-2400;;USA;60mCh4-USA;;Wld;;1;;
5403.5;0000-2400;;USA;60mCh5-USA;;Wld;;1;;
5451;0000-2400;;GUM;HFDL-Agana;;GUM;;1;;
5508;0000-2400;;USA;HFDL-San Francisco;;CA;;1;;
5514;0000-2400;;USA;HFDL-Molokai;;HWA;;1;;

1 kHz:75;Time(UTC):93;Days:59;ITU:49;Station:201;Lng:49;Target:62;Remarks:135;P:35;Start:60;Stop:60;
233 4687;0000-2400;;USA;HFDL-Barrow;;AK;;1;;
234 5095;0000-2400;;CAN;Stanag 75l CAN;;CAN;;1;;
235 5200;0000-2400;;USA;DRM-USCG;;USA;;1;;
236 5330.5;0000-2400;;EU;ALE-EU;Afica;Mideast;;EU;;1;; 5330.5;0000-2400;;USA;60mCh1-USA;;USA;;1;;
237 5330.5;0000-2400;;USA;ALE-USA;;USA;;1;; 5346.5;0000-2400;;USA;60mCh2-USA;;USA;;1;;
238 5346.5;0000-2400;;USA;ALE-USA;;USA;;1;; 5357.0;0000-2400;;USA;60mCh3-USA;;USA;;1;;
239 5346.5;0000-2400;;EU;ALE-EU;Afica;Mideast;;EU;;1;; 5371.5;0000-2400;;USA;60mCh4-USA;;Wld;;1;;
240 5357;0000-2400;;Wld;ALE-World;;Wld;;1;; 5403.5;0000-2400;;USA;60mCh5-USA;;Wld;;1;;
5371.5;0000-2400;;Wld;ALE-World;;Wld;;1;;
5403.5;0000-2400;;Wld;ALE-World;;Wld;;1;;
241 5451;0000-2400;;GUM;HFDL-Agana;;GUM;;1;;
242 5508;0000-2400;;USA;HFDL-San Francisco;;CA;;1;;
243 5514;0000-2400;;USA;HFDL-Molokai;;HWA;;1;;

View File

@ -40,7 +40,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("FlexRadio Systems")]
[assembly: AssemblyProduct("PowerSDR")]
[assembly: AssemblyCopyright("© 2003-2019 FlexRadio Systems. All rights reserved.")]
[assembly: AssemblyCopyright("© 2003-2020 FlexRadio Systems. All rights reserved.")]
[assembly: AssemblyTrademark("FlexRadio Systems")]
[assembly: AssemblyCulture("")]
@ -55,7 +55,7 @@ using System.Runtime.CompilerServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.8.0.131")]
[assembly: AssemblyVersion("2.8.0.163")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
@ -85,5 +85,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
[assembly: AssemblyFileVersion("2.8.0.131")]
[assembly: AssemblyFileVersion("2.8.0.163")]

View File

@ -2257,8 +2257,9 @@ namespace PowerSDR
return parser.Error1;
}
//Sets or reads VFO A frequency
public string ZZFA(string s)
//Sets or reads VFO A frequency
public string ZZFA(string s)
{
if(s.Length == parser.nSet)
{
@ -2272,12 +2273,12 @@ namespace PowerSDR
f = f + Convert.ToInt32(console.setupForm.RttyOffsetLow);
s = AddLeadingZeros(f);
s = s.Insert(5, separator);
}
}
else
s = s.Insert(5, separator);
console.VFOAFreq = double.Parse(s);
return "";
return "";
}
else if(s.Length == parser.nGet)
{
@ -2638,6 +2639,8 @@ namespace PowerSDR
byte addr = byte.Parse(s.Substring(0,2),NumberStyles.HexNumber);
byte val = byte.Parse(s.Substring(2,2),NumberStyles.HexNumber);
FWC.FlexWire_WriteValue(addr, val);
return "";
}
@ -2659,6 +2662,7 @@ namespace PowerSDR
byte val1 = byte.Parse(s.Substring(2,2), NumberStyles.HexNumber);
byte val2 = byte.Parse(s.Substring(4,2), NumberStyles.HexNumber);
FWC.FlexWire_Write2Value(addr, val1, val2);
return "";
@ -3664,15 +3668,39 @@ namespace PowerSDR
{
if(s.Length == parser.nSet)
{
if(s == "0")
console.MON = false;
else if(s == "1")
console.MON = true;
console.chkMON.CheckedChanged -= console.chkMON_CheckedChanged; // ke9ns mod turn eventoff
if (s == "0") // ke9ns mod: .146
{
//console.MON = false;
console.chkMON.Checked = false;
console.chkMON.Text = "MON";
Audio.MON_PRE = 0; // turn off MON_PRE
}
else if (s == "1") // ke9ns mod: .146 set MON to MONpr (this is standard MON mode, expect now you can use this with AM/FM modes)
{
// console.MON = true;
console.chkMON.Checked = true;
console.chkMON.Text = "MONpr";
Audio.MON_PRE = 1; // turn ON MON_PRE
}
else if (s == "2") // ke9ns add: .146 set MON to MONps (flex 3000/5000 only)
{
// console.MON = true;
console.chkMON.Checked = true;
console.chkMON.Text = "MONps";
Audio.MON_PRE = 0; // turn ON MON_PRE
}
console.chkMON.CheckedChanged += console.chkMON_CheckedChanged; //ke9ns mod turn eventoff
Audio.MON = console.chkMON.Checked; // ke9ns tell audio routine MON is on or OFF
return "";
}
else if(s.Length == parser.nGet)
{
bool retval = console.MON;
bool retval = console.MON; // ke9ns: get console.chkMON status
if(retval)
return "1";
else

View File

@ -346,7 +346,953 @@ namespace PowerSDR
}
}
//CAT2
public class SDRSerialPort2
{
public static event SerialRXEventHandler serial_rx_event;
private SerialPort commPort;
public SerialPort BasePort
{
get { return commPort; }
}
private bool isOpen = false;
private bool bitBangOnly = false;
//Added 2/14/2008 BT
public bool IsOpen
{
get { return commPort.IsOpen; }
}
public void Open()
{
commPort.Open();
}
public void Close()
{
commPort.Close();
}
public static Parity StringToParity(string s)
{
if (s == "none") return Parity.None;
if (s == "odd") return Parity.Odd;
if (s == "even") return Parity.Even;
if (s == "space") return Parity.Space;
if (s == "mark") return Parity.Mark;
return Parity.None; // error -- default to none
}
public static StopBits StringToStopBits(string s)
{
if (s == "0") return StopBits.None;
if (s == "1") return StopBits.One;
if (s == "1.5") return StopBits.OnePointFive;
if (s == "2") return StopBits.Two;
return StopBits.One; // error -- default
}
public SDRSerialPort2(int portidx)
{
commPort = new SerialPort();
commPort.Encoding = System.Text.Encoding.ASCII;
commPort.RtsEnable = true; // hack for soft rock ptt
commPort.DtrEnable = true; // set dtr off
//commPort.ErrorReceived += new SerialErrorReceivedEventHandler(this.SerialErrorReceived);
commPort.DataReceived += new SerialDataReceivedEventHandler(this.SerialReceivedData);
commPort.PinChanged += new SerialPinChangedEventHandler(this.SerialPinChanged);
commPort.PortName = "COM" + portidx.ToString();
commPort.Parity = Parity.None;
commPort.StopBits = StopBits.One;
commPort.Handshake = Handshake.None;
commPort.DataBits = 8;
commPort.BaudRate = 9600;
commPort.ReadTimeout = 5000;
commPort.WriteTimeout = 500;
commPort.ReceivedBytesThreshold = 1;
}
}
// set the comm parms ... can only be done if port is not open -- silently fails if port is open (fixme -- add some error checking)
//
public void setCommParms(int baudrate, Parity p, int databits, StopBits stop, Handshake handshake)
{
if ( commPort.IsOpen ) return; // bail out if it's already open
commPort.BaudRate = baudrate;
commPort.Parity = p;
commPort.StopBits = stop;
commPort.DataBits = databits;
// commPort.Handshake = handshake;
}
public uint put(string s)
{
if ( bitBangOnly ) return 0; // fixme -- throw exception?
commPort.Write(s);
return (uint)s.Length; // wjt fixme -- hack -- we don't know if we actually wrote things
}
// ke9ns add
public string put1(string s)
{
string answer="---";
if (bitBangOnly) return answer; // fixme -- throw exception?
commPort.Write("AI1;");
try
{
byte[] test = new byte[10];
// var tes1 = commPort.Read(test, 0, 4);
// test[0] = commPort.ReadByte();
// answer = test.ToString();
// Debug.WriteLine("BEAM: " + test[0] + " , " + test[1] + " , " + test[2] + " , " + test[3]);
// answer = commPort.ReadExisting();
Debug.WriteLine("BEAM: " + answer);
// answer = System.Text.Encoding.Default.GetString(test);
}
catch (Exception e)
{
// Debug.WriteLine("BEAM: " + e);
answer = "===";
}
return answer; // wjt fixme -- hack -- we don't know if we actually wrote things
} // put1
public int Create()
{
return Create(false);
}
// create port
public int Create(bool bit_bang_only)
{
bitBangOnly = bit_bang_only;
if ( isOpen ){ return -1; }
commPort.Open();
isOpen = commPort.IsOpen;
if ( isOpen )
return 0; // all is well
else
return -1; //error
}
public void Destroy()
{
try
{
commPort.Close();
}
catch(Exception)
{
}
isOpen = false;
}
public bool isCTS()
{
if ( !isOpen ) return false; // fixme error check
return commPort.CtsHolding;
}
public bool isDSR()
{
if ( !isOpen ) return false; // fixme error check
return commPort.DsrHolding;
}
public bool isRI()
{
if ( !isOpen ) return false; // fixme error check
return false;
}
public bool isRLSD()
{
if ( !isOpen ) return false; // fixme error check
return commPort.CDHolding;
}
public void setDTR(bool v)
{
if ( !isOpen ) return;
commPort.DtrEnable = v;
}
void SerialErrorReceived(object source, SerialErrorReceivedEventArgs e)
{
}
private bool use_for_keyptt = false;
public bool UseForKeyPTT
{
get { return use_for_keyptt; }
set { use_for_keyptt = value; }
}
private bool use_for_paddles = false;
public bool UseForPaddles
{
get { return use_for_paddles; }
set { use_for_paddles = value; }
}
private bool ptt_on_dtr = false;
public bool PTTOnDTR
{
get { return ptt_on_dtr; }
set { ptt_on_dtr = value; }
}
private bool ptt_on_rts = false;
public bool PTTOnRTS
{
get { return ptt_on_rts; }
set { ptt_on_rts = value; }
}
private bool key_on_dtr = false;
public bool KeyOnDTR
{
get { return key_on_dtr; }
set { key_on_dtr = value; }
}
private bool key_on_rts = false;
public bool KeyOnRTS
{
get { return key_on_rts; }
set { key_on_rts = value; }
}
private static bool reverse_paddles = false;
public static bool ReversePaddles
{
get { return reverse_paddles; }
set { reverse_paddles = value; }
}
void SerialPinChanged(object source, SerialPinChangedEventArgs e)
{
if (!use_for_keyptt && !use_for_paddles) return;
if (use_for_keyptt)
{
switch (e.EventType)
{
case SerialPinChange.DsrChanged:
bool b = commPort.DsrHolding;
if (ptt_on_dtr)
{
CWPTTItem item = new CWPTTItem(b, CWSensorItem.GetCurrentTime());
CWKeyer.PTTEnqueue(item);
}
if (key_on_dtr)
{
CWSensorItem item = new CWSensorItem(CWSensorItem.InputType.StraightKey, b);
CWKeyer.SensorEnqueue(item);
}
break;
case SerialPinChange.CtsChanged:
b = commPort.CtsHolding;
if (ptt_on_rts)
{
CWPTTItem item = new CWPTTItem(b, CWSensorItem.GetCurrentTime());
CWKeyer.PTTEnqueue(item);
}
if (key_on_rts)
{
CWSensorItem item = new CWSensorItem(CWSensorItem.InputType.StraightKey, b);
CWKeyer.SensorEnqueue(item);
}
break;
}
}
else if (use_for_paddles)
{
switch (e.EventType)
{
case SerialPinChange.DsrChanged:
CWSensorItem.InputType type = CWSensorItem.InputType.Dot;
if (reverse_paddles) type = CWSensorItem.InputType.Dash;
CWSensorItem item = new CWSensorItem(type, commPort.DsrHolding);
CWKeyer.SensorEnqueue(item);
break;
case SerialPinChange.CtsChanged:
type = CWSensorItem.InputType.Dash;
if (reverse_paddles) type = CWSensorItem.InputType.Dot;
item = new CWSensorItem(type, commPort.CtsHolding);
CWKeyer.SensorEnqueue(item);
break;
}
}
}
void SerialReceivedData(object source, SerialDataReceivedEventArgs e)
{
serial_rx_event(this, new SerialRXEvent(commPort.ReadExisting()));
}
}
//CAT3
public class SDRSerialPort3
{
public static event SerialRXEventHandler serial_rx_event;
private SerialPort commPort;
public SerialPort BasePort
{
get { return commPort; }
}
private bool isOpen = false;
private bool bitBangOnly = false;
//Added 2/14/2008 BT
public bool IsOpen
{
get { return commPort.IsOpen; }
}
public void Open()
{
commPort.Open();
}
public void Close()
{
commPort.Close();
}
public static Parity StringToParity(string s)
{
if (s == "none") return Parity.None;
if (s == "odd") return Parity.Odd;
if (s == "even") return Parity.Even;
if (s == "space") return Parity.Space;
if (s == "mark") return Parity.Mark;
return Parity.None; // error -- default to none
}
public static StopBits StringToStopBits(string s)
{
if (s == "0") return StopBits.None;
if (s == "1") return StopBits.One;
if (s == "1.5") return StopBits.OnePointFive;
if (s == "2") return StopBits.Two;
return StopBits.One; // error -- default
}
public SDRSerialPort3(int portidx)
{
commPort = new SerialPort();
commPort.Encoding = System.Text.Encoding.ASCII;
commPort.RtsEnable = true; // hack for soft rock ptt
commPort.DtrEnable = true; // set dtr off
//commPort.ErrorReceived += new SerialErrorReceivedEventHandler(this.SerialErrorReceived);
commPort.DataReceived += new SerialDataReceivedEventHandler(this.SerialReceivedData);
commPort.PinChanged += new SerialPinChangedEventHandler(this.SerialPinChanged);
commPort.PortName = "COM" + portidx.ToString();
commPort.Parity = Parity.None;
commPort.StopBits = StopBits.One;
commPort.Handshake = Handshake.None;
commPort.DataBits = 8;
commPort.BaudRate = 9600;
commPort.ReadTimeout = 5000;
commPort.WriteTimeout = 500;
commPort.ReceivedBytesThreshold = 1;
}
// set the comm parms ... can only be done if port is not open -- silently fails if port is open (fixme -- add some error checking)
//
public void setCommParms(int baudrate, Parity p, int databits, StopBits stop, Handshake handshake)
{
if ( commPort.IsOpen ) return; // bail out if it's already open
commPort.BaudRate = baudrate;
commPort.Parity = p;
commPort.StopBits = stop;
commPort.DataBits = databits;
// commPort.Handshake = handshake;
}
public uint put(string s)
{
if ( bitBangOnly ) return 0; // fixme -- throw exception?
commPort.Write(s);
return (uint)s.Length; // wjt fixme -- hack -- we don't know if we actually wrote things
}
// ke9ns add
public string put1(string s)
{
string answer="---";
if (bitBangOnly) return answer; // fixme -- throw exception?
commPort.Write("AI1;");
try
{
byte[] test = new byte[10];
// var tes1 = commPort.Read(test, 0, 4);
// test[0] = commPort.ReadByte();
// answer = test.ToString();
// Debug.WriteLine("BEAM: " + test[0] + " , " + test[1] + " , " + test[2] + " , " + test[3]);
// answer = commPort.ReadExisting();
Debug.WriteLine("BEAM: " + answer);
// answer = System.Text.Encoding.Default.GetString(test);
}
catch (Exception e)
{
// Debug.WriteLine("BEAM: " + e);
answer = "===";
}
return answer; // wjt fixme -- hack -- we don't know if we actually wrote things
} // put1
public int Create()
{
return Create(false);
}
// create port
public int Create(bool bit_bang_only)
{
bitBangOnly = bit_bang_only;
if ( isOpen ){ return -1; }
commPort.Open();
isOpen = commPort.IsOpen;
if ( isOpen )
return 0; // all is well
else
return -1; //error
}
public void Destroy()
{
try
{
commPort.Close();
}
catch(Exception)
{
}
isOpen = false;
}
public bool isCTS()
{
if ( !isOpen ) return false; // fixme error check
return commPort.CtsHolding;
}
public bool isDSR()
{
if ( !isOpen ) return false; // fixme error check
return commPort.DsrHolding;
}
public bool isRI()
{
if ( !isOpen ) return false; // fixme error check
return false;
}
public bool isRLSD()
{
if ( !isOpen ) return false; // fixme error check
return commPort.CDHolding;
}
public void setDTR(bool v)
{
if ( !isOpen ) return;
commPort.DtrEnable = v;
}
void SerialErrorReceived(object source, SerialErrorReceivedEventArgs e)
{
}
private bool use_for_keyptt = false;
public bool UseForKeyPTT
{
get { return use_for_keyptt; }
set { use_for_keyptt = value; }
}
private bool use_for_paddles = false;
public bool UseForPaddles
{
get { return use_for_paddles; }
set { use_for_paddles = value; }
}
private bool ptt_on_dtr = false;
public bool PTTOnDTR
{
get { return ptt_on_dtr; }
set { ptt_on_dtr = value; }
}
private bool ptt_on_rts = false;
public bool PTTOnRTS
{
get { return ptt_on_rts; }
set { ptt_on_rts = value; }
}
private bool key_on_dtr = false;
public bool KeyOnDTR
{
get { return key_on_dtr; }
set { key_on_dtr = value; }
}
private bool key_on_rts = false;
public bool KeyOnRTS
{
get { return key_on_rts; }
set { key_on_rts = value; }
}
private static bool reverse_paddles = false;
public static bool ReversePaddles
{
get { return reverse_paddles; }
set { reverse_paddles = value; }
}
void SerialPinChanged(object source, SerialPinChangedEventArgs e)
{
if (!use_for_keyptt && !use_for_paddles) return;
if (use_for_keyptt)
{
switch (e.EventType)
{
case SerialPinChange.DsrChanged:
bool b = commPort.DsrHolding;
if (ptt_on_dtr)
{
CWPTTItem item = new CWPTTItem(b, CWSensorItem.GetCurrentTime());
CWKeyer.PTTEnqueue(item);
}
if (key_on_dtr)
{
CWSensorItem item = new CWSensorItem(CWSensorItem.InputType.StraightKey, b);
CWKeyer.SensorEnqueue(item);
}
break;
case SerialPinChange.CtsChanged:
b = commPort.CtsHolding;
if (ptt_on_rts)
{
CWPTTItem item = new CWPTTItem(b, CWSensorItem.GetCurrentTime());
CWKeyer.PTTEnqueue(item);
}
if (key_on_rts)
{
CWSensorItem item = new CWSensorItem(CWSensorItem.InputType.StraightKey, b);
CWKeyer.SensorEnqueue(item);
}
break;
}
}
else if (use_for_paddles)
{
switch (e.EventType)
{
case SerialPinChange.DsrChanged:
CWSensorItem.InputType type = CWSensorItem.InputType.Dot;
if (reverse_paddles) type = CWSensorItem.InputType.Dash;
CWSensorItem item = new CWSensorItem(type, commPort.DsrHolding);
CWKeyer.SensorEnqueue(item);
break;
case SerialPinChange.CtsChanged:
type = CWSensorItem.InputType.Dash;
if (reverse_paddles) type = CWSensorItem.InputType.Dot;
item = new CWSensorItem(type, commPort.CtsHolding);
CWKeyer.SensorEnqueue(item);
break;
}
}
}
void SerialReceivedData(object source, SerialDataReceivedEventArgs e)
{
serial_rx_event(this, new SerialRXEvent(commPort.ReadExisting()));
}
}
//CAT4
public class SDRSerialPort4
{
public static event SerialRXEventHandler serial_rx_event;
private SerialPort commPort;
public SerialPort BasePort
{
get { return commPort; }
}
private bool isOpen = false;
private bool bitBangOnly = false;
//Added 2/14/2008 BT
public bool IsOpen
{
get { return commPort.IsOpen; }
}
public void Open()
{
commPort.Open();
}
public void Close()
{
commPort.Close();
}
public static Parity StringToParity(string s)
{
if (s == "none") return Parity.None;
if (s == "odd") return Parity.Odd;
if (s == "even") return Parity.Even;
if (s == "space") return Parity.Space;
if (s == "mark") return Parity.Mark;
return Parity.None; // error -- default to none
}
public static StopBits StringToStopBits(string s)
{
if (s == "0") return StopBits.None;
if (s == "1") return StopBits.One;
if (s == "1.5") return StopBits.OnePointFive;
if (s == "2") return StopBits.Two;
return StopBits.One; // error -- default
}
public SDRSerialPort4(int portidx)
{
commPort = new SerialPort();
commPort.Encoding = System.Text.Encoding.ASCII;
commPort.RtsEnable = true; // hack for soft rock ptt
commPort.DtrEnable = true; // set dtr off
//commPort.ErrorReceived += new SerialErrorReceivedEventHandler(this.SerialErrorReceived);
commPort.DataReceived += new SerialDataReceivedEventHandler(this.SerialReceivedData);
commPort.PinChanged += new SerialPinChangedEventHandler(this.SerialPinChanged);
commPort.PortName = "COM" + portidx.ToString();
commPort.Parity = Parity.None;
commPort.StopBits = StopBits.One;
commPort.Handshake = Handshake.None;
commPort.DataBits = 8;
commPort.BaudRate = 9600;
commPort.ReadTimeout = 5000;
commPort.WriteTimeout = 500;
commPort.ReceivedBytesThreshold = 1;
}
// set the comm parms ... can only be done if port is not open -- silently fails if port is open (fixme -- add some error checking)
//
public void setCommParms(int baudrate, Parity p, int databits, StopBits stop, Handshake handshake)
{
if ( commPort.IsOpen ) return; // bail out if it's already open
commPort.BaudRate = baudrate;
commPort.Parity = p;
commPort.StopBits = stop;
commPort.DataBits = databits;
// commPort.Handshake = handshake;
}
public uint put(string s)
{
if ( bitBangOnly ) return 0; // fixme -- throw exception?
commPort.Write(s);
return (uint)s.Length; // wjt fixme -- hack -- we don't know if we actually wrote things
}
// ke9ns add
public string put1(string s)
{
string answer="---";
if (bitBangOnly) return answer; // fixme -- throw exception?
commPort.Write("AI1;");
try
{
byte[] test = new byte[10];
// var tes1 = commPort.Read(test, 0, 4);
// test[0] = commPort.ReadByte();
// answer = test.ToString();
// Debug.WriteLine("BEAM: " + test[0] + " , " + test[1] + " , " + test[2] + " , " + test[3]);
// answer = commPort.ReadExisting();
Debug.WriteLine("BEAM: " + answer);
// answer = System.Text.Encoding.Default.GetString(test);
}
catch (Exception e)
{
// Debug.WriteLine("BEAM: " + e);
answer = "===";
}
return answer; // wjt fixme -- hack -- we don't know if we actually wrote things
} // put1
public int Create()
{
return Create(false);
}
// create port
public int Create(bool bit_bang_only)
{
bitBangOnly = bit_bang_only;
if ( isOpen ){ return -1; }
commPort.Open();
isOpen = commPort.IsOpen;
if ( isOpen )
return 0; // all is well
else
return -1; //error
}
public void Destroy()
{
try
{
commPort.Close();
}
catch(Exception)
{
}
isOpen = false;
}
public bool isCTS()
{
if ( !isOpen ) return false; // fixme error check
return commPort.CtsHolding;
}
public bool isDSR()
{
if ( !isOpen ) return false; // fixme error check
return commPort.DsrHolding;
}
public bool isRI()
{
if ( !isOpen ) return false; // fixme error check
return false;
}
public bool isRLSD()
{
if ( !isOpen ) return false; // fixme error check
return commPort.CDHolding;
}
public void setDTR(bool v)
{
if ( !isOpen ) return;
commPort.DtrEnable = v;
}
void SerialErrorReceived(object source, SerialErrorReceivedEventArgs e)
{
}
private bool use_for_keyptt = false;
public bool UseForKeyPTT
{
get { return use_for_keyptt; }
set { use_for_keyptt = value; }
}
private bool use_for_paddles = false;
public bool UseForPaddles
{
get { return use_for_paddles; }
set { use_for_paddles = value; }
}
private bool ptt_on_dtr = false;
public bool PTTOnDTR
{
get { return ptt_on_dtr; }
set { ptt_on_dtr = value; }
}
private bool ptt_on_rts = false;
public bool PTTOnRTS
{
get { return ptt_on_rts; }
set { ptt_on_rts = value; }
}
private bool key_on_dtr = false;
public bool KeyOnDTR
{
get { return key_on_dtr; }
set { key_on_dtr = value; }
}
private bool key_on_rts = false;
public bool KeyOnRTS
{
get { return key_on_rts; }
set { key_on_rts = value; }
}
private static bool reverse_paddles = false;
public static bool ReversePaddles
{
get { return reverse_paddles; }
set { reverse_paddles = value; }
}
void SerialPinChanged(object source, SerialPinChangedEventArgs e)
{
if (!use_for_keyptt && !use_for_paddles) return;
if (use_for_keyptt)
{
switch (e.EventType)
{
case SerialPinChange.DsrChanged:
bool b = commPort.DsrHolding;
if (ptt_on_dtr)
{
CWPTTItem item = new CWPTTItem(b, CWSensorItem.GetCurrentTime());
CWKeyer.PTTEnqueue(item);
}
if (key_on_dtr)
{
CWSensorItem item = new CWSensorItem(CWSensorItem.InputType.StraightKey, b);
CWKeyer.SensorEnqueue(item);
}
break;
case SerialPinChange.CtsChanged:
b = commPort.CtsHolding;
if (ptt_on_rts)
{
CWPTTItem item = new CWPTTItem(b, CWSensorItem.GetCurrentTime());
CWKeyer.PTTEnqueue(item);
}
if (key_on_rts)
{
CWSensorItem item = new CWSensorItem(CWSensorItem.InputType.StraightKey, b);
CWKeyer.SensorEnqueue(item);
}
break;
}
}
else if (use_for_paddles)
{
switch (e.EventType)
{
case SerialPinChange.DsrChanged:
CWSensorItem.InputType type = CWSensorItem.InputType.Dot;
if (reverse_paddles) type = CWSensorItem.InputType.Dash;
CWSensorItem item = new CWSensorItem(type, commPort.DsrHolding);
CWKeyer.SensorEnqueue(item);
break;
case SerialPinChange.CtsChanged:
type = CWSensorItem.InputType.Dash;
if (reverse_paddles) type = CWSensorItem.InputType.Dot;
item = new CWSensorItem(type, commPort.CtsHolding);
CWKeyer.SensorEnqueue(item);
break;
}
}
}
void SerialReceivedData(object source, SerialDataReceivedEventArgs e)
{
serial_rx_event(this, new SerialRXEvent(commPort.ReadExisting()));
}
}
}

View File

@ -388,6 +388,901 @@ namespace PowerSDR
}
#endregion Events
}
//CAT2
public class SIO2ListenerII
{
#region Constructor
public SIO2ListenerII(Console c)
{
console = c;
console.Activated += new EventHandler(console_Activated);
console.Closing += new System.ComponentModel.CancelEventHandler(console_Closing);
parser = new CATParser(console);
//event handler for Serial RX Events
SDRSerialPort2.serial_rx_event += new SerialRXEventHandler(SerialRX2EventHandler);
if ( console.CAT2Enabled ) // if CAT is on, fire it up
{
try
{
enableCAT2();
}
catch ( Exception ex )
{
// fixme??? how cool is to to pop a msg box from an exception handler in a constructor ??
// seems ugly to me (wjt)
console.CAT2Enabled = false;
if ( console.setupForm != null )
{
console.setupForm.copyCAT2PropsToDialogVars(); // need to make sure the props on the setup page get reset
}
MessageBox.Show("Could not initialize CAT control. Exception was:\n\n " + ex.Message +
"\n\nCAT2 control has been disabled.", "Error Initializing CAT control",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
public void enableCAT2()
{
lock ( this )
{
if ( cat2_enabled ) return; // nothing to do already enabled
cat2_enabled = true;
}
Debug.WriteLine("==============CAT PORT OPEN");
int port_num = console.CAT2Port;
SIO2 = new SDRSerialPort2(port_num);
SIO2.setCommParms(console.CAT2BaudRate,
console.CAT2Parity,
console.CAT2DataBits,
console.CAT2StopBits,
console.CAT2Handshake);
Initialize();
}
public bool UseForKeyPTT
{
set
{
if(SIO2 != null)
SIO2.UseForKeyPTT = value;
}
}
public bool UseForPaddles
{
set
{
if (SIO2 != null)
SIO2.UseForPaddles = value;
}
}
public bool PTTOnDTR
{
set
{
if (SIO2 != null)
SIO2.PTTOnDTR = value;
}
}
public bool PTTOnRTS
{
set
{
if (SIO2 != null)
SIO2.PTTOnRTS = value;
}
}
public bool KeyOnDTR
{
set
{
if (SIO2 != null)
SIO2.KeyOnDTR = value;
}
}
public bool KeyOnRTS
{
set
{
if (SIO2 != null)
SIO2.KeyOnRTS = value;
}
}
// typically called when the end user has disabled CAT control through a UI element ... this
// closes the serial port and neutralized the listeners we have in place
public void disableCAT2()
{
lock ( this )
{
if ( !cat2_enabled ) return; /* nothing to do already disabled */
cat2_enabled = false;
}
Debug.WriteLine("==============CAT PORT CLOSED");
if ( SIO2 != null )
{
SIO2.Destroy();
SIO2 = null;
}
Fpass = true; // reset init flag
return;
}
#endregion Constructor
#region Variables
//HiPerfTimer testTimer1 = new HiPerfTimer();
//HiPerfTimer testTimer2 = new HiPerfTimer();
public SDRSerialPort2 SIO2;
Console console;
ASCIIEncoding AE = new ASCIIEncoding();
private bool Fpass = true;
private bool cat2_enabled = false; // is cat currently enabled by user?
// private System.Timers.Timer SIOMonitor;
CATParser parser;
// private int SIOMonitorCount = 0;
#endregion variables
#region Methods
private static void dbgWriteLine(string s)
{
#if(!DBG_PRINT)
Console.dbgWriteLine("SIO2Listener: " + s);
#endif
}
// Called when the console is activated for the first time.
private void Initialize()
{
if(Fpass)
{
SIO2.Create();
Fpass = false;
}
}
#if UseParser
private char[] ParseLeftover = null;
// segment incoming string into CAT commands ... handle leftovers from when we read a parial
//
private void ParseString(byte[] rxdata, uint count)
{
if ( count == 0 ) return; // nothing to do
int cmd_char_count = 0;
int left_over_char_count = ( ParseLeftover == null ? 0 : ParseLeftover.Length );
char[] cmd_chars = new char[count + left_over_char_count];
if ( ParseLeftover != null ) // seed with leftovers from last read
{
for ( int j = 0; j < left_over_char_count; j++ ) // wjt fixme ... use C# equiv of System.arraycopy
{
cmd_chars[cmd_char_count] = ParseLeftover[j];
++cmd_char_count;
}
ParseLeftover = null;
}
for ( int j = 0; j < count; j++ ) // while we have chars to play with
{
cmd_chars[cmd_char_count] = (char)rxdata[j];
++cmd_char_count;
if ( rxdata[j] == ';' ) // end of cmd -- parse it and execute it
{
string cmdword = new String(cmd_chars, 0, cmd_char_count);
dbgWriteLine("cmdword: >" + cmdword + "<");
// BT 06/08
string answer = parser.Get(cmdword);
byte[] out_string = AE.GetBytes(answer);
uint result = SIO.put(out_string, (uint) out_string.Length);
cmd_char_count = 0; // reset word counter
}
}
// when we get here have processed all of the incoming buffer, if there's anyting
// in cmd_chars we need to save it as we've not pulled a full command so we stuff
// it in leftover for the next time we come through
if ( cmd_char_count != 0 )
{
ParseLeftover = new char[cmd_char_count];
for ( int j = 0; j < cmd_char_count; j++ ) // wjt fixme ... C# equiv of Sytsem.arraycopy
{
ParseLeftover[j] = cmd_chars[j];
}
}
#if DBG_PRINT
if ( ParseLeftover != null)
{
dbgWriteLine("Leftover >" + new String(ParseLeftover) + "<");
}
#endif
return;
}
#endif
#endregion Methods
#region Events
private void console_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if ( SIO2 != null )
{
SIO2.Destroy();
}
}
private void console_Activated(object sender, EventArgs e)
{
if ( console.CAT2Enabled )
{
// Initialize(); // wjt enable CAT calls Initialize
enableCAT2();
}
}
StringBuilder CommBuffer = new StringBuilder();//""; //holds incoming serial data from the port
private void SerialRX2EventHandler(object source, SerialRXEvent e)
{
// SIOMonitor.Interval = 5000; // set the timer for 5 seconds
// SIOMonitor.Enabled = true; // start or restart the timer
//double T0 = 0.00;
//double T1 = 0.00;
//int bufferLen = 0;
CommBuffer.Append(e.buffer); // put the data in the string
if(parser != null) // is the parser instantiated
{
//bufferLen = CommBuffer.Length;
try
{
Regex rex = new Regex(".*?;"); //accept any string ending in ;
string answer;
uint result;
for(Match m = rex.Match(CommBuffer.ToString()); m.Success; m = m.NextMatch()) //loop thru the buffer and find matches
{
//testTimer1.Start();
answer = parser.Get(m.Value); //send the match to the parser
//testTimer1.Stop();
//T0 = testTimer1.DurationMsec;
//testTimer2.Start();
if(answer.Length > 0)
result = SIO2.put(answer); //send the answer to the serial port
//testTimer2.Stop();
//T1 = testTimer2.DurationMsec;
CommBuffer = CommBuffer.Replace(m.Value, "", 0, m.Length); //remove the match from the buffer
//Debug.WriteLine("Parser decode time for "+m.Value.ToString()+": "+T0.ToString()+ "ms");
//Debug.WriteLine("SIO send answer time: " + T1.ToString() + "ms");
//Debug.WriteLine("CommBuffer Length: " + bufferLen.ToString());
//if (bufferLen > 100)
//Debug.WriteLine("Buffer contents: "+CommBuffer.ToString());
}
}
catch(Exception)
{
//Add ex name to exception above to enable
//Debug.WriteLine("RX Event: "+ex.Message);
//Debug.WriteLine("RX Event: "+ex.StackTrace);
}
}
}
#endregion Events
}
//CAT3
public class SIO3ListenerII
{
#region Constructor
public SIO3ListenerII(Console c)
{
console = c;
console.Activated += new EventHandler(console_Activated);
console.Closing += new System.ComponentModel.CancelEventHandler(console_Closing);
parser = new CATParser(console);
//event handler for Serial RX Events
SDRSerialPort3.serial_rx_event += new SerialRXEventHandler(SerialRX3EventHandler);
if ( console.CAT3Enabled ) // if CAT is on, fire it up
{
try
{
enableCAT3();
}
catch ( Exception ex )
{
// fixme??? how cool is to to pop a msg box from an exception handler in a constructor ??
// seems ugly to me (wjt)
console.CAT3Enabled = false;
if ( console.setupForm != null )
{
console.setupForm.copyCAT3PropsToDialogVars(); // need to make sure the props on the setup page get reset
}
MessageBox.Show("Could not initialize CAT control. Exception was:\n\n " + ex.Message +
"\n\nCAT3 control has been disabled.", "Error Initializing CAT control",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
public void enableCAT3()
{
lock ( this )
{
if ( cat3_enabled ) return; // nothing to do already enabled
cat3_enabled = true;
}
Debug.WriteLine("==============CAT PORT OPEN");
int port_num = console.CAT3Port;
SIO3 = new SDRSerialPort3(port_num);
SIO3.setCommParms(console.CAT3BaudRate,
console.CAT3Parity,
console.CAT3DataBits,
console.CAT3StopBits,
console.CAT3Handshake);
Initialize();
}
public bool UseForKeyPTT
{
set
{
if(SIO3 != null)
SIO3.UseForKeyPTT = value;
}
}
public bool UseForPaddles
{
set
{
if (SIO3 != null)
SIO3.UseForPaddles = value;
}
}
public bool PTTOnDTR
{
set
{
if (SIO3 != null)
SIO3.PTTOnDTR = value;
}
}
public bool PTTOnRTS
{
set
{
if (SIO3 != null)
SIO3.PTTOnRTS = value;
}
}
public bool KeyOnDTR
{
set
{
if (SIO3 != null)
SIO3.KeyOnDTR = value;
}
}
public bool KeyOnRTS
{
set
{
if (SIO3 != null)
SIO3.KeyOnRTS = value;
}
}
// typically called when the end user has disabled CAT control through a UI element ... this
// closes the serial port and neutralized the listeners we have in place
public void disableCAT3()
{
lock ( this )
{
if ( !cat3_enabled ) return; /* nothing to do already disabled */
cat3_enabled = false;
}
Debug.WriteLine("==============CAT PORT CLOSED");
if ( SIO3 != null )
{
SIO3.Destroy();
SIO3 = null;
}
Fpass = true; // reset init flag
return;
}
#endregion Constructor
#region Variables
//HiPerfTimer testTimer1 = new HiPerfTimer();
//HiPerfTimer testTimer2 = new HiPerfTimer();
public SDRSerialPort3 SIO3;
Console console;
ASCIIEncoding AE = new ASCIIEncoding();
private bool Fpass = true;
private bool cat3_enabled = false; // is cat currently enabled by user?
// private System.Timers.Timer SIOMonitor;
CATParser parser;
// private int SIOMonitorCount = 0;
#endregion variables
#region Methods
private static void dbgWriteLine(string s)
{
#if(!DBG_PRINT)
Console.dbgWriteLine("SIO3Listener: " + s);
#endif
}
// Called when the console is activated for the first time.
private void Initialize()
{
if(Fpass)
{
SIO3.Create();
Fpass = false;
}
}
#if UseParser
private char[] ParseLeftover = null;
// segment incoming string into CAT commands ... handle leftovers from when we read a parial
//
private void ParseString(byte[] rxdata, uint count)
{
if ( count == 0 ) return; // nothing to do
int cmd_char_count = 0;
int left_over_char_count = ( ParseLeftover == null ? 0 : ParseLeftover.Length );
char[] cmd_chars = new char[count + left_over_char_count];
if ( ParseLeftover != null ) // seed with leftovers from last read
{
for ( int j = 0; j < left_over_char_count; j++ ) // wjt fixme ... use C# equiv of System.arraycopy
{
cmd_chars[cmd_char_count] = ParseLeftover[j];
++cmd_char_count;
}
ParseLeftover = null;
}
for ( int j = 0; j < count; j++ ) // while we have chars to play with
{
cmd_chars[cmd_char_count] = (char)rxdata[j];
++cmd_char_count;
if ( rxdata[j] == ';' ) // end of cmd -- parse it and execute it
{
string cmdword = new String(cmd_chars, 0, cmd_char_count);
dbgWriteLine("cmdword: >" + cmdword + "<");
// BT 06/08
string answer = parser.Get(cmdword);
byte[] out_string = AE.GetBytes(answer);
uint result = SIO.put(out_string, (uint) out_string.Length);
cmd_char_count = 0; // reset word counter
}
}
// when we get here have processed all of the incoming buffer, if there's anyting
// in cmd_chars we need to save it as we've not pulled a full command so we stuff
// it in leftover for the next time we come through
if ( cmd_char_count != 0 )
{
ParseLeftover = new char[cmd_char_count];
for ( int j = 0; j < cmd_char_count; j++ ) // wjt fixme ... C# equiv of Sytsem.arraycopy
{
ParseLeftover[j] = cmd_chars[j];
}
}
#if DBG_PRINT
if ( ParseLeftover != null)
{
dbgWriteLine("Leftover >" + new String(ParseLeftover) + "<");
}
#endif
return;
}
#endif
#endregion Methods
#region Events
private void console_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if ( SIO3 != null )
{
SIO3.Destroy();
}
}
private void console_Activated(object sender, EventArgs e)
{
if ( console.CAT3Enabled )
{
// Initialize(); // wjt enable CAT calls Initialize
enableCAT3();
}
}
StringBuilder CommBuffer = new StringBuilder();//""; //holds incoming serial data from the port
private void SerialRX3EventHandler(object source, SerialRXEvent e)
{
// SIOMonitor.Interval = 5000; // set the timer for 5 seconds
// SIOMonitor.Enabled = true; // start or restart the timer
//double T0 = 0.00;
//double T1 = 0.00;
//int bufferLen = 0;
CommBuffer.Append(e.buffer); // put the data in the string
if(parser != null) // is the parser instantiated
{
//bufferLen = CommBuffer.Length;
try
{
Regex rex = new Regex(".*?;"); //accept any string ending in ;
string answer;
uint result;
for(Match m = rex.Match(CommBuffer.ToString()); m.Success; m = m.NextMatch()) //loop thru the buffer and find matches
{
//testTimer1.Start();
answer = parser.Get(m.Value); //send the match to the parser
//testTimer1.Stop();
//T0 = testTimer1.DurationMsec;
//testTimer2.Start();
if(answer.Length > 0)
result = SIO3.put(answer); //send the answer to the serial port
//testTimer2.Stop();
//T1 = testTimer2.DurationMsec;
CommBuffer = CommBuffer.Replace(m.Value, "", 0, m.Length); //remove the match from the buffer
//Debug.WriteLine("Parser decode time for "+m.Value.ToString()+": "+T0.ToString()+ "ms");
//Debug.WriteLine("SIO send answer time: " + T1.ToString() + "ms");
//Debug.WriteLine("CommBuffer Length: " + bufferLen.ToString());
//if (bufferLen > 100)
//Debug.WriteLine("Buffer contents: "+CommBuffer.ToString());
}
}
catch(Exception)
{
//Add ex name to exception above to enable
//Debug.WriteLine("RX Event: "+ex.Message);
//Debug.WriteLine("RX Event: "+ex.StackTrace);
}
}
}
#endregion Events
}
//CAT4
public class SIO4ListenerII
{
#region Constructor
public SIO4ListenerII(Console c)
{
console = c;
console.Activated += new EventHandler(console_Activated);
console.Closing += new System.ComponentModel.CancelEventHandler(console_Closing);
parser = new CATParser(console);
//event handler for Serial RX Events
SDRSerialPort2.serial_rx_event += new SerialRXEventHandler(SerialRX2EventHandler);
if ( console.CAT4Enabled ) // if CAT is on, fire it up
{
try
{
enableCAT4();
}
catch ( Exception ex )
{
// fixme??? how cool is to to pop a msg box from an exception handler in a constructor ??
// seems ugly to me (wjt)
console.CAT4Enabled = false;
if ( console.setupForm != null )
{
console.setupForm.copyCAT4PropsToDialogVars(); // need to make sure the props on the setup page get reset
}
MessageBox.Show("Could not initialize CAT control. Exception was:\n\n " + ex.Message +
"\n\nCAT4 control has been disabled.", "Error Initializing CAT control",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
public void enableCAT4()
{
lock ( this )
{
if ( cat4_enabled ) return; // nothing to do already enabled
cat4_enabled = true;
}
Debug.WriteLine("==============CAT PORT OPEN");
int port_num = console.CAT4Port;
SIO4 = new SDRSerialPort2(port_num);
SIO4.setCommParms(console.CAT4BaudRate,
console.CAT4Parity,
console.CAT4DataBits,
console.CAT4StopBits,
console.CAT4Handshake);
Initialize();
}
public bool UseForKeyPTT
{
set
{
if(SIO4 != null)
SIO4.UseForKeyPTT = value;
}
}
public bool UseForPaddles
{
set
{
if (SIO4 != null)
SIO4.UseForPaddles = value;
}
}
public bool PTTOnDTR
{
set
{
if (SIO4 != null)
SIO4.PTTOnDTR = value;
}
}
public bool PTTOnRTS
{
set
{
if (SIO4 != null)
SIO4.PTTOnRTS = value;
}
}
public bool KeyOnDTR
{
set
{
if (SIO4 != null)
SIO4.KeyOnDTR = value;
}
}
public bool KeyOnRTS
{
set
{
if (SIO4 != null)
SIO4.KeyOnRTS = value;
}
}
// typically called when the end user has disabled CAT control through a UI element ... this
// closes the serial port and neutralized the listeners we have in place
public void disableCAT4()
{
lock ( this )
{
if ( !cat4_enabled ) return; /* nothing to do already disabled */
cat4_enabled = false;
}
Debug.WriteLine("==============CAT PORT CLOSED");
if ( SIO4 != null )
{
SIO4.Destroy();
SIO4 = null;
}
Fpass = true; // reset init flag
return;
}
#endregion Constructor
#region Variables
//HiPerfTimer testTimer1 = new HiPerfTimer();
//HiPerfTimer testTimer2 = new HiPerfTimer();
public SDRSerialPort2 SIO4;
Console console;
ASCIIEncoding AE = new ASCIIEncoding();
private bool Fpass = true;
private bool cat4_enabled = false; // is cat currently enabled by user?
// private System.Timers.Timer SIOMonitor;
CATParser parser;
// private int SIOMonitorCount = 0;
#endregion variables
#region Methods
private static void dbgWriteLine(string s)
{
#if(!DBG_PRINT)
Console.dbgWriteLine("SIO4Listener: " + s);
#endif
}
// Called when the console is activated for the first time.
private void Initialize()
{
if(Fpass)
{
SIO4.Create();
Fpass = false;
}
}
#if UseParser
private char[] ParseLeftover = null;
// segment incoming string into CAT commands ... handle leftovers from when we read a parial
//
private void ParseString(byte[] rxdata, uint count)
{
if ( count == 0 ) return; // nothing to do
int cmd_char_count = 0;
int left_over_char_count = ( ParseLeftover == null ? 0 : ParseLeftover.Length );
char[] cmd_chars = new char[count + left_over_char_count];
if ( ParseLeftover != null ) // seed with leftovers from last read
{
for ( int j = 0; j < left_over_char_count; j++ ) // wjt fixme ... use C# equiv of System.arraycopy
{
cmd_chars[cmd_char_count] = ParseLeftover[j];
++cmd_char_count;
}
ParseLeftover = null;
}
for ( int j = 0; j < count; j++ ) // while we have chars to play with
{
cmd_chars[cmd_char_count] = (char)rxdata[j];
++cmd_char_count;
if ( rxdata[j] == ';' ) // end of cmd -- parse it and execute it
{
string cmdword = new String(cmd_chars, 0, cmd_char_count);
dbgWriteLine("cmdword: >" + cmdword + "<");
// BT 06/08
string answer = parser.Get(cmdword);
byte[] out_string = AE.GetBytes(answer);
uint result = SIO.put(out_string, (uint) out_string.Length);
cmd_char_count = 0; // reset word counter
}
}
// when we get here have processed all of the incoming buffer, if there's anyting
// in cmd_chars we need to save it as we've not pulled a full command so we stuff
// it in leftover for the next time we come through
if ( cmd_char_count != 0 )
{
ParseLeftover = new char[cmd_char_count];
for ( int j = 0; j < cmd_char_count; j++ ) // wjt fixme ... C# equiv of Sytsem.arraycopy
{
ParseLeftover[j] = cmd_chars[j];
}
}
#if DBG_PRINT
if ( ParseLeftover != null)
{
dbgWriteLine("Leftover >" + new String(ParseLeftover) + "<");
}
#endif
return;
}
#endif
#endregion Methods
#region Events
private void console_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if ( SIO4 != null )
{
SIO4.Destroy();
}
}
private void console_Activated(object sender, EventArgs e)
{
if ( console.CAT4Enabled )
{
// Initialize(); // wjt enable CAT calls Initialize
enableCAT4();
}
}
StringBuilder CommBuffer = new StringBuilder();//""; //holds incoming serial data from the port
private void SerialRX2EventHandler(object source, SerialRXEvent e)
{
// SIOMonitor.Interval = 5000; // set the timer for 5 seconds
// SIOMonitor.Enabled = true; // start or restart the timer
//double T0 = 0.00;
//double T1 = 0.00;
//int bufferLen = 0;
CommBuffer.Append(e.buffer); // put the data in the string
if(parser != null) // is the parser instantiated
{
//bufferLen = CommBuffer.Length;
try
{
Regex rex = new Regex(".*?;"); //accept any string ending in ;
string answer;
uint result;
for(Match m = rex.Match(CommBuffer.ToString()); m.Success; m = m.NextMatch()) //loop thru the buffer and find matches
{
//testTimer1.Start();
answer = parser.Get(m.Value); //send the match to the parser
//testTimer1.Stop();
//T0 = testTimer1.DurationMsec;
//testTimer2.Start();
if(answer.Length > 0)
result = SIO4.put(answer); //send the answer to the serial port
//testTimer2.Stop();
//T1 = testTimer2.DurationMsec;
CommBuffer = CommBuffer.Replace(m.Value, "", 0, m.Length); //remove the match from the buffer
//Debug.WriteLine("Parser decode time for "+m.Value.ToString()+": "+T0.ToString()+ "ms");
//Debug.WriteLine("SIO send answer time: " + T1.ToString() + "ms");
//Debug.WriteLine("CommBuffer Length: " + bufferLen.ToString());
//if (bufferLen > 100)
//Debug.WriteLine("Buffer contents: "+CommBuffer.ToString());
}
}
catch(Exception)
{
//Add ex name to exception above to enable
//Debug.WriteLine("RX Event: "+ex.Message);
//Debug.WriteLine("RX Event: "+ex.StackTrace);
}
}
}
#endregion Events
}
}

View File

@ -5524,6 +5524,7 @@ namespace PowerSDR
}
}
bool MONother = false; // ke9ns add
private void MONOnOff(int msg)
{
if (msg == 127)
@ -5531,17 +5532,27 @@ namespace PowerSDR
parser.nGet = 0;
parser.nSet = 1;
int MONState = Convert.ToInt16(commands.ZZMO(""));
int MONState = Convert.ToInt16(commands.ZZMO("")); // ke9ns: get current status of MON
if (MONState == 0)
{
commands.ZZMO("1");
commands.ZZMO("1"); // ke9ns: if MON was OFF, then turn ON MONpr
MONother = true;
return;
}
if (MONState == 1)
else if (MONState == 1)
{
commands.ZZMO("0");
return;
if (MONother == true)
{
commands.ZZMO("2"); // ke9ns add: MONpr, then MONps (because modify of the ZZMO command in .147
MONother = false;
return;
}
else
{
commands.ZZMO("0"); // ke9ns: if MON was ON, then turn OFF
return;
}
}
}
}

View File

@ -361,13 +361,17 @@ namespace PowerSDR
this.Controls.Add(this.chkLockAngle);
this.Controls.Add(this.chkAuto);
this.Controls.Add(this.picRadar);
this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximumSize = new System.Drawing.Size(500, 500);
this.MinimumSize = new System.Drawing.Size(100, 100);
this.Name = "DiversityForm";
this.Text = "Enhanced Signal Clarity ™";
this.toolTip1.SetToolTip(this, "Hit F2 for Video showing ESC in operation");
this.Closing += new System.ComponentModel.CancelEventHandler(this.DiversityForm_Closing);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DiversityForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.DiversityForm_HelpRequested);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DiversityForm_KeyDown);
((System.ComponentModel.ISupportInitialize)(this.picRadar)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.udAngle)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.udR)).EndInit();
@ -668,6 +672,68 @@ namespace PowerSDR
console.VFOSync = false; //W4TME
}
// ke9ns add for F2 video
private void DiversityForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F2) // ke9ns add for help messages (F2 help screen)
{
Debug.WriteLine("F2 key");
if (console.helpboxForm == null || console.helpboxForm.IsDisposed) console.helpboxForm = new helpbox(console);
console.helpboxForm.Show();
console.helpboxForm.Focus();
console.helpboxForm.WindowState = FormWindowState.Normal; // ke9ns add
console.helpboxForm.helpbox_message.Text = console.helpboxForm.helpbox_message.Text; // ESC video
string VideoID = "A0q9iK9RdMw";
console.helpboxForm.webBrowser1.Visible = true;
console.helpboxForm.webBrowser1.BringToFront();
console.helpboxForm.webBrowser1.DocumentText = String.Format("<html><head>" +
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\"/>" +
"</head><body>" +
"<iframe width=\"100%\" height=\"425\" src=\"https://www.youtube.com/embed/{0}?autoplay=1&enablejsapi=1\"" +
"frameborder = \"0\" allow = \"autoplay; encrypted-media\" allowfullscreen></iframe>" +
"</body></html>", VideoID);
} // f2 key
} // key down over ESC panel
// ke9ns add: copy from console
public bool MouseIsOverControl(Control c) // ke9ns keypreview must be TRUE and use MouseIsOverControl(Control c)
{
return c.ClientRectangle.Contains(c.PointToClient(Control.MousePosition));
}
private void DiversityForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
if (console.helpboxForm == null || console.helpboxForm.IsDisposed) console.helpboxForm = new helpbox(console);
console.helpboxForm.Show();
console.helpboxForm.Focus();
console.helpboxForm.WindowState = FormWindowState.Normal; // ke9ns add
console.helpboxForm.helpbox_message.Text = console.helpboxForm.helpbox_message.Text; // ESC video
string VideoID = "A0q9iK9RdMw";
console.helpboxForm.webBrowser1.Visible = true;
console.helpboxForm.webBrowser1.BringToFront();
console.helpboxForm.webBrowser1.DocumentText = String.Format("<html><head>" +
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\"/>" +
"</head><body>" +
"<iframe width=\"100%\" height=\"425\" src=\"https://www.youtube.com/embed/{0}?autoplay=1&enablejsapi=1\"" +
"frameborder = \"0\" allow = \"autoplay; encrypted-media\" allowfullscreen></iframe>" +
"</body></html>", VideoID);
}
private void chkLockR_CheckedChanged(object sender, EventArgs e)
{
if (chkLockR.Checked)

View File

@ -120,6 +120,9 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="chkEnable.ToolTip" xml:space="preserve">
<value>ENABLE ESC.
When this button is RED, you can then turn off RX2 and ESC will continue to function as long as you do not turn ESC OFF (disable).

View File

@ -800,7 +800,7 @@ namespace PowerSDR
// FLEX3000TestForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(400, 246);
this.ClientSize = new System.Drawing.Size(400, 257);
this.Controls.Add(this.chkPollSWR);
this.Controls.Add(this.picSWR);
this.Controls.Add(this.lblSWR);

View File

@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAEBAAAAAAIABoBAAANgAAACAgAAAAACAAqBAAAJ4EAAAwMAAAAAAgAKglAABGFQAAKAAAABAA

View File

@ -302,8 +302,8 @@ namespace PowerSDR
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.buttonTS3 = new System.Windows.Forms.ButtonTS();
this.labelTS1 = new System.Windows.Forms.LabelTS();
this.buttonTS2 = new System.Windows.Forms.ButtonTS();
this.buttonTS1 = new System.Windows.Forms.ButtonTS();
this.buttonTS2 = new System.Windows.Forms.ButtonTS();
this.btnEEPROMRead1 = new System.Windows.Forms.ButtonTS();
this.lblATUC = new System.Windows.Forms.LabelTS();
this.lblATUL = new System.Windows.Forms.LabelTS();
@ -546,30 +546,31 @@ namespace PowerSDR
this.labelTS1.Text = "Select Turf Region:";
this.toolTip1.SetToolTip(this.labelTS1, resources.GetString("labelTS1.ToolTip"));
//
// buttonTS1
//
this.buttonTS1.Image = null;
this.buttonTS1.Location = new System.Drawing.Point(187, 553);
this.buttonTS1.Name = "buttonTS1";
this.buttonTS1.Size = new System.Drawing.Size(141, 23);
this.buttonTS1.TabIndex = 45;
this.buttonTS1.Text = "MARS/CAP/SHARES";
this.toolTip1.SetToolTip(this.buttonTS1, resources.GetString("buttonTS1.ToolTip"));
this.buttonTS1.Click += new System.EventHandler(this.buttonTS1_Click);
//
// buttonTS2
//
this.buttonTS2.Image = null;
this.buttonTS2.Location = new System.Drawing.Point(286, 553);
this.buttonTS2.Location = new System.Drawing.Point(358, 553);
this.buttonTS2.Name = "buttonTS2";
this.buttonTS2.Size = new System.Drawing.Size(58, 23);
this.buttonTS2.TabIndex = 46;
this.buttonTS2.Text = "Normal";
this.buttonTS2.Click += new System.EventHandler(this.buttonTS2_Click);
//
// buttonTS1
//
this.buttonTS1.Image = null;
this.buttonTS1.Location = new System.Drawing.Point(211, 553);
this.buttonTS1.Name = "buttonTS1";
this.buttonTS1.Size = new System.Drawing.Size(58, 23);
this.buttonTS1.TabIndex = 45;
this.buttonTS1.Text = "MARS";
this.buttonTS1.Click += new System.EventHandler(this.buttonTS1_Click);
//
// btnEEPROMRead1
//
this.btnEEPROMRead1.Image = null;
this.btnEEPROMRead1.Location = new System.Drawing.Point(472, 553);
this.btnEEPROMRead1.Location = new System.Drawing.Point(476, 595);
this.btnEEPROMRead1.Name = "btnEEPROMRead1";
this.btnEEPROMRead1.Size = new System.Drawing.Size(152, 23);
this.btnEEPROMRead1.TabIndex = 45;
@ -2264,7 +2265,7 @@ namespace PowerSDR
// FLEX5000LLHWForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(640, 539);
this.ClientSize = new System.Drawing.Size(640, 542);
this.Controls.Add(this.buttonTS3);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.labelTS1);
@ -2637,7 +2638,7 @@ namespace PowerSDR
// ke9ns add change 3000 or 5000 radio to Extended
private void buttonTS1_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show("Warning: You must have Authorization as a MARS Licensed Operator.\n",
DialogResult dr = MessageBox.Show("Warning: You must have Authorization as a MARS,CAPS, or SHARES Licensed Operator.\n",
"Do you have authorization?",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
@ -3045,7 +3046,7 @@ namespace PowerSDR
byte addr = byte.Parse(txtFlexWireAddr.Text, NumberStyles.HexNumber);
byte val = byte.Parse(txtFlexWireVal1.Text, NumberStyles.HexNumber);
FWC.FlexWire_WriteValue(addr, val);
FWC.FlexWire_WriteValue(addr, val);
}
catch(Exception ex)
{
@ -3195,7 +3196,7 @@ namespace PowerSDR
private void buttonTS2_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show("This will reset any MARS operate back to Normal Standard Operation\n",
DialogResult dr = MessageBox.Show("This will reset any MARS,CAP,SHARES operate back to Normal Standard Operation\n",
"Yes?",
MessageBoxButtons.YesNo,

View File

@ -122,7 +122,7 @@
</metadata>
<data name="numericUpDown1.ToolTip" xml:space="preserve">
<value>Select your Turf Region value here:
NOTE: This will NOT effect MARS operation
NOTE: This will NOT effect MARS/CAP/SHARES operation
US = 0
UK = 1 UK, Slovakia, France, Malta
@ -154,7 +154,7 @@ NOTE: This will NOT effect MARS operation
</data>
<data name="buttonTS3.ToolTip" xml:space="preserve">
<value>Select your Turf Region value here:
NOTE: This will NOT effect MARS operation
NOTE: This will NOT effect MARS/CAP/SHARES operation
US = 0
UK = 1 UK, Slovakia, France, Malta
@ -186,7 +186,7 @@ NOTE: This will NOT effect MARS operation
</data>
<data name="labelTS1.ToolTip" xml:space="preserve">
<value>Select your Turf Region value here:
NOTE: This will NOT effect MARS operation
NOTE: This will NOT effect MARS/CAP/SHARES operation
US = 0
UK = 1 UK, Slovakia, France, Malta
@ -215,6 +215,16 @@ NOTE: This will NOT effect MARS operation
Australia = 24
China = 25
</value>
</data>
<data name="buttonTS1.ToolTip" xml:space="preserve">
<value>Extended Operation: should only be applied if you have permission
to Operate MARS, CAP, SHARES, or 630m band (you will need a RX and TX LPF for this band)
You MUST have A License for the following:
MARS (Military Auxiliary Radio System)
CAP (Civil Air Patrol)
SHARES (SHAred RESources) https://www.dhs.gov/cisa/shared-resources-shares-high-frequency-hf-radio-program
630m band Authorization: https://utc.org/plc-database-amateur-notification-process/</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>30</value>

View File

@ -131,7 +131,7 @@ namespace PowerSDR
private CheckBoxTS ckTestTXPA;
private ButtonTS btnRunAll1500;
private System.ComponentModel.IContainer components;
private CheckBoxTS checkGENBAL;
private string common_data_path = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\FlexRadio Systems\\PowerSDR\\";
#endregion
@ -331,22 +331,14 @@ namespace PowerSDR
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FLEX5000ProdTestForm));
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.comboCOMPort = new System.Windows.Forms.ComboBoxTS();
this.btnGenATTN = new System.Windows.Forms.ButtonTS();
this.btnGenPreamp = new System.Windows.Forms.ButtonTS();
this.btnNoise = new System.Windows.Forms.ButtonTS();
this.btnGenBal = new System.Windows.Forms.ButtonTS();
this.btnPLL = new System.Windows.Forms.ButtonTS();
this.btnImpulse = new System.Windows.Forms.ButtonTS();
this.btnRXImage = new System.Windows.Forms.ButtonTS();
this.btnRXFilter = new System.Windows.Forms.ButtonTS();
this.btnRXLevel = new System.Windows.Forms.ButtonTS();
this.lstDebug = new System.Windows.Forms.ListBox();
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.btnRunAll1500 = new System.Windows.Forms.ButtonTS();
this.btnPostFence = new System.Windows.Forms.ButtonTS();
this.grpIO = new System.Windows.Forms.GroupBoxTS();
this.grpComPort = new System.Windows.Forms.GroupBoxTS();
this.comboCOMPort = new System.Windows.Forms.ComboBoxTS();
this.btnIOFWPTT = new System.Windows.Forms.ButtonTS();
this.btnIOMicFast = new System.Windows.Forms.ButtonTS();
this.btnIOMicDown = new System.Windows.Forms.ButtonTS();
@ -412,9 +404,18 @@ namespace PowerSDR
this.btnTXCarrier = new System.Windows.Forms.ButtonTS();
this.btnTXImage = new System.Windows.Forms.ButtonTS();
this.grpGeneral = new System.Windows.Forms.GroupBoxTS();
this.btnGenATTN = new System.Windows.Forms.ButtonTS();
this.btnGenPreamp = new System.Windows.Forms.ButtonTS();
this.btnNoise = new System.Windows.Forms.ButtonTS();
this.btnGenBal = new System.Windows.Forms.ButtonTS();
this.btnPLL = new System.Windows.Forms.ButtonTS();
this.btnImpulse = new System.Windows.Forms.ButtonTS();
this.grpReceiver = new System.Windows.Forms.GroupBoxTS();
this.udLevel = new System.Windows.Forms.NumericUpDown();
this.btnRunAll1500 = new System.Windows.Forms.ButtonTS();
this.btnRXImage = new System.Windows.Forms.ButtonTS();
this.btnRXFilter = new System.Windows.Forms.ButtonTS();
this.btnRXLevel = new System.Windows.Forms.ButtonTS();
this.checkGENBAL = new System.Windows.Forms.CheckBoxTS();
this.grpIO.SuspendLayout();
this.grpComPort.SuspendLayout();
this.grpTestTransmitter.SuspendLayout();
@ -427,117 +428,6 @@ namespace PowerSDR
((System.ComponentModel.ISupportInitialize)(this.udLevel)).BeginInit();
this.SuspendLayout();
//
// comboCOMPort
//
this.comboCOMPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboCOMPort.DropDownWidth = 72;
this.comboCOMPort.Location = new System.Drawing.Point(16, 16);
this.comboCOMPort.Name = "comboCOMPort";
this.comboCOMPort.Size = new System.Drawing.Size(72, 21);
this.comboCOMPort.TabIndex = 0;
this.toolTip1.SetToolTip(this.comboCOMPort, "COM Port Power Master Wattmeter is connected to");
//
// btnGenATTN
//
this.btnGenATTN.Image = null;
this.btnGenATTN.Location = new System.Drawing.Point(104, 80);
this.btnGenATTN.Name = "btnGenATTN";
this.btnGenATTN.Size = new System.Drawing.Size(75, 23);
this.btnGenATTN.TabIndex = 8;
this.btnGenATTN.Text = "Attenuator";
this.toolTip1.SetToolTip(this.btnGenATTN, "Attenuator Test: Not Run");
this.btnGenATTN.Visible = false;
this.btnGenATTN.Click += new System.EventHandler(this.btnGenATTN_Click);
//
// btnGenPreamp
//
this.btnGenPreamp.Image = null;
this.btnGenPreamp.Location = new System.Drawing.Point(16, 80);
this.btnGenPreamp.Name = "btnGenPreamp";
this.btnGenPreamp.Size = new System.Drawing.Size(75, 23);
this.btnGenPreamp.TabIndex = 7;
this.btnGenPreamp.Text = "Preamp";
this.toolTip1.SetToolTip(this.btnGenPreamp, "Preamp Test: Not Run");
this.btnGenPreamp.Click += new System.EventHandler(this.btnGenPreamp_Click);
//
// btnNoise
//
this.btnNoise.Image = null;
this.btnNoise.Location = new System.Drawing.Point(16, 48);
this.btnNoise.Name = "btnNoise";
this.btnNoise.Size = new System.Drawing.Size(75, 23);
this.btnNoise.TabIndex = 2;
this.btnNoise.Text = "Noise";
this.toolTip1.SetToolTip(this.btnNoise, "Noise Test: Not Run");
this.btnNoise.Visible = false;
this.btnNoise.Click += new System.EventHandler(this.btnNoise_Click);
//
// btnGenBal
//
this.btnGenBal.Image = null;
this.btnGenBal.Location = new System.Drawing.Point(104, 16);
this.btnGenBal.Name = "btnGenBal";
this.btnGenBal.Size = new System.Drawing.Size(75, 23);
this.btnGenBal.TabIndex = 1;
this.btnGenBal.Text = "Gen/Bal";
this.toolTip1.SetToolTip(this.btnGenBal, "Gen/Bal Test: Not Run");
this.btnGenBal.Click += new System.EventHandler(this.btnGenBal_Click);
//
// btnPLL
//
this.btnPLL.Image = null;
this.btnPLL.Location = new System.Drawing.Point(16, 16);
this.btnPLL.Name = "btnPLL";
this.btnPLL.Size = new System.Drawing.Size(75, 23);
this.btnPLL.TabIndex = 0;
this.btnPLL.Text = "PLL";
this.toolTip1.SetToolTip(this.btnPLL, "PLL Test: Not Run");
this.btnPLL.Click += new System.EventHandler(this.btnPLL_Click);
//
// btnImpulse
//
this.btnImpulse.Image = null;
this.btnImpulse.Location = new System.Drawing.Point(104, 48);
this.btnImpulse.Name = "btnImpulse";
this.btnImpulse.Size = new System.Drawing.Size(75, 23);
this.btnImpulse.TabIndex = 6;
this.btnImpulse.Text = "Impulse";
this.toolTip1.SetToolTip(this.btnImpulse, "Impulse Test: Not Run");
this.btnImpulse.Click += new System.EventHandler(this.btnImpulse_Click);
//
// btnRXImage
//
this.btnRXImage.Image = null;
this.btnRXImage.Location = new System.Drawing.Point(16, 64);
this.btnRXImage.Name = "btnRXImage";
this.btnRXImage.Size = new System.Drawing.Size(75, 23);
this.btnRXImage.TabIndex = 4;
this.btnRXImage.Text = "Image";
this.toolTip1.SetToolTip(this.btnRXImage, "RX Image Test: Not Run");
this.btnRXImage.Click += new System.EventHandler(this.btnRXImage_Click);
//
// btnRXFilter
//
this.btnRXFilter.Image = null;
this.btnRXFilter.Location = new System.Drawing.Point(16, 24);
this.btnRXFilter.Name = "btnRXFilter";
this.btnRXFilter.Size = new System.Drawing.Size(75, 23);
this.btnRXFilter.TabIndex = 1;
this.btnRXFilter.Text = "Filter";
this.toolTip1.SetToolTip(this.btnRXFilter, "RX Filter Test: Not Run");
this.btnRXFilter.Click += new System.EventHandler(this.btnRXFilter_Click);
//
// btnRXLevel
//
this.btnRXLevel.Image = null;
this.btnRXLevel.Location = new System.Drawing.Point(104, 24);
this.btnRXLevel.Name = "btnRXLevel";
this.btnRXLevel.Size = new System.Drawing.Size(75, 23);
this.btnRXLevel.TabIndex = 3;
this.btnRXLevel.Text = "Level";
this.toolTip1.SetToolTip(this.btnRXLevel, "RX Level Test: Not Run");
this.btnRXLevel.Click += new System.EventHandler(this.btnRXLevel_Click);
//
// lstDebug
//
this.lstDebug.HorizontalScrollbar = true;
@ -560,6 +450,18 @@ namespace PowerSDR
//
this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
//
// btnRunAll1500
//
this.btnRunAll1500.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRunAll1500.Image = null;
this.btnRunAll1500.Location = new System.Drawing.Point(387, 343);
this.btnRunAll1500.Name = "btnRunAll1500";
this.btnRunAll1500.Size = new System.Drawing.Size(88, 32);
this.btnRunAll1500.TabIndex = 31;
this.btnRunAll1500.Text = "Run All 1500 Tests";
this.btnRunAll1500.Visible = false;
this.btnRunAll1500.Click += new System.EventHandler(this.btnRunAll1500_Click);
//
// btnPostFence
//
this.btnPostFence.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -606,6 +508,16 @@ namespace PowerSDR
this.grpComPort.Text = "COM Port";
this.grpComPort.Visible = false;
//
// comboCOMPort
//
this.comboCOMPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboCOMPort.DropDownWidth = 72;
this.comboCOMPort.Location = new System.Drawing.Point(16, 16);
this.comboCOMPort.Name = "comboCOMPort";
this.comboCOMPort.Size = new System.Drawing.Size(72, 21);
this.comboCOMPort.TabIndex = 0;
this.toolTip1.SetToolTip(this.comboCOMPort, "COM Port Power Master Wattmeter is connected to");
//
// btnIOFWPTT
//
this.btnIOFWPTT.Image = null;
@ -1326,11 +1238,79 @@ namespace PowerSDR
this.grpGeneral.Controls.Add(this.btnImpulse);
this.grpGeneral.Location = new System.Drawing.Point(8, 8);
this.grpGeneral.Name = "grpGeneral";
this.grpGeneral.Size = new System.Drawing.Size(200, 112);
this.grpGeneral.Size = new System.Drawing.Size(184, 112);
this.grpGeneral.TabIndex = 3;
this.grpGeneral.TabStop = false;
this.grpGeneral.Text = "General Tests";
//
// btnGenATTN
//
this.btnGenATTN.Image = null;
this.btnGenATTN.Location = new System.Drawing.Point(96, 80);
this.btnGenATTN.Name = "btnGenATTN";
this.btnGenATTN.Size = new System.Drawing.Size(75, 23);
this.btnGenATTN.TabIndex = 8;
this.btnGenATTN.Text = "Attenuator";
this.toolTip1.SetToolTip(this.btnGenATTN, "Attenuator Test: Not Run");
this.btnGenATTN.Visible = false;
this.btnGenATTN.Click += new System.EventHandler(this.btnGenATTN_Click);
//
// btnGenPreamp
//
this.btnGenPreamp.Image = null;
this.btnGenPreamp.Location = new System.Drawing.Point(8, 80);
this.btnGenPreamp.Name = "btnGenPreamp";
this.btnGenPreamp.Size = new System.Drawing.Size(75, 23);
this.btnGenPreamp.TabIndex = 7;
this.btnGenPreamp.Text = "Preamp";
this.toolTip1.SetToolTip(this.btnGenPreamp, "Preamp Test: Not Run");
this.btnGenPreamp.Click += new System.EventHandler(this.btnGenPreamp_Click);
//
// btnNoise
//
this.btnNoise.Image = null;
this.btnNoise.Location = new System.Drawing.Point(8, 48);
this.btnNoise.Name = "btnNoise";
this.btnNoise.Size = new System.Drawing.Size(75, 23);
this.btnNoise.TabIndex = 2;
this.btnNoise.Text = "Noise";
this.toolTip1.SetToolTip(this.btnNoise, "Noise Test: Not Run");
this.btnNoise.Visible = false;
this.btnNoise.Click += new System.EventHandler(this.btnNoise_Click);
//
// btnGenBal
//
this.btnGenBal.Image = null;
this.btnGenBal.Location = new System.Drawing.Point(96, 16);
this.btnGenBal.Name = "btnGenBal";
this.btnGenBal.Size = new System.Drawing.Size(75, 23);
this.btnGenBal.TabIndex = 1;
this.btnGenBal.Text = "Gen/Bal";
this.toolTip1.SetToolTip(this.btnGenBal, "Gen/Bal Test: Not Run");
this.btnGenBal.Click += new System.EventHandler(this.btnGenBal_Click);
//
// btnPLL
//
this.btnPLL.Image = null;
this.btnPLL.Location = new System.Drawing.Point(8, 16);
this.btnPLL.Name = "btnPLL";
this.btnPLL.Size = new System.Drawing.Size(75, 23);
this.btnPLL.TabIndex = 0;
this.btnPLL.Text = "PLL";
this.toolTip1.SetToolTip(this.btnPLL, "PLL Test: Not Run");
this.btnPLL.Click += new System.EventHandler(this.btnPLL_Click);
//
// btnImpulse
//
this.btnImpulse.Image = null;
this.btnImpulse.Location = new System.Drawing.Point(96, 48);
this.btnImpulse.Name = "btnImpulse";
this.btnImpulse.Size = new System.Drawing.Size(75, 23);
this.btnImpulse.TabIndex = 6;
this.btnImpulse.Text = "Impulse";
this.toolTip1.SetToolTip(this.btnImpulse, "Impulse Test: Not Run");
this.btnImpulse.Click += new System.EventHandler(this.btnImpulse_Click);
//
// grpReceiver
//
this.grpReceiver.Controls.Add(this.udLevel);
@ -1368,17 +1348,49 @@ namespace PowerSDR
-2147418112});
this.udLevel.Visible = false;
//
// btnRunAll1500
// btnRXImage
//
this.btnRunAll1500.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRunAll1500.Image = null;
this.btnRunAll1500.Location = new System.Drawing.Point(387, 343);
this.btnRunAll1500.Name = "btnRunAll1500";
this.btnRunAll1500.Size = new System.Drawing.Size(88, 32);
this.btnRunAll1500.TabIndex = 31;
this.btnRunAll1500.Text = "Run All 1500 Tests";
this.btnRunAll1500.Visible = false;
this.btnRunAll1500.Click += new System.EventHandler(this.btnRunAll1500_Click);
this.btnRXImage.Image = null;
this.btnRXImage.Location = new System.Drawing.Point(16, 64);
this.btnRXImage.Name = "btnRXImage";
this.btnRXImage.Size = new System.Drawing.Size(75, 23);
this.btnRXImage.TabIndex = 4;
this.btnRXImage.Text = "Image";
this.toolTip1.SetToolTip(this.btnRXImage, "RX Image Test: Not Run");
this.btnRXImage.Click += new System.EventHandler(this.btnRXImage_Click);
//
// btnRXFilter
//
this.btnRXFilter.Image = null;
this.btnRXFilter.Location = new System.Drawing.Point(16, 24);
this.btnRXFilter.Name = "btnRXFilter";
this.btnRXFilter.Size = new System.Drawing.Size(75, 23);
this.btnRXFilter.TabIndex = 1;
this.btnRXFilter.Text = "Filter";
this.toolTip1.SetToolTip(this.btnRXFilter, "RX Filter Test: Not Run");
this.btnRXFilter.Click += new System.EventHandler(this.btnRXFilter_Click);
//
// btnRXLevel
//
this.btnRXLevel.Image = null;
this.btnRXLevel.Location = new System.Drawing.Point(104, 24);
this.btnRXLevel.Name = "btnRXLevel";
this.btnRXLevel.Size = new System.Drawing.Size(75, 23);
this.btnRXLevel.TabIndex = 3;
this.btnRXLevel.Text = "Level";
this.toolTip1.SetToolTip(this.btnRXLevel, "RX Level Test: Not Run");
this.btnRXLevel.Click += new System.EventHandler(this.btnRXLevel_Click);
//
// checkGENBAL
//
this.checkGENBAL.Image = null;
this.checkGENBAL.Location = new System.Drawing.Point(195, 23);
this.checkGENBAL.Margin = new System.Windows.Forms.Padding(0);
this.checkGENBAL.Name = "checkGENBAL";
this.checkGENBAL.Size = new System.Drawing.Size(27, 24);
this.checkGENBAL.TabIndex = 31;
this.toolTip1.SetToolTip(this.checkGENBAL, "Automatic Repeat of the GEN/BAL test until unchecked.\r\nNOTE: Does not update the " +
"LOG file");
//
// FLEX5000ProdTestForm
//
@ -1401,6 +1413,7 @@ namespace PowerSDR
this.Controls.Add(this.grpTransmitter);
this.Controls.Add(this.grpGeneral);
this.Controls.Add(this.grpReceiver);
this.Controls.Add(this.checkGENBAL);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.Name = "FLEX5000ProdTestForm";
@ -1551,14 +1564,7 @@ namespace PowerSDR
private string test_genbal = "Gen/Bal Test: Not Run";
private void TestGenBal()
{
/*if(!console.PowerOn)
{
MessageBox.Show("Power must be on to run this test.",
"Power not on",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}*/
if (!console.PowerOn)
{
@ -1566,8 +1572,8 @@ namespace PowerSDR
Thread.Sleep(500);
}
if (console.VFOSync)
console.VFOSync = false;
if (console.VFOSync) console.VFOSync = false;
console.VFOSplit = false;
double vfob_freq = console.VFOBFreq;
@ -1596,173 +1602,202 @@ namespace PowerSDR
HIDAnt hid_ant = console.RXAnt1500;
switch (console.CurrentModel)
{
case Model.FLEX5000:
case Model.FLEX3000:
console.RX1FilterLow = -1000;
console.RX1FilterHigh = 1000;
FWC.SetTest(true);
FWC.SetSig(true);
FWC.SetGen(true);
FWC.SetFullDuplex(true);
FWC.SetTXMon(false);
FWC.SetRX1Filter(-1.0f);
Thread.Sleep(1000);
break;
case Model.FLEX1500:
console.RX1FilterLow = -(int)(console.IFFreq * 1e6) + console.CWPitch - 100;
console.RX1FilterHigh = -(int)(console.IFFreq * 1e6) + console.CWPitch + 100;
console.RXAnt1500 = HIDAnt.BITE;
Thread.Sleep(100);
USBHID.SetGen(true);
Thread.Sleep(100);
USBHID.SetQSE(true);
Thread.Sleep(100);
USBHID.SetTest(true);
Thread.Sleep(100);
USBHID.SetPreamp(FLEX1500PreampMode.MINUS_10);
Thread.Sleep(100);
DttSP.SetCorrectIQEnable(0); // turn off I/Q correction
DttSP.SetCorrectRXIQw(0, 0, 0.0f, 0.0f, 0);
DttSP.SetCorrectRXIQw(0, 0, 0.0f, 0.0f, 1);
Audio.SourceScale = 0.178;
Audio.RX1OutputSignal = Audio.SignalSource.SINE;
USBHID.WriteI2C2Value(0x30, 0x0C, 0x50); // turn on hardware HPF
Thread.Sleep(1000);
break;
}
// ke9ns add do loop .157 checkGENBAL
float adc_l = 0.0f;
DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
Thread.Sleep(50);
for (int j = 0; j < 5; j++)
{
adc_l += DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
if (j != 4) Thread.Sleep(50);
}
adc_l /= 5;
float adc_r = 0.0f;
DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_IMAG);
Thread.Sleep(50);
for (int j = 0; j < 5; j++)
{
adc_r += DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_IMAG);
if (j != 4) Thread.Sleep(50);
}
adc_r /= 5;
switch (console.CurrentModel)
{
case Model.FLEX5000:
case Model.FLEX3000:
FWC.SetTest(false);
//Thread.Sleep(50);
FWC.SetSig(false);
//Thread.Sleep(50);
FWC.SetGen(false);
Thread.Sleep(500);
break;
case Model.FLEX1500:
Audio.RX1OutputSignal = Audio.SignalSource.RADIO;
USBHID.SetTest(false); Thread.Sleep(20);
USBHID.SetGen(false); Thread.Sleep(10);
USBHID.SetQSE(false); Thread.Sleep(10);
console.RXAnt1500 = hid_ant; Thread.Sleep(10);
Thread.Sleep(1000);
break;
}
float off_l = 0.0f;
DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
Thread.Sleep(50);
for (int j = 0; j < 5; j++)
{
off_l += DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
if (j != 4) Thread.Sleep(50);
}
off_l /= 5;
float target = 0.0f;
switch (console.CurrentModel)
{
case Model.FLEX5000: target = 55.0f; break;
case Model.FLEX3000: target = 47.0f; break;
case Model.FLEX1500: target = 40.0f; break;
}
if (console.CurrentModel == Model.FLEX1500)
USBHID.WriteI2C2Value(0x30, 0x0C, 0x00); // turn off hardware HPF
test_genbal = "Gen/Bal Test: ";
bool b = true;
if (adc_l - off_l < target)
adc_l = 0.0f;
adc_r = 0.0f;
off_l = 0.0f;
b = true;
switch (console.CurrentModel)
{
case Model.FLEX5000:
case Model.FLEX3000:
console.RX1FilterLow = -1000;
console.RX1FilterHigh = 1000;
FWC.SetTest(true);
FWC.SetSig(true);
FWC.SetGen(true);
FWC.SetFullDuplex(true);
FWC.SetTXMon(false);
FWC.SetRX1Filter(-1.0f);
Thread.Sleep(1000); // ke9ns 1000
break;
case Model.FLEX1500:
console.RX1FilterLow = -(int)(console.IFFreq * 1e6) + console.CWPitch - 100;
console.RX1FilterHigh = -(int)(console.IFFreq * 1e6) + console.CWPitch + 100;
console.RXAnt1500 = HIDAnt.BITE;
Thread.Sleep(100);
USBHID.SetGen(true);
Thread.Sleep(100);
USBHID.SetQSE(true);
Thread.Sleep(100);
USBHID.SetTest(true);
Thread.Sleep(100);
USBHID.SetPreamp(FLEX1500PreampMode.MINUS_10);
Thread.Sleep(100);
DttSP.SetCorrectIQEnable(0); // turn off I/Q correction
DttSP.SetCorrectRXIQw(0, 0, 0.0f, 0.0f, 0);
DttSP.SetCorrectRXIQw(0, 0, 0.0f, 0.0f, 1);
Audio.SourceScale = 0.178;
Audio.RX1OutputSignal = Audio.SignalSource.SINE;
USBHID.WriteI2C2Value(0x30, 0x0C, 0x50); // turn on hardware HPF
Thread.Sleep(1000);
break;
}
DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
Thread.Sleep(50);
for (int j = 0; j < 5; j++)
{
adc_l += DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
if (j != 4) Thread.Sleep(50); // 50
}
adc_l /= 5;
DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_IMAG);
Thread.Sleep(50);
for (int j = 0; j < 5; j++)
{
adc_r += DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_IMAG);
if (j != 4) Thread.Sleep(50);// 50
}
adc_r /= 5;
do
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_L S/N <" + target.ToString("f0") + "dB (" + (adc_l - off_l).ToString("f1") + ")");
test_genbal += "ADC_L S/N <" + target.ToString("f0") + "dB (" + (adc_l - off_l).ToString("f1") + ")\n";
b = false;
}
if (adc_r - off_l < target)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_R S/N <" + target.ToString("f0") + "dB (" + (adc_r - off_l).ToString("f1") + ")");
test_genbal += "ADC_R S/N <" + target.ToString("f0") + "dB (" + (adc_r - off_l).ToString("f1") + ")\n";
b = false;
}
if (Math.Abs(adc_r - adc_l) > 1.0f)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed Chan Bal >1dB (" + Math.Abs(adc_r - adc_l).ToString("f1") + ")");
test_genbal += "Chan Bal >1dB (" + Math.Abs(adc_r - adc_l).ToString("f1") + ")\n";
b = false;
Thread.Sleep(50); // wait until you stop it.
}
while (checkGENBAL.Checked == true);
switch (console.CurrentModel)
{
case Model.FLEX5000: target = -26.6f; break;
case Model.FLEX3000: target = -27.1f; break;
case Model.FLEX1500: target = -10.0f; break;
}
if (Math.Abs(target - adc_l) > 1.0f)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_L " + target.ToString("f1") + "+/-1.0 (" + adc_l.ToString("f1") + ")");
test_genbal += "ADC_L " + target.ToString("f1") + "+/-1.0 (" + adc_l.ToString("f1") + ")\n";
b = false;
}
{
case Model.FLEX5000:
case Model.FLEX3000:
FWC.SetTest(false);
//Thread.Sleep(50);
FWC.SetSig(false);
//Thread.Sleep(50);
FWC.SetGen(false);
Thread.Sleep(500); // ke9ns 500
break;
case Model.FLEX1500:
Audio.RX1OutputSignal = Audio.SignalSource.RADIO;
USBHID.SetTest(false); Thread.Sleep(20);
USBHID.SetGen(false); Thread.Sleep(10);
USBHID.SetQSE(false); Thread.Sleep(10);
console.RXAnt1500 = hid_ant; Thread.Sleep(10);
Thread.Sleep(1000);
break;
}
DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
Thread.Sleep(50);
switch (console.CurrentModel)
{
case Model.FLEX5000: target = -26.1f; break;
case Model.FLEX3000: target = -26.8f; break;
case Model.FLEX1500: target = -10.0f; break;
}
if (Math.Abs(target - adc_r) > 1.0f)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_R " + target.ToString("f1") + "+/-1.0 (" + adc_r.ToString("f1") + ")");
test_genbal += "ADC_R " + target.ToString("f1") + "+/-1.0 (" + adc_r.ToString("f1") + ")\n";
b = false;
}
for (int j = 0; j < 5; j++)
{
off_l += DttSP.CalculateRXMeter(0, 0, DttSP.MeterType.ADC_REAL);
if (j != 4) Thread.Sleep(50);
}
off_l /= 5;
if (b)
{
btnGenBal.BackColor = Color.Green;
test_genbal = "Gen/Bal Test: Passed (" + adc_l.ToString("f1") + ", " + adc_r.ToString("f1") + ")";
float target = 0.0f;
switch (console.CurrentModel)
{
case Model.FLEX5000: target = 55.0f; break;
case Model.FLEX3000: target = 47.0f; break;
case Model.FLEX1500: target = 40.0f; break;
}
if (console.CurrentModel == Model.FLEX1500) USBHID.WriteI2C2Value(0x30, 0x0C, 0x00); // turn off hardware HPF
test_genbal = "Gen/Bal Test: ";
if (adc_l - off_l < target)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_L S/N <" + target.ToString("f0") + "dB (" + (adc_l - off_l).ToString("f1") + ")");
test_genbal += "ADC_L S/N <" + target.ToString("f0") + "dB (" + (adc_l - off_l).ToString("f1") + ")\n";
b = false;
}
if (adc_r - off_l < target)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_R S/N <" + target.ToString("f0") + "dB (" + (adc_r - off_l).ToString("f1") + ")");
test_genbal += "ADC_R S/N <" + target.ToString("f0") + "dB (" + (adc_r - off_l).ToString("f1") + ")\n";
b = false;
}
if (Math.Abs(adc_r - adc_l) > 1.0f)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed Chan Bal >1dB (" + Math.Abs(adc_r - adc_l).ToString("f1") + ")");
test_genbal += "Chan Bal >1dB (" + Math.Abs(adc_r - adc_l).ToString("f1") + ")\n";
b = false;
}
switch (console.CurrentModel)
{
case Model.FLEX5000: target = -26.6f; break;
case Model.FLEX3000: target = -27.1f; break;
case Model.FLEX1500: target = -10.0f; break;
}
if (Math.Abs(target - adc_l) > 1.0f)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_L " + target.ToString("f1") + "+/-1.0 (" + adc_l.ToString("f1") + ")");
test_genbal += "ADC_L " + target.ToString("f1") + "+/-1.0 (" + adc_l.ToString("f1") + ")\n";
b = false;
}
switch (console.CurrentModel)
{
case Model.FLEX5000: target = -26.1f; break;
case Model.FLEX3000: target = -26.8f; break;
case Model.FLEX1500: target = -10.0f; break;
}
if (Math.Abs(target - adc_r) > 1.0f)
{
lstDebug.Items.Insert(0, " Gen/Bal Test: Failed ADC_R " + target.ToString("f1") + "+/-1.0 (" + adc_r.ToString("f1") + ")");
test_genbal += "ADC_R " + target.ToString("f1") + "+/-1.0 (" + adc_r.ToString("f1") + ")\n";
b = false;
}
if (b)
{
btnGenBal.BackColor = Color.Green;
test_genbal = "Gen/Bal Test: Passed (" + adc_l.ToString("f1") + ", " + adc_r.ToString("f1") + ")";
lstDebug.Items.Insert(0, test_genbal);
// if (checkGENBAL.Checked == false) break;
}
else
{
btnGenBal.BackColor = Color.Red;
}
toolTip1.SetToolTip(btnGenBal, test_genbal);
test_genbal = " \r\n";
lstDebug.Items.Insert(0, test_genbal);
}
else
{
btnGenBal.BackColor = Color.Red;
}
toolTip1.SetToolTip(btnGenBal, test_genbal);
DttSP.SetCorrectIQEnable(1); // turn on I/Q correction
console.VFOAFreq = vfoa_freq;
console.FullDuplex = full_duplex;
console.VFOBFreq = vfob_freq;
@ -1807,7 +1842,9 @@ namespace PowerSDR
grpReceiver.Enabled = true;
grpTransmitter.Enabled = true;
grpIO.Enabled = true;
}
} //TestGenBal()
#endregion

View File

@ -112,18 +112,18 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>168, 17</value>
</metadata>
<metadata name="printPreviewDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="printPreviewDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="printPreviewDialog1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAICAQAAAAAADoAgAAJgAAABAQEAAAAAAAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAIAC
@ -146,10 +146,10 @@
AABsAgAAbAIAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAHwAAAB8AAAAAAAAAA==
</value>
</data>
<metadata name="printDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="printDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>260, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>54</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -225,7 +225,7 @@ namespace PowerSDR
this.Controls.Add(this.grpBand);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PreSelForm";
this.Text = "Preselector";
this.Text = "Preselector IIC";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PreSelForm_FormClosing);
this.grpAnt.ResumeLayout(false);
this.grpAnt.PerformLayout();
@ -240,16 +240,16 @@ namespace PowerSDR
#endregion
private System.Windows.Forms.GroupBoxTS grpBand;
private System.Windows.Forms.RadioButtonTS radBandA;
private System.Windows.Forms.RadioButtonTS radBandE;
private System.Windows.Forms.RadioButtonTS radBandD;
private System.Windows.Forms.RadioButtonTS radBandC;
private System.Windows.Forms.RadioButtonTS radBandB;
private System.Windows.Forms.TrackBarTS tbTune;
private System.Windows.Forms.RadioButtonTS radAnt1;
private System.Windows.Forms.GroupBoxTS grpAnt;
private System.Windows.Forms.RadioButtonTS radAnt2;
private System.Windows.Forms.CheckBoxTS chkBypassTR;
private System.Windows.Forms.RadioButtonTS radAntRXOnly;
public System.Windows.Forms.RadioButtonTS radBandA;
public System.Windows.Forms.RadioButtonTS radBandE;
public System.Windows.Forms.RadioButtonTS radBandD;
public System.Windows.Forms.RadioButtonTS radBandC;
public System.Windows.Forms.RadioButtonTS radBandB;
public System.Windows.Forms.TrackBarTS tbTune;
public System.Windows.Forms.RadioButtonTS radAnt1;
public System.Windows.Forms.RadioButtonTS radAnt2;
public System.Windows.Forms.CheckBoxTS chkBypassTR;
public System.Windows.Forms.RadioButtonTS radAntRXOnly;
}
}

View File

@ -91,8 +91,7 @@ namespace PowerSDR
private void chkBypassTR_CheckedChanged(object sender, EventArgs e)
{
if (chkBypassTR.Checked)
chkBypassTR.BackColor = console.ButtonSelectedColor;
if (chkBypassTR.Checked) chkBypassTR.BackColor = console.ButtonSelectedColor;
else chkBypassTR.BackColor = SystemColors.Control;
UpdatePreSel();
}
@ -105,12 +104,11 @@ namespace PowerSDR
return temp;
}
private void UpdatePreSel()
public void UpdatePreSel()
{
byte reg0=0, reg1=0;
if (radBandA.Checked)
reg0 += (1 << 4); // Port 04
if (radBandA.Checked) reg0 += (1 << 4); // Port 04
else if (radBandB.Checked)
reg0 += (1 << 1); // Port 01
else if (radBandC.Checked)
@ -136,15 +134,19 @@ namespace PowerSDR
{
case Model.FLEX5000:
case Model.FLEX3000:
if(console.fwc_init)
FWC.FlexWire_Write2Value(0x40, reg0, reg1);
if (console.fwc_init)
{
// Debug.WriteLine("===I2C=== HERO preselform");
FWC.FlexWire_Write2Value(0x40, reg0, reg1);
}
break;
case Model.FLEX1500:
if(console.hid_init)
USBHID.FlexWire_Write2Value(0x40, reg0, reg1);
break;
}
}
} // UpdatePreSel()
private void PreSelForm_FormClosing(object sender, FormClosingEventArgs e)
{

View File

@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAEBAAAAAAIABoBAAANgAAACAgAAAAACAAqBAAAJ4EAAAwMAAAAAAgAKglAABGFQAAKAAAABAA

View File

@ -910,7 +910,7 @@ namespace PowerSDR
string ret_val = "";
switch(b)
{
case Band.GEN: ret_val = "GEN"; break;
case Band.GEN: ret_val = "GEN"; break; // ke9ns mod
case Band.B160M: ret_val = "160m"; break;
case Band.B80M: ret_val = "80m"; break;
case Band.B60M: ret_val = "60m"; break;
@ -966,7 +966,7 @@ namespace PowerSDR
Band b = Band.GEN;
switch(s)
{
case "GEN": b = Band.GEN; break;
case "GEN": b = Band.GEN; break; // ke9ns mod
case "160m": b = Band.B160M; break;
case "80m": b = Band.B80M; break;
case "60m": b = Band.B60M; break;
@ -1297,8 +1297,7 @@ namespace PowerSDR
console.SetTXAnt(StringToBand(comboBand.Text), StringToAnt(comboTXAnt.Text));
}
if(chkLock.Checked)
comboRX1Ant.Text = comboTXAnt.Text;
if(chkLock.Checked) comboRX1Ant.Text = comboTXAnt.Text;
if (radModeExpert.Checked) console.CurrentAntMode = AntMode.Expert; // ke9ns add: update console Ant display .119
else console.CurrentAntMode = AntMode.Simple;

View File

@ -142,20 +142,7 @@ namespace PowerSDR
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FWCMixForm));
this.tbMic = new System.Windows.Forms.TrackBarTS();
this.chkMicSel = new System.Windows.Forms.CheckBoxTS();
this.grpInput = new System.Windows.Forms.GroupBoxTS();
this.chkInputMuteAll = new System.Windows.Forms.CheckBoxTS();
this.lblLineInDB9 = new System.Windows.Forms.LabelTS();
this.chkLineInDB9Sel = new System.Windows.Forms.CheckBoxTS();
this.tbLineInDB9 = new System.Windows.Forms.TrackBarTS();
this.lblLineInPhono = new System.Windows.Forms.LabelTS();
this.chkLineInPhonoSel = new System.Windows.Forms.CheckBoxTS();
this.tbLineInPhono = new System.Windows.Forms.TrackBarTS();
this.lblLineInRCA = new System.Windows.Forms.LabelTS();
this.chkLineInRCASel = new System.Windows.Forms.CheckBoxTS();
this.tbLineInRCA = new System.Windows.Forms.TrackBarTS();
this.lblMic = new System.Windows.Forms.LabelTS();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.grpOutput = new System.Windows.Forms.GroupBoxTS();
this.lblLineOutRCA = new System.Windows.Forms.LabelTS();
this.chkLineOutRCASel = new System.Windows.Forms.CheckBoxTS();
@ -170,197 +157,32 @@ namespace PowerSDR
this.lblIntSpkr = new System.Windows.Forms.LabelTS();
this.chkIntSpkrSel = new System.Windows.Forms.CheckBoxTS();
this.tbIntSpkr = new System.Windows.Forms.TrackBarTS();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
((System.ComponentModel.ISupportInitialize)(this.tbMic)).BeginInit();
this.grpInput.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbLineInDB9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInPhono)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInRCA)).BeginInit();
this.grpInput = new System.Windows.Forms.GroupBoxTS();
this.chkInputMuteAll = new System.Windows.Forms.CheckBoxTS();
this.lblLineInDB9 = new System.Windows.Forms.LabelTS();
this.chkLineInDB9Sel = new System.Windows.Forms.CheckBoxTS();
this.tbLineInDB9 = new System.Windows.Forms.TrackBarTS();
this.lblLineInPhono = new System.Windows.Forms.LabelTS();
this.chkLineInPhonoSel = new System.Windows.Forms.CheckBoxTS();
this.tbLineInPhono = new System.Windows.Forms.TrackBarTS();
this.lblLineInRCA = new System.Windows.Forms.LabelTS();
this.chkLineInRCASel = new System.Windows.Forms.CheckBoxTS();
this.tbLineInRCA = new System.Windows.Forms.TrackBarTS();
this.lblMic = new System.Windows.Forms.LabelTS();
this.chkMicSel = new System.Windows.Forms.CheckBoxTS();
this.tbMic = new System.Windows.Forms.TrackBarTS();
this.grpOutput.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbLineOutRCA)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbHeadphone)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbExtSpkr)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbIntSpkr)).BeginInit();
this.grpInput.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbLineInDB9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInPhono)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInRCA)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbMic)).BeginInit();
this.SuspendLayout();
//
// tbMic
//
this.tbMic.Location = new System.Drawing.Point(16, 48);
this.tbMic.Maximum = 0;
this.tbMic.Minimum = -128;
this.tbMic.Name = "tbMic";
this.tbMic.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbMic.Size = new System.Drawing.Size(45, 104);
this.tbMic.TabIndex = 0;
this.tbMic.TickFrequency = 16;
this.tbMic.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbMic, resources.GetString("tbMic.ToolTip"));
this.tbMic.Scroll += new System.EventHandler(this.tbMic_Scroll);
//
// chkMicSel
//
this.chkMicSel.Checked = true;
this.chkMicSel.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkMicSel.Image = null;
this.chkMicSel.Location = new System.Drawing.Point(30, 144);
this.chkMicSel.Name = "chkMicSel";
this.chkMicSel.Size = new System.Drawing.Size(16, 24);
this.chkMicSel.TabIndex = 1;
this.toolTip1.SetToolTip(this.chkMicSel, "Selects/Unselects the Mic Input");
this.chkMicSel.CheckedChanged += new System.EventHandler(this.chkMicSel_CheckedChanged);
//
// grpInput
//
this.grpInput.Controls.Add(this.chkInputMuteAll);
this.grpInput.Controls.Add(this.lblLineInDB9);
this.grpInput.Controls.Add(this.chkLineInDB9Sel);
this.grpInput.Controls.Add(this.tbLineInDB9);
this.grpInput.Controls.Add(this.lblLineInPhono);
this.grpInput.Controls.Add(this.chkLineInPhonoSel);
this.grpInput.Controls.Add(this.tbLineInPhono);
this.grpInput.Controls.Add(this.lblLineInRCA);
this.grpInput.Controls.Add(this.chkLineInRCASel);
this.grpInput.Controls.Add(this.tbLineInRCA);
this.grpInput.Controls.Add(this.lblMic);
this.grpInput.Controls.Add(this.chkMicSel);
this.grpInput.Controls.Add(this.tbMic);
this.grpInput.Location = new System.Drawing.Point(8, 8);
this.grpInput.Name = "grpInput";
this.grpInput.Size = new System.Drawing.Size(216, 216);
this.grpInput.TabIndex = 2;
this.grpInput.TabStop = false;
this.grpInput.Text = "Input (Stage 1)";
this.toolTip1.SetToolTip(this.grpInput, resources.GetString("grpInput.ToolTip"));
//
// chkInputMuteAll
//
this.chkInputMuteAll.Appearance = System.Windows.Forms.Appearance.Button;
this.chkInputMuteAll.Image = null;
this.chkInputMuteAll.Location = new System.Drawing.Point(16, 176);
this.chkInputMuteAll.Name = "chkInputMuteAll";
this.chkInputMuteAll.Size = new System.Drawing.Size(184, 24);
this.chkInputMuteAll.TabIndex = 12;
this.chkInputMuteAll.Text = "Mute All Inputs";
this.chkInputMuteAll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.toolTip1.SetToolTip(this.chkInputMuteAll, "Mute All Input Lines");
this.chkInputMuteAll.CheckedChanged += new System.EventHandler(this.chkInputMuteAll_CheckedChanged);
//
// lblLineInDB9
//
this.lblLineInDB9.Image = null;
this.lblLineInDB9.Location = new System.Drawing.Point(157, 24);
this.lblLineInDB9.Name = "lblLineInDB9";
this.lblLineInDB9.Size = new System.Drawing.Size(49, 24);
this.lblLineInDB9.TabIndex = 11;
this.lblLineInDB9.Text = "FlexWire In";
this.lblLineInDB9.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblLineInDB9, "FlexWire Audio Input (DB9 on back panel)");
//
// chkLineInDB9Sel
//
this.chkLineInDB9Sel.Image = null;
this.chkLineInDB9Sel.Location = new System.Drawing.Point(174, 144);
this.chkLineInDB9Sel.Name = "chkLineInDB9Sel";
this.chkLineInDB9Sel.Size = new System.Drawing.Size(16, 24);
this.chkLineInDB9Sel.TabIndex = 10;
this.toolTip1.SetToolTip(this.chkLineInDB9Sel, "Selects/Unselects the Line In DB9 Input");
this.chkLineInDB9Sel.CheckedChanged += new System.EventHandler(this.chkLineInDB9Sel_CheckedChanged);
//
// tbLineInDB9
//
this.tbLineInDB9.Location = new System.Drawing.Point(160, 48);
this.tbLineInDB9.Maximum = 0;
this.tbLineInDB9.Minimum = -128;
this.tbLineInDB9.Name = "tbLineInDB9";
this.tbLineInDB9.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbLineInDB9.Size = new System.Drawing.Size(45, 104);
this.tbLineInDB9.TabIndex = 9;
this.tbLineInDB9.TickFrequency = 16;
this.tbLineInDB9.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbLineInDB9, resources.GetString("tbLineInDB9.ToolTip"));
this.tbLineInDB9.Scroll += new System.EventHandler(this.tbLineInDB9_Scroll);
//
// lblLineInPhono
//
this.lblLineInPhono.Image = null;
this.lblLineInPhono.Location = new System.Drawing.Point(112, 24);
this.lblLineInPhono.Name = "lblLineInPhono";
this.lblLineInPhono.Size = new System.Drawing.Size(45, 24);
this.lblLineInPhono.TabIndex = 8;
this.lblLineInPhono.Text = "Bal Line In";
this.lblLineInPhono.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblLineInPhono, "Balanced Line Input (Phono Plug on back panel)");
//
// chkLineInPhonoSel
//
this.chkLineInPhonoSel.Image = null;
this.chkLineInPhonoSel.Location = new System.Drawing.Point(126, 144);
this.chkLineInPhonoSel.Name = "chkLineInPhonoSel";
this.chkLineInPhonoSel.Size = new System.Drawing.Size(16, 24);
this.chkLineInPhonoSel.TabIndex = 7;
this.toolTip1.SetToolTip(this.chkLineInPhonoSel, "Selects/Unselects the Line In Phono Input");
this.chkLineInPhonoSel.CheckedChanged += new System.EventHandler(this.chkLineInPhonoSel_CheckedChanged);
//
// tbLineInPhono
//
this.tbLineInPhono.Location = new System.Drawing.Point(112, 48);
this.tbLineInPhono.Maximum = 0;
this.tbLineInPhono.Minimum = -128;
this.tbLineInPhono.Name = "tbLineInPhono";
this.tbLineInPhono.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbLineInPhono.Size = new System.Drawing.Size(45, 104);
this.tbLineInPhono.TabIndex = 6;
this.tbLineInPhono.TickFrequency = 16;
this.tbLineInPhono.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbLineInPhono, resources.GetString("tbLineInPhono.ToolTip"));
this.tbLineInPhono.Scroll += new System.EventHandler(this.tbLineInPhono_Scroll);
//
// lblLineInRCA
//
this.lblLineInRCA.Image = null;
this.lblLineInRCA.Location = new System.Drawing.Point(64, 24);
this.lblLineInRCA.Name = "lblLineInRCA";
this.lblLineInRCA.Size = new System.Drawing.Size(45, 24);
this.lblLineInRCA.TabIndex = 5;
this.lblLineInRCA.Text = "Line In RCA";
this.lblLineInRCA.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblLineInRCA, "Line Input (White RCA on back panel)");
//
// chkLineInRCASel
//
this.chkLineInRCASel.Image = null;
this.chkLineInRCASel.Location = new System.Drawing.Point(78, 144);
this.chkLineInRCASel.Name = "chkLineInRCASel";
this.chkLineInRCASel.Size = new System.Drawing.Size(16, 24);
this.chkLineInRCASel.TabIndex = 4;
this.toolTip1.SetToolTip(this.chkLineInRCASel, "Selects/Unselects the Line In RCA Input");
this.chkLineInRCASel.CheckedChanged += new System.EventHandler(this.chkLineInRCASel_CheckedChanged);
//
// tbLineInRCA
//
this.tbLineInRCA.Location = new System.Drawing.Point(64, 48);
this.tbLineInRCA.Maximum = 0;
this.tbLineInRCA.Minimum = -128;
this.tbLineInRCA.Name = "tbLineInRCA";
this.tbLineInRCA.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbLineInRCA.Size = new System.Drawing.Size(45, 104);
this.tbLineInRCA.TabIndex = 3;
this.tbLineInRCA.TickFrequency = 16;
this.tbLineInRCA.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbLineInRCA, resources.GetString("tbLineInRCA.ToolTip"));
this.tbLineInRCA.Scroll += new System.EventHandler(this.tbLineInRCA_Scroll);
//
// lblMic
//
this.lblMic.Image = null;
this.lblMic.Location = new System.Drawing.Point(16, 24);
this.lblMic.Name = "lblMic";
this.lblMic.Size = new System.Drawing.Size(45, 24);
this.lblMic.TabIndex = 2;
this.lblMic.Text = "Mic";
this.lblMic.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblMic, "8 Pin front panel connector");
//
// grpOutput
//
this.grpOutput.Controls.Add(this.lblLineOutRCA);
@ -544,6 +366,200 @@ namespace PowerSDR
this.tbIntSpkr.Value = 230;
this.tbIntSpkr.Scroll += new System.EventHandler(this.tbIntSpkr_Scroll);
//
// grpInput
//
this.grpInput.Controls.Add(this.chkInputMuteAll);
this.grpInput.Controls.Add(this.lblLineInDB9);
this.grpInput.Controls.Add(this.chkLineInDB9Sel);
this.grpInput.Controls.Add(this.tbLineInDB9);
this.grpInput.Controls.Add(this.lblLineInPhono);
this.grpInput.Controls.Add(this.chkLineInPhonoSel);
this.grpInput.Controls.Add(this.tbLineInPhono);
this.grpInput.Controls.Add(this.lblLineInRCA);
this.grpInput.Controls.Add(this.chkLineInRCASel);
this.grpInput.Controls.Add(this.tbLineInRCA);
this.grpInput.Controls.Add(this.lblMic);
this.grpInput.Controls.Add(this.chkMicSel);
this.grpInput.Controls.Add(this.tbMic);
this.grpInput.Location = new System.Drawing.Point(8, 8);
this.grpInput.Name = "grpInput";
this.grpInput.Size = new System.Drawing.Size(216, 216);
this.grpInput.TabIndex = 2;
this.grpInput.TabStop = false;
this.grpInput.Text = "Input (Stage 1)";
this.toolTip1.SetToolTip(this.grpInput, resources.GetString("grpInput.ToolTip"));
//
// chkInputMuteAll
//
this.chkInputMuteAll.Appearance = System.Windows.Forms.Appearance.Button;
this.chkInputMuteAll.Image = null;
this.chkInputMuteAll.Location = new System.Drawing.Point(16, 176);
this.chkInputMuteAll.Name = "chkInputMuteAll";
this.chkInputMuteAll.Size = new System.Drawing.Size(184, 24);
this.chkInputMuteAll.TabIndex = 12;
this.chkInputMuteAll.Text = "Mute All Inputs";
this.chkInputMuteAll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.toolTip1.SetToolTip(this.chkInputMuteAll, "Mute All Input Lines");
this.chkInputMuteAll.CheckedChanged += new System.EventHandler(this.chkInputMuteAll_CheckedChanged);
//
// lblLineInDB9
//
this.lblLineInDB9.Image = null;
this.lblLineInDB9.Location = new System.Drawing.Point(157, 24);
this.lblLineInDB9.Name = "lblLineInDB9";
this.lblLineInDB9.Size = new System.Drawing.Size(49, 24);
this.lblLineInDB9.TabIndex = 11;
this.lblLineInDB9.Text = "FlexWire In";
this.lblLineInDB9.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblLineInDB9, resources.GetString("lblLineInDB9.ToolTip"));
//
// chkLineInDB9Sel
//
this.chkLineInDB9Sel.Image = null;
this.chkLineInDB9Sel.Location = new System.Drawing.Point(174, 144);
this.chkLineInDB9Sel.Name = "chkLineInDB9Sel";
this.chkLineInDB9Sel.Size = new System.Drawing.Size(16, 24);
this.chkLineInDB9Sel.TabIndex = 10;
this.toolTip1.SetToolTip(this.chkLineInDB9Sel, "Selects/Unselects the Line In DB9 Input");
this.chkLineInDB9Sel.CheckedChanged += new System.EventHandler(this.chkLineInDB9Sel_CheckedChanged);
//
// tbLineInDB9
//
this.tbLineInDB9.LargeChange = 1;
this.tbLineInDB9.Location = new System.Drawing.Point(160, 48);
this.tbLineInDB9.Maximum = 0;
this.tbLineInDB9.Minimum = -128;
this.tbLineInDB9.Name = "tbLineInDB9";
this.tbLineInDB9.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbLineInDB9.Size = new System.Drawing.Size(45, 104);
this.tbLineInDB9.TabIndex = 9;
this.tbLineInDB9.TickFrequency = 16;
this.tbLineInDB9.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbLineInDB9, resources.GetString("tbLineInDB9.ToolTip"));
this.tbLineInDB9.Scroll += new System.EventHandler(this.tbLineInDB9_Scroll);
this.tbLineInDB9.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tbLineInDB9_MouseDown);
this.tbLineInDB9.MouseEnter += new System.EventHandler(this.tbLineInDB9_MouseEnter);
this.tbLineInDB9.MouseHover += new System.EventHandler(this.tbLineInDB9_MouseHover);
//
// lblLineInPhono
//
this.lblLineInPhono.Image = null;
this.lblLineInPhono.Location = new System.Drawing.Point(112, 24);
this.lblLineInPhono.Name = "lblLineInPhono";
this.lblLineInPhono.Size = new System.Drawing.Size(45, 24);
this.lblLineInPhono.TabIndex = 8;
this.lblLineInPhono.Text = "Bal Line In";
this.lblLineInPhono.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblLineInPhono, resources.GetString("lblLineInPhono.ToolTip"));
//
// chkLineInPhonoSel
//
this.chkLineInPhonoSel.Image = null;
this.chkLineInPhonoSel.Location = new System.Drawing.Point(126, 144);
this.chkLineInPhonoSel.Name = "chkLineInPhonoSel";
this.chkLineInPhonoSel.Size = new System.Drawing.Size(16, 24);
this.chkLineInPhonoSel.TabIndex = 7;
this.toolTip1.SetToolTip(this.chkLineInPhonoSel, "Selects/Unselects the Line In Phono Input");
this.chkLineInPhonoSel.CheckedChanged += new System.EventHandler(this.chkLineInPhonoSel_CheckedChanged);
//
// tbLineInPhono
//
this.tbLineInPhono.LargeChange = 1;
this.tbLineInPhono.Location = new System.Drawing.Point(112, 48);
this.tbLineInPhono.Maximum = 0;
this.tbLineInPhono.Minimum = -128;
this.tbLineInPhono.Name = "tbLineInPhono";
this.tbLineInPhono.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbLineInPhono.Size = new System.Drawing.Size(45, 104);
this.tbLineInPhono.TabIndex = 6;
this.tbLineInPhono.TickFrequency = 16;
this.tbLineInPhono.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbLineInPhono, resources.GetString("tbLineInPhono.ToolTip"));
this.tbLineInPhono.Scroll += new System.EventHandler(this.tbLineInPhono_Scroll);
this.tbLineInPhono.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tbLineInPhono_MouseHover);
this.tbLineInPhono.MouseEnter += new System.EventHandler(this.tbLineInPhono_MouseHover);
this.tbLineInPhono.MouseHover += new System.EventHandler(this.tbLineInPhono_MouseHover);
//
// lblLineInRCA
//
this.lblLineInRCA.Image = null;
this.lblLineInRCA.Location = new System.Drawing.Point(64, 24);
this.lblLineInRCA.Name = "lblLineInRCA";
this.lblLineInRCA.Size = new System.Drawing.Size(45, 24);
this.lblLineInRCA.TabIndex = 5;
this.lblLineInRCA.Text = "Line In RCA";
this.lblLineInRCA.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblLineInRCA, resources.GetString("lblLineInRCA.ToolTip"));
//
// chkLineInRCASel
//
this.chkLineInRCASel.Image = null;
this.chkLineInRCASel.Location = new System.Drawing.Point(78, 144);
this.chkLineInRCASel.Name = "chkLineInRCASel";
this.chkLineInRCASel.Size = new System.Drawing.Size(16, 24);
this.chkLineInRCASel.TabIndex = 4;
this.toolTip1.SetToolTip(this.chkLineInRCASel, "Selects/Unselects the Line In RCA Input");
this.chkLineInRCASel.CheckedChanged += new System.EventHandler(this.chkLineInRCASel_CheckedChanged);
//
// tbLineInRCA
//
this.tbLineInRCA.LargeChange = 1;
this.tbLineInRCA.Location = new System.Drawing.Point(64, 48);
this.tbLineInRCA.Maximum = 0;
this.tbLineInRCA.Minimum = -128;
this.tbLineInRCA.Name = "tbLineInRCA";
this.tbLineInRCA.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbLineInRCA.Size = new System.Drawing.Size(45, 104);
this.tbLineInRCA.TabIndex = 3;
this.tbLineInRCA.TickFrequency = 16;
this.tbLineInRCA.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbLineInRCA, resources.GetString("tbLineInRCA.ToolTip"));
this.tbLineInRCA.Scroll += new System.EventHandler(this.tbLineInRCA_Scroll);
this.tbLineInRCA.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tbLineInRCA_MouseDown);
this.tbLineInRCA.MouseEnter += new System.EventHandler(this.tbLineInRCA_MouseEnter);
this.tbLineInRCA.MouseHover += new System.EventHandler(this.tbLineInRCA_MouseHover);
//
// lblMic
//
this.lblMic.Image = null;
this.lblMic.Location = new System.Drawing.Point(16, 24);
this.lblMic.Name = "lblMic";
this.lblMic.Size = new System.Drawing.Size(45, 24);
this.lblMic.TabIndex = 2;
this.lblMic.Text = "Mic";
this.lblMic.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.toolTip1.SetToolTip(this.lblMic, resources.GetString("lblMic.ToolTip"));
//
// chkMicSel
//
this.chkMicSel.Checked = true;
this.chkMicSel.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkMicSel.Image = null;
this.chkMicSel.Location = new System.Drawing.Point(30, 144);
this.chkMicSel.Name = "chkMicSel";
this.chkMicSel.Size = new System.Drawing.Size(16, 24);
this.chkMicSel.TabIndex = 1;
this.toolTip1.SetToolTip(this.chkMicSel, "Selects/Unselects the Mic Input");
this.chkMicSel.CheckedChanged += new System.EventHandler(this.chkMicSel_CheckedChanged);
//
// tbMic
//
this.tbMic.LargeChange = 1;
this.tbMic.Location = new System.Drawing.Point(16, 48);
this.tbMic.Maximum = 0;
this.tbMic.Minimum = -128;
this.tbMic.Name = "tbMic";
this.tbMic.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbMic.Size = new System.Drawing.Size(45, 104);
this.tbMic.TabIndex = 0;
this.tbMic.TickFrequency = 16;
this.tbMic.TickStyle = System.Windows.Forms.TickStyle.Both;
this.toolTip1.SetToolTip(this.tbMic, resources.GetString("tbMic.ToolTip"));
this.tbMic.Scroll += new System.EventHandler(this.tbMic_Scroll);
this.tbMic.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tbMic_MouseDown);
this.tbMic.MouseEnter += new System.EventHandler(this.tbMic_MouseEnter);
this.tbMic.MouseHover += new System.EventHandler(this.tbMic_MouseHover);
//
// FWCMixForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
@ -554,18 +570,18 @@ namespace PowerSDR
this.Name = "FWCMixForm";
this.Text = "FLEX-5000 Audio Mixer";
this.Closing += new System.ComponentModel.CancelEventHandler(this.FWCMixForm_Closing);
((System.ComponentModel.ISupportInitialize)(this.tbMic)).EndInit();
this.grpInput.ResumeLayout(false);
this.grpInput.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tbLineInDB9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInPhono)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInRCA)).EndInit();
this.grpOutput.ResumeLayout(false);
this.grpOutput.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tbLineOutRCA)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbHeadphone)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbExtSpkr)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbIntSpkr)).EndInit();
this.grpInput.ResumeLayout(false);
this.grpInput.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tbLineInDB9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInPhono)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbLineInRCA)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbMic)).EndInit();
this.ResumeLayout(false);
}
@ -850,6 +866,8 @@ namespace PowerSDR
{
if(chkMicSel.Checked && !chkInputMuteAll.Checked)
FWC.WriteCodecReg(0x16, InputSliderToRegVal(tbMic.Value));
this.toolTip1.SetToolTip(this.tbMic, "Mic Volume: " + tbMic.Value);
}
@ -858,18 +876,24 @@ namespace PowerSDR
{
if(chkLineInRCASel.Checked && !chkInputMuteAll.Checked)
FWC.WriteCodecReg(0x14, InputSliderToRegVal(tbLineInRCA.Value));
this.toolTip1.SetToolTip(this.tbLineInRCA, "Line Volume: " + tbLineInRCA.Value);
}
private void tbLineInPhono_Scroll(object sender, System.EventArgs e)
{
if(chkLineInPhonoSel.Checked && !chkInputMuteAll.Checked)
FWC.WriteCodecReg(0x15, InputSliderToRegVal(tbLineInPhono.Value));
this.toolTip1.SetToolTip(this.tbLineInPhono, "Bal Line In Volume: " + tbLineInPhono.Value);
}
private void tbLineInDB9_Scroll(object sender, System.EventArgs e)
{
if(chkLineInDB9Sel.Checked && !chkInputMuteAll.Checked)
FWC.WriteCodecReg(0x13, InputSliderToRegVal(tbLineInDB9.Value));
this.toolTip1.SetToolTip(this.tbLineInDB9, "FlexWire Volume: " + tbLineInDB9.Value);
}
private void chkMicSel_CheckedChanged(object sender, System.EventArgs e)
@ -1060,5 +1084,61 @@ namespace PowerSDR
}
#endregion
private void tbLineInPhono_MouseHover(object sender, EventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInPhono, "Bal Line In Volume: " + tbLineInPhono.Value);
}
private void tbLineInPhono_MouseHover(object sender, MouseEventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInPhono, "Bal Line In Volume: " + tbLineInPhono.Value);
}
private void tbMic_MouseDown(object sender, MouseEventArgs e)
{
this.toolTip1.SetToolTip(this.tbMic, "Mic Volume: " + tbMic.Value);
}
private void tbMic_MouseEnter(object sender, EventArgs e)
{
this.toolTip1.SetToolTip(this.tbMic, "Mic Volume: " + tbMic.Value);
}
private void tbMic_MouseHover(object sender, EventArgs e)
{
this.toolTip1.SetToolTip(this.tbMic, "Mic Volume: " + tbMic.Value);
}
private void tbLineInRCA_MouseHover(object sender, EventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInRCA, "Line Volume: " + tbLineInRCA.Value);
}
private void tbLineInRCA_MouseDown(object sender, MouseEventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInRCA, "Line Volume: " + tbLineInRCA.Value);
}
private void tbLineInRCA_MouseEnter(object sender, EventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInRCA, "Line Volume: " + tbLineInRCA.Value);
}
private void tbLineInDB9_MouseDown(object sender, MouseEventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInDB9, "FlexWire Volume: " + tbLineInDB9.Value);
}
private void tbLineInDB9_MouseEnter(object sender, EventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInDB9, "FlexWire Volume: " + tbLineInDB9.Value);
}
private void tbLineInDB9_MouseHover(object sender, EventArgs e)
{
this.toolTip1.SetToolTip(this.tbLineInDB9, "FlexWire Volume: " + tbLineInDB9.Value);
}
}
}

View File

@ -120,8 +120,9 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="tbMic.ToolTip" xml:space="preserve">
<value>Stage 1 Adjusts the Mic Input Volume:
<data name="lblLineInDB9.ToolTip" xml:space="preserve">
<value>FlexWire Audio Input (DB9 on back panel)
Stage 1 Adjusts the Mic Input Volume:
Audio INPUT Stages:
A/D = Stage0 Front End to Digital
@ -145,6 +146,29 @@ D/A = Stage12 back to Analog (to the PA)
<data name="tbLineInDB9.ToolTip" xml:space="preserve">
<value>Stage 1 Adjusts the Line In DB9 Input Volume:
Audio INPUT Stages:
A/D = Stage0 Front End to Digital
Mixer = Stage1 Mixer (after the A/D converter)
MIC = Stage2 input dBm after MIXER and MIC sliders
DEXP = Stage3 Downward Expander / Gate
EQ = Stage4 input dBm after EQ sliders
Lev = Stage5 input dBm afer leveler gain
LevG = Stage5 Leveler Gain display only
CPDR = Stage6 Compander
DX = Stage6 DX Compressor
Mod = Stage7 Modulation Mode
FLTR = Stage 8 TX Filter
ALC = Stage9 input dBm after DX, Cmpd, Mode, TX Filter
ALCG = Stage9 ALC attack dBm, foldback amount
I/Q = Stage10 I/Q correction
Scale = Stage11 Audio Scaling
D/A = Stage12 back to Analog (to the PA)
</value>
</data>
<data name="lblLineInPhono.ToolTip" xml:space="preserve">
<value>Balanced Line Input (Phono Plug on back panel)
Stage 1: Adjusts the Balanced Line In Volume: -128 bot to 0 top
Audio INPUT Stages:
A/D = Stage0 Front End to Digital
Mixer = Stage1 Mixer (after the A/D converter)
@ -165,7 +189,30 @@ D/A = Stage12 back to Analog (to the PA)
</value>
</data>
<data name="tbLineInPhono.ToolTip" xml:space="preserve">
<value>Stage 1: Adjusts the Balanced Line In Volume:
<value>Stage 1: Adjusts the Balanced Line In Volume: -128 bot to 0 top
Audio INPUT Stages:
A/D = Stage0 Front End to Digital
Mixer = Stage1 Mixer (after the A/D converter)
MIC = Stage2 input dBm after MIXER and MIC sliders
DEXP = Stage3 Downward Expander / Gate
EQ = Stage4 input dBm after EQ sliders
Lev = Stage5 input dBm afer leveler gain
LevG = Stage5 Leveler Gain display only
CPDR = Stage6 Compander
DX = Stage6 DX Compressor
Mod = Stage7 Modulation Mode
FLTR = Stage 8 TX Filter
ALC = Stage9 input dBm after DX, Cmpd, Mode, TX Filter
ALCG = Stage9 ALC attack dBm, foldback amount
I/Q = Stage10 I/Q correction
Scale = Stage11 Audio Scaling
D/A = Stage12 back to Analog (to the PA)
</value>
</data>
<data name="lblLineInRCA.ToolTip" xml:space="preserve">
<value>Line Input (White RCA on back panel)
Stage 1 Adjusts the Mic Input Volume:
Audio INPUT Stages:
A/D = Stage0 Front End to Digital
@ -187,7 +234,52 @@ D/A = Stage12 back to Analog (to the PA)
</value>
</data>
<data name="tbLineInRCA.ToolTip" xml:space="preserve">
<value>Stage 1: Adjusts the Line In RCA Input Volume:
<value>Stage 1: Adjusts the Line In RCA Input Volume: -128 bot to 0 top
Audio INPUT Stages:
A/D = Stage0 Front End to Digital
Mixer = Stage1 Mixer (after the A/D converter)
MIC = Stage2 input dBm after MIXER and MIC sliders
DEXP = Stage3 Downward Expander / Gate
EQ = Stage4 input dBm after EQ sliders
Lev = Stage5 input dBm afer leveler gain
LevG = Stage5 Leveler Gain display only
CPDR = Stage6 Compander
DX = Stage6 DX Compressor
Mod = Stage7 Modulation Mode
FLTR = Stage 8 TX Filter
ALC = Stage9 input dBm after DX, Cmpd, Mode, TX Filter
ALCG = Stage9 ALC attack dBm, foldback amount
I/Q = Stage10 I/Q correction
Scale = Stage11 Audio Scaling
D/A = Stage12 back to Analog (to the PA)
</value>
</data>
<data name="lblMic.ToolTip" xml:space="preserve">
<value>8 Pin front panel connector
Stage 1 Adjusts the Mic Input Volume:
Audio INPUT Stages:
A/D = Stage0 Front End to Digital
Mixer = Stage1 Mixer (after the A/D converter)
MIC = Stage2 input dBm after MIXER and MIC sliders
DEXP = Stage3 Downward Expander / Gate
EQ = Stage4 input dBm after EQ sliders
Lev = Stage5 input dBm afer leveler gain
LevG = Stage5 Leveler Gain display only
CPDR = Stage6 Compander
DX = Stage6 DX Compressor
Mod = Stage7 Modulation Mode
FLTR = Stage 8 TX Filter
ALC = Stage9 input dBm after DX, Cmpd, Mode, TX Filter
ALCG = Stage9 ALC attack dBm, foldback amount
I/Q = Stage10 I/Q correction
Scale = Stage11 Audio Scaling
D/A = Stage12 back to Analog (to the PA)
</value>
</data>
<data name="tbMic.ToolTip" xml:space="preserve">
<value>Stage 1 Adjusts the Mic Input Volume:
Audio INPUT Stages:
A/D = Stage0 Front End to Digital

View File

@ -76,9 +76,12 @@ namespace GDF
{
this._graphics = Graphics.FromImage(this.PageImage);
this._graphics.Clear(this.DefaultBackColor);
this._graphics.CompositingQuality = CompositingQuality.HighQuality;
this._graphics.SmoothingMode = SmoothingMode.AntiAlias;
this._graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
}
return this._graphics;

View File

@ -112,9 +112,12 @@ namespace PowerSDR
string latitude = console.SpotForm.udDisplayLat.Value.ToString("##0.00").PadLeft(5); // -90.00
string longitude = console.SpotForm.udDisplayLong.Value.ToString("###0.00").PadLeft(6); // -180.00
var url = new Uri("http://forecast.weather.gov/MapClick.php?lat=" + latitude + "&lon=" + longitude + "&FcstType=dwml");
var url = new Uri("https://forecast.weather.gov/MapClick.php?lat=" + latitude + "&lon=" + longitude + "&FcstType=dwml");
// var url = new Uri("https://f1.weather.gov/MapClick.php?lat=" + latitude + "&lon=" + longitude + "&FcstType=dwml");
// var url = new Uri("https://www.nws.noaa.gov/wtf/MapClick.php?lat=" + latitude + "&lon=" + longitude + "&FcstType=dwml");
HttpClient client = new HttpClient();
try
@ -268,7 +271,7 @@ namespace PowerSDR
try
{
client.Timeout = new TimeSpan(0, 5, 0); // normal timeout is set to 100 seconds
client.Timeout = new TimeSpan(0, 10, 0); // normal timeout is set to 100 seconds
client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Stackoverflow/1.0");
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

View File

@ -43,17 +43,17 @@ namespace System.Windows.Forms
get { return base.AcceptsReturn; }
set
{
if (base.InvokeRequired)
{
this.Invoke(new UI.SetCtrlDel(UI.SetTextBoxAcceptsReturn), new object[] { this, value });
// this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); // ke9ns add
}
else base.AcceptsReturn = value;
if (base.InvokeRequired)
{
this.Invoke(new UI.SetCtrlDel(UI.SetTextBoxAcceptsReturn), new object[] { this, value });
// this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); // ke9ns add
}
else base.AcceptsReturn = value;
}
}
public new bool AcceptsTab
{
@ -659,6 +659,8 @@ namespace System.Windows.Forms
#region Functions
public new void AppendText(string text)
{
if(base.InvokeRequired)

View File

@ -58,12 +58,12 @@ namespace PowerSDR
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LegacyForm));
this.txtSDR1000SN = new System.Windows.Forms.TextBoxTS();
this.txtSoftRockSN = new System.Windows.Forms.TextBoxTS();
this.lblSerialNumber = new System.Windows.Forms.LabelTS();
this.lblInstructions = new System.Windows.Forms.LabelTS();
this.btnOK = new System.Windows.Forms.ButtonTS();
this.chkSoftRock = new System.Windows.Forms.CheckBoxTS();
this.chkSDR1000 = new System.Windows.Forms.CheckBoxTS();
this.txtSoftRockSN = new System.Windows.Forms.TextBoxTS();
this.chkSoftRock = new System.Windows.Forms.CheckBoxTS();
this.SuspendLayout();
//
// txtSDR1000SN
@ -73,14 +73,6 @@ namespace PowerSDR
this.txtSDR1000SN.Size = new System.Drawing.Size(83, 20);
this.txtSDR1000SN.TabIndex = 4;
//
// txtSoftRockSN
//
this.txtSoftRockSN.Location = new System.Drawing.Point(119, 88);
this.txtSoftRockSN.Name = "txtSoftRockSN";
this.txtSoftRockSN.Size = new System.Drawing.Size(83, 20);
this.txtSoftRockSN.TabIndex = 6;
this.txtSoftRockSN.Visible = false;
//
// lblSerialNumber
//
this.lblSerialNumber.AutoSize = true;
@ -95,11 +87,11 @@ namespace PowerSDR
//
this.lblInstructions.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblInstructions.Image = null;
this.lblInstructions.Location = new System.Drawing.Point(49, 9);
this.lblInstructions.Location = new System.Drawing.Point(10, 9);
this.lblInstructions.Name = "lblInstructions";
this.lblInstructions.Size = new System.Drawing.Size(182, 31);
this.lblInstructions.Size = new System.Drawing.Size(221, 31);
this.lblInstructions.TabIndex = 3;
this.lblInstructions.Text = "Please add your SDR-1000 Radio";
this.lblInstructions.Text = "Please indicate below any legacy radios you use with PowerSDR.";
//
// btnOK
//
@ -112,6 +104,25 @@ namespace PowerSDR
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// chkSDR1000
//
this.chkSDR1000.AutoSize = true;
this.chkSDR1000.Image = null;
this.chkSDR1000.Location = new System.Drawing.Point(12, 67);
this.chkSDR1000.Name = "chkSDR1000";
this.chkSDR1000.Size = new System.Drawing.Size(76, 17);
this.chkSDR1000.TabIndex = 0;
this.chkSDR1000.Text = "SDR-1000";
this.chkSDR1000.UseVisualStyleBackColor = true;
//
// txtSoftRockSN
//
this.txtSoftRockSN.Location = new System.Drawing.Point(119, 88);
this.txtSoftRockSN.Name = "txtSoftRockSN";
this.txtSoftRockSN.Size = new System.Drawing.Size(83, 20);
this.txtSoftRockSN.TabIndex = 6;
this.txtSoftRockSN.Visible = false;
//
// chkSoftRock
//
this.chkSoftRock.AutoSize = true;
@ -124,17 +135,6 @@ namespace PowerSDR
this.chkSoftRock.UseVisualStyleBackColor = true;
this.chkSoftRock.Visible = false;
//
// chkSDR1000
//
this.chkSDR1000.AutoSize = true;
this.chkSDR1000.Image = null;
this.chkSDR1000.Location = new System.Drawing.Point(12, 67);
this.chkSDR1000.Name = "chkSDR1000";
this.chkSDR1000.Size = new System.Drawing.Size(76, 17);
this.chkSDR1000.TabIndex = 0;
this.chkSDR1000.Text = "SDR-1000";
this.chkSDR1000.UseVisualStyleBackColor = true;
//
// LegacyForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -159,11 +159,11 @@ namespace PowerSDR
#endregion
private System.Windows.Forms.CheckBoxTS chkSDR1000;
private System.Windows.Forms.CheckBoxTS chkSoftRock;
private System.Windows.Forms.ButtonTS btnOK;
private System.Windows.Forms.LabelTS lblInstructions;
private System.Windows.Forms.TextBoxTS txtSDR1000SN;
private System.Windows.Forms.LabelTS lblSerialNumber;
private System.Windows.Forms.TextBoxTS txtSoftRockSN;
private System.Windows.Forms.CheckBoxTS chkSoftRock;
}
}

View File

@ -70,17 +70,6 @@ namespace PowerSDR
this.MemFreq = new System.Windows.Forms.TextBox();
this.MemGroup = new System.Windows.Forms.TextBox();
this.MemName = new System.Windows.Forms.TextBox();
this.buttonTS1 = new System.Windows.Forms.ButtonTS();
this.ScheduleRepeatm = new System.Windows.Forms.CheckBoxTS();
this.ScheduleOn = new System.Windows.Forms.CheckBoxTS();
this.ScheduleDurationTime = new System.Windows.Forms.NumericUpDownTS();
this.ScheduleRecord = new System.Windows.Forms.CheckBoxTS();
this.ScheduleRepeat = new System.Windows.Forms.CheckBoxTS();
this.chkMemoryFormClose = new System.Windows.Forms.CheckBoxTS();
this.btnSelect = new System.Windows.Forms.ButtonTS();
this.btnMemoryRecordDelete = new System.Windows.Forms.ButtonTS();
this.btnMemoryRecordCopy = new System.Windows.Forms.ButtonTS();
this.MemoryRecordAdd = new System.Windows.Forms.ButtonTS();
this.ScheduleStartTimeUTC = new System.Windows.Forms.DateTimePicker();
this.textBox9 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
@ -90,11 +79,22 @@ namespace PowerSDR
this.textBox7 = new System.Windows.Forms.TextBox();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.buttonTS1 = new System.Windows.Forms.ButtonTS();
this.ScheduleExtra = new System.Windows.Forms.NumericUpDownTS();
this.ScheduleRepeatm = new System.Windows.Forms.CheckBoxTS();
this.ScheduleOn = new System.Windows.Forms.CheckBoxTS();
this.chkAlwaysOnTop = new System.Windows.Forms.CheckBoxTS();
this.ScheduleDurationTime = new System.Windows.Forms.NumericUpDownTS();
this.ScheduleRecord = new System.Windows.Forms.CheckBoxTS();
this.ScheduleRepeat = new System.Windows.Forms.CheckBoxTS();
this.chkMemoryFormClose = new System.Windows.Forms.CheckBoxTS();
this.btnSelect = new System.Windows.Forms.ButtonTS();
this.btnMemoryRecordDelete = new System.Windows.Forms.ButtonTS();
this.btnMemoryRecordCopy = new System.Windows.Forms.ButtonTS();
this.MemoryRecordAdd = new System.Windows.Forms.ButtonTS();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ScheduleDurationTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ScheduleExtra)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ScheduleDurationTime)).BeginInit();
this.SuspendLayout();
//
// dataGridView1
@ -221,6 +221,85 @@ namespace PowerSDR
this.MemName.TabIndex = 69;
this.toolTip1.SetToolTip(this.MemName, "Name of currently selected Memory");
//
// ScheduleStartTimeUTC
//
this.ScheduleStartTimeUTC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ScheduleStartTimeUTC.Format = System.Windows.Forms.DateTimePickerFormat.Time;
this.ScheduleStartTimeUTC.Location = new System.Drawing.Point(237, 451);
this.ScheduleStartTimeUTC.Name = "ScheduleStartTimeUTC";
this.ScheduleStartTimeUTC.ShowUpDown = true;
this.ScheduleStartTimeUTC.Size = new System.Drawing.Size(90, 20);
this.ScheduleStartTimeUTC.TabIndex = 73;
this.toolTip1.SetToolTip(this.ScheduleStartTimeUTC, "Initial Time of Schedule for this Selected Memory.\r\nIgnores the seconds.");
this.ScheduleStartTimeUTC.ValueChanged += new System.EventHandler(this.ScheduleStartTimeUTC_ValueChanged);
//
// textBox9
//
this.textBox9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox9.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox9.Location = new System.Drawing.Point(237, 437);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(90, 13);
this.textBox9.TabIndex = 74;
this.textBox9.Text = "Start Time (UTC)";
this.toolTip1.SetToolTip(this.textBox9, "Schedule Start Time to change Frequency and optionally record");
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox1.Location = new System.Drawing.Point(516, 480);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(435, 68);
this.textBox1.TabIndex = 13;
this.textBox1.Text = resources.GetString("textBox1.Text");
//
// textBox3
//
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox3.Location = new System.Drawing.Point(516, 440);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(435, 13);
this.textBox3.TabIndex = 15;
this.textBox3.Text = "Comments:";
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox2.Location = new System.Drawing.Point(516, 395);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(133, 13);
this.textBox2.TabIndex = 64;
this.textBox2.Text = "Frequency: (mhz)";
//
// textBox5
//
this.textBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox5.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox5.Location = new System.Drawing.Point(655, 395);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(163, 13);
this.textBox5.TabIndex = 65;
this.textBox5.Text = "Group:";
//
// textBox7
//
this.textBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox7.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox7.Location = new System.Drawing.Point(824, 395);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(127, 13);
this.textBox7.TabIndex = 66;
this.textBox7.Text = "Name:";
//
// openFileDialog1
//
this.openFileDialog1.Filter = "WAV files (*.wav)|*.wav|All files (*.*)|*.*";
this.openFileDialog1.Multiselect = true;
//
// buttonTS1
//
this.buttonTS1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -234,6 +313,35 @@ namespace PowerSDR
this.buttonTS1.UseVisualStyleBackColor = true;
this.buttonTS1.Click += new System.EventHandler(this.buttonTS1_Click);
//
// ScheduleExtra
//
this.ScheduleExtra.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ScheduleExtra.Increment = new decimal(new int[] {
5,
0,
0,
0});
this.ScheduleExtra.Location = new System.Drawing.Point(447, 492);
this.ScheduleExtra.Maximum = new decimal(new int[] {
120,
0,
0,
0});
this.ScheduleExtra.Minimum = new decimal(new int[] {
0,
0,
0,
0});
this.ScheduleExtra.Name = "ScheduleExtra";
this.ScheduleExtra.Size = new System.Drawing.Size(56, 20);
this.ScheduleExtra.TabIndex = 71;
this.ScheduleExtra.Value = new decimal(new int[] {
30,
0,
0,
0});
this.ScheduleExtra.Visible = false;
//
// ScheduleRepeatm
//
this.ScheduleRepeatm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -255,12 +363,23 @@ namespace PowerSDR
this.ScheduleOn.Name = "ScheduleOn";
this.ScheduleOn.Size = new System.Drawing.Size(101, 23);
this.ScheduleOn.TabIndex = 62;
this.ScheduleOn.Text = "Schedule On";
this.toolTip1.SetToolTip(this.ScheduleOn, "Check box to turn of Scheduler for this Selected Memory.");
this.ScheduleOn.Text = "scanner skip memory";
this.toolTip1.SetToolTip(this.ScheduleOn, "Check box to ignore (Skip) this memory from any Scanner operations");
this.ScheduleOn.UseCompatibleTextRendering = true;
this.ScheduleOn.Visible = false;
this.ScheduleOn.CheckedChanged += new System.EventHandler(this.ScheduleOn_CheckedChanged);
//
// chkAlwaysOnTop
//
this.chkAlwaysOnTop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.chkAlwaysOnTop.Image = null;
this.chkAlwaysOnTop.Location = new System.Drawing.Point(347, 516);
this.chkAlwaysOnTop.Name = "chkAlwaysOnTop";
this.chkAlwaysOnTop.Size = new System.Drawing.Size(79, 36);
this.chkAlwaysOnTop.TabIndex = 59;
this.chkAlwaysOnTop.Text = "Always On Top";
this.chkAlwaysOnTop.CheckedChanged += new System.EventHandler(this.chkAlwaysOnTop_CheckedChanged);
//
// ScheduleDurationTime
//
this.ScheduleDurationTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -382,125 +501,6 @@ namespace PowerSDR
this.MemoryRecordAdd.DragDrop += new System.Windows.Forms.DragEventHandler(this.MemoryRecordAdd_DragDrop);
this.MemoryRecordAdd.DragEnter += new System.Windows.Forms.DragEventHandler(this.MemoryRecordAdd_DragEnter);
//
// ScheduleStartTimeUTC
//
this.ScheduleStartTimeUTC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ScheduleStartTimeUTC.Format = System.Windows.Forms.DateTimePickerFormat.Time;
this.ScheduleStartTimeUTC.Location = new System.Drawing.Point(237, 451);
this.ScheduleStartTimeUTC.Name = "ScheduleStartTimeUTC";
this.ScheduleStartTimeUTC.ShowUpDown = true;
this.ScheduleStartTimeUTC.Size = new System.Drawing.Size(90, 20);
this.ScheduleStartTimeUTC.TabIndex = 73;
this.toolTip1.SetToolTip(this.ScheduleStartTimeUTC, "Initial Time of Schedule for this Selected Memory.\r\nIgnores the seconds.");
this.ScheduleStartTimeUTC.ValueChanged += new System.EventHandler(this.ScheduleStartTimeUTC_ValueChanged);
//
// textBox9
//
this.textBox9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox9.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox9.Location = new System.Drawing.Point(237, 437);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(90, 13);
this.textBox9.TabIndex = 74;
this.textBox9.Text = "Start Time (UTC)";
this.toolTip1.SetToolTip(this.textBox9, "Schedule Start Time to change Frequency and optionally record");
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox1.Location = new System.Drawing.Point(516, 480);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(435, 68);
this.textBox1.TabIndex = 13;
this.textBox1.Text = resources.GetString("textBox1.Text");
//
// textBox3
//
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox3.Location = new System.Drawing.Point(516, 440);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(435, 13);
this.textBox3.TabIndex = 15;
this.textBox3.Text = "Comments:";
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox2.Location = new System.Drawing.Point(516, 395);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(133, 13);
this.textBox2.TabIndex = 64;
this.textBox2.Text = "Frequency: (mhz)";
//
// textBox5
//
this.textBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox5.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox5.Location = new System.Drawing.Point(655, 395);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(163, 13);
this.textBox5.TabIndex = 65;
this.textBox5.Text = "Group:";
//
// textBox7
//
this.textBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox7.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox7.Location = new System.Drawing.Point(824, 395);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(127, 13);
this.textBox7.TabIndex = 66;
this.textBox7.Text = "Name:";
//
// openFileDialog1
//
this.openFileDialog1.Filter = "WAV files (*.wav)|*.wav|All files (*.*)|*.*";
this.openFileDialog1.Multiselect = true;
//
// ScheduleExtra
//
this.ScheduleExtra.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ScheduleExtra.Increment = new decimal(new int[] {
5,
0,
0,
0});
this.ScheduleExtra.Location = new System.Drawing.Point(447, 492);
this.ScheduleExtra.Maximum = new decimal(new int[] {
120,
0,
0,
0});
this.ScheduleExtra.Minimum = new decimal(new int[] {
0,
0,
0,
0});
this.ScheduleExtra.Name = "ScheduleExtra";
this.ScheduleExtra.Size = new System.Drawing.Size(56, 20);
this.ScheduleExtra.TabIndex = 71;
this.ScheduleExtra.Value = new decimal(new int[] {
30,
0,
0,
0});
this.ScheduleExtra.Visible = false;
//
// chkAlwaysOnTop
//
this.chkAlwaysOnTop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.chkAlwaysOnTop.Image = null;
this.chkAlwaysOnTop.Location = new System.Drawing.Point(347, 516);
this.chkAlwaysOnTop.Name = "chkAlwaysOnTop";
this.chkAlwaysOnTop.Size = new System.Drawing.Size(79, 36);
this.chkAlwaysOnTop.TabIndex = 59;
this.chkAlwaysOnTop.Text = "Always On Top";
this.chkAlwaysOnTop.CheckedChanged += new System.EventHandler(this.chkAlwaysOnTop_CheckedChanged);
//
// MemoryForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -546,8 +546,8 @@ namespace PowerSDR
this.Load += new System.EventHandler(this.MemoryForm_Load);
this.MouseEnter += new System.EventHandler(this.MemoryForm_MouseEnter);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ScheduleDurationTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ScheduleExtra)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ScheduleDurationTime)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -269,7 +269,8 @@ namespace PowerSDR
dataGridView1.Columns["StartDate"].HeaderText = "Schedule Start"; // ke9ns add
dataGridView1.Columns["Repeating"].HeaderText = "Weekly"; // ke9ns add
dataGridView1.Columns["Repeatingm"].HeaderText = "Monthly"; // ke9ns add
// dataGridView1.Columns["ScheduleOn"].HeaderText = "ScheduleON"; // ke9ns add .155
// set the default display for floating point values
@ -279,7 +280,7 @@ namespace PowerSDR
dataGridView1.Columns["TXFreq"].DefaultCellStyle.Format = "f6";
dataGridView1.Columns["RPTROffset"].DefaultCellStyle.Format = "f";
this.dataGridView1.Columns["Scan"].Visible = false;//
this.dataGridView1.Columns["Scan"].Visible = true;// false
dataGridView1.CellValidating += new DataGridViewCellValidatingEventHandler(dataGridView1_CellValidating);
@ -877,27 +878,43 @@ namespace PowerSDR
// ke9ns add Schedule ON/OFF (NOT USED AT THIS TIME)
private void ScheduleOn_CheckedChanged(object sender, EventArgs e)
{
try
{
if (ScheduleOn.Checked == false)
{
if (DurationCount > 1)
{
LASTUTC = UTCNEW;
DurationCount = 1; // to turn things off immediatly if you toggle on/off into off
}
}
LASTUTC = 0;
dataGridView1["ScheduleOn", RIndex].Value = ScheduleOn.Checked; // ke9ns add put schedule ON/OFF in selected in field box
console.MemoryList.Save();
}
catch (Exception)
{
}
/* try
{
if (ScheduleOn.Checked == false)
{
if (DurationCount > 1)
{
LASTUTC = UTCNEW;
DurationCount = 1; // to turn things off immediatly if you toggle on/off into off
}
}
LASTUTC = 0;
dataGridView1["ScheduleOn", RIndex].Value = ScheduleOn.Checked; // ke9ns add put schedule ON/OFF in selected in field box
console.MemoryList.Save();
}
catch (Exception)
{
}
*/
}
//===============================================================================
@ -1007,7 +1024,7 @@ namespace PowerSDR
ScheduleStartDate.ValueChanged += new System.EventHandler(ScheduleStartDate_ValueChanged); // ke9ns turn off checkchanged temporarily // ke9ns turn off valuechanged temporarily
ScheduleOn.Checked = (bool)dataGridView1["ScheduleOn", RIndex].Value; // ke9ns add put schedule ON/OFF in selected in field box
ScheduleOn.Checked = (bool)dataGridView1["ScheduleOn", RIndex].Value; // ke9ns add .155 scanner skip this put schedule ON/OFF in selected in field box
if ((int)dataGridView1["Duration", RIndex].Value > 120) dataGridView1["Duration", RIndex].Value = 120;
else if ((int)dataGridView1["Duration", RIndex].Value < 0) dataGridView1["Duration", RIndex].Value = 0;
@ -1049,7 +1066,7 @@ namespace PowerSDR
public static int DurationCount = 0; // ke9ns duration audio recording counter
private int daycheck = 0; // ke9ns temp day of week repeat
private int ScheduleOnce = 0; // ke9ns 1=already scheduled
private int ScheduleOnce = 0; // ke9ns 1=already scheduled
private int poweroff = 0; // ke9ns 1=power was off at start of recording so turn it back off when done.
//====================================================================================================

View File

@ -128,17 +128,6 @@ or Drag &amp; Drop directly to the Add button to create new Memory
TO USE THE HYPERLINK:
RIGHT CLICK mouse on the Memory (Row)
</value>
</data>
<data name="MemoryRecordAdd.ToolTip" xml:space="preserve">
<value>TO ADD A URL OR FILE HYPERLINK TO A MEMORY:
Select a Memory (Row) with your mouse
Drag &amp; Drop a File, or URL onto the Selected Row
or Drag &amp; Drop directly to the Add button to create new Memory
TO USE THE HYPERLINK:
RIGHT CLICK mouse on the Memory (Row)
</value>
</data>
<data name="textBox1.Text" xml:space="preserve">
@ -156,6 +145,17 @@ Spotter can Display all your Memories (in Blue on the Panadapter)</value>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>297, 17</value>
</metadata>
<data name="MemoryRecordAdd.ToolTip" xml:space="preserve">
<value>TO ADD A URL OR FILE HYPERLINK TO A MEMORY:
Select a Memory (Row) with your mouse
Drag &amp; Drop a File, or URL onto the Selected Row
or Drag &amp; Drop directly to the Add button to create new Memory
TO USE THE HYPERLINK:
RIGHT CLICK mouse on the Memory (Row)
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>47</value>
</metadata>

View File

@ -292,8 +292,7 @@ namespace PowerSDR
//============================================================================
private string comments = "";
public string Comments
@ -306,7 +305,6 @@ namespace PowerSDR
}
}
private bool scan = true;
public bool Scan
{
@ -318,6 +316,8 @@ namespace PowerSDR
}
}
private string tune_step = "10Hz";
public string TuneStep
{
@ -489,7 +489,7 @@ namespace PowerSDR
private bool scheduleon = false; // ke9ns add Turn Scedule ON/OFF
private bool scheduleon = false; // ke9ns add .155 true = scanner skip this memory Turn Scedule ON/OFF
public bool ScheduleOn
{
get { return scheduleon; }

View File

@ -214,25 +214,6 @@
<Reference Include="Sanford.Threading">
<HintPath>..\..\bin\Release\DJ\Sanford.Threading.dll</HintPath>
</Reference>
<Reference Include="Syncfusion.Core.WinForms, Version=17.1451.0.50, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.Core.WinForms.17.1.0.50\lib\net451\Syncfusion.Core.WinForms.dll</HintPath>
</Reference>
<Reference Include="Syncfusion.Gauge.Windows, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL" />
<Reference Include="Syncfusion.Grid.Base, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<Reference Include="Syncfusion.Grid.Windows, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<Reference Include="Syncfusion.HTMLUI.Base, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<Reference Include="Syncfusion.HTMLUI.Windows, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL" />
<Reference Include="Syncfusion.Licensing, Version=17.1451.0.50, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.Licensing.17.1.0.50\lib\net451\Syncfusion.Licensing.dll</HintPath>
</Reference>
<Reference Include="Syncfusion.Scripting.Base, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<Reference Include="Syncfusion.Shared.Base, Version=17.1451.0.50, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.Shared.Base.17.1.0.50\lib\net451\Syncfusion.Shared.Base.dll</HintPath>
</Reference>
<Reference Include="Syncfusion.Shared.Windows, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<Reference Include="Syncfusion.SpellChecker.Base, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<Reference Include="Syncfusion.Tools.Base, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<Reference Include="Syncfusion.Tools.Windows, Version=17.1450.0.38, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL" />
<Reference Include="System">
<Name>System</Name>
</Reference>
@ -262,15 +243,6 @@
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
<COMReference Include="OmniRig">
<Guid>{4FE359C5-A58F-459D-BE95-CA559FB4F270}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
@ -561,7 +533,6 @@
<Compile Include="helpbox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="omnirig.cs" />
<Compile Include="RTF\IRTFCell.cs" />
<Compile Include="RTF\IRtfProcessor.cs" />
<Compile Include="RTF\IRTFRow.cs" />
@ -839,6 +810,9 @@
<EmbeddedResource Include="Resources\SC.png" />
<EmbeddedResource Include="Resources\SCB.png" />
<EmbeddedResource Include="Resources\ant3.png" />
<None Include="Resources\VFOblueB.png" />
<None Include="Resources\VFOred.png" />
<None Include="Resources\newvfo.png" />
<Content Include="Scripts\json-serialize.js" />
<Content Include="Scripts\json-serialize.min.js" />
<EmbeddedResource Include="Resources\picD1.png" />

View File

@ -19,7 +19,7 @@ namespace PowerSDR.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -1,9 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Syncfusion.Shared.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-17.1451.0.50" newVersion="17.1451.0.50" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1702,15 +1702,19 @@ namespace PowerSDR
localmox = mox;
float[] audiotemp = new float[frameCount+1]; // ke9ns add
float[] audiotemp1 = new float[frameCount + 1]; // ke9ns add
float[] audiotemp = new float[frameCount + 1]; // ke9ns add
float[] audiotemp1 = new float[frameCount + 1]; // ke9ns add
fixed (float* in_tl_ptr1 = &audiotemp[0]) // ke9ns add temp ptr to preprocessed data
fixed (float* in_tr_ptr1 = &audiotemp1[0]) // ke9ns add temp ptr to preprocessed data
// fixed (float* in_l1_ptr1 = &AudioInBuf1[0]) // ke9ns add
// fixed (float* in_r1_ptr1 = &AudioInBuf2[0]) // ke9ns add
fixed (float* in_l_ptr1 = &AudioInBuf1[0])
fixed(float* in_r_ptr1 = &AudioInBuf2[0])
fixed(float* out_l_ptr1 = &AudioOutBuf1[0])
fixed (float* out_l_ptr1 = &AudioOutBuf1[0])
fixed(float* out_r_ptr1 = &AudioOutBuf2[0])
{
float* in_l = null, in_r = null, out_l = null, out_r = null;
@ -1766,23 +1770,38 @@ namespace PowerSDR
Win32.LeaveCriticalSection(cs_vac);
}
}
else // VAC is on -- copy data for transmit mode
{
if (rb_vacIN_l.ReadSpace() >= frameCount)
{
Win32.EnterCriticalSection(cs_vac);
rb_vacIN_l.ReadPtr(in_l_ptr1, frameCount);
rb_vacIN_r.ReadPtr(in_r_ptr1, frameCount);
Win32.LeaveCriticalSection(cs_vac);
if (vac_combine_input)
AddBuffer(in_l_ptr1, in_r_ptr1, frameCount);
ScaleBuffer(in_l_ptr1, in_l_ptr1, frameCount, (float)vac_preamp);
ScaleBuffer(in_r_ptr1, in_r_ptr1, frameCount, (float)vac_preamp);
if (console.setupForm.checkBoxMixAudio.Checked == true) // ke9ns add
{
Win32.EnterCriticalSection(cs_vac);
rb_vacIN_l.ReadPtr(in_tl_ptr1, frameCount);
rb_vacIN_r.ReadPtr(in_tr_ptr1, frameCount);
Win32.LeaveCriticalSection(cs_vac);
ScaleBuffer(in_tl_ptr1, in_tl_ptr1, frameCount, (float)vac_preamp);
ScaleBuffer(in_tr_ptr1, in_tr_ptr1, frameCount, (float)vac_preamp);
}
else
{
Win32.EnterCriticalSection(cs_vac);
rb_vacIN_l.ReadPtr(in_l_ptr1, frameCount);
rb_vacIN_r.ReadPtr(in_r_ptr1, frameCount);
Win32.LeaveCriticalSection(cs_vac);
if (vac_combine_input) AddBuffer(in_l_ptr1, in_r_ptr1, frameCount);
}
if (console.setupForm.checkBoxMixAudio.Checked == false) // ke9ns add
{
ScaleBuffer(in_l_ptr1, in_l_ptr1, frameCount, (float)vac_preamp);
ScaleBuffer(in_r_ptr1, in_r_ptr1, frameCount, (float)vac_preamp);
}
}
else
{
@ -1869,7 +1888,22 @@ namespace PowerSDR
tx_dsp_mode == DSPMode.SAM ||
tx_dsp_mode == DSPMode.FM ||
tx_dsp_mode == DSPMode.DIGL ||
tx_dsp_mode == DSPMode.DIGU)) ||
tx_dsp_mode == DSPMode.DIGU))
||
(console.setupForm.checkBoxMixAudio.Checked == true &&
(tx_dsp_mode == DSPMode.DIGL ||
tx_dsp_mode == DSPMode.DIGU ||
tx_dsp_mode == DSPMode.LSB ||
tx_dsp_mode == DSPMode.USB ||
tx_dsp_mode == DSPMode.DSB ||
tx_dsp_mode == DSPMode.AM ||
tx_dsp_mode == DSPMode.SAM ||
tx_dsp_mode == DSPMode.FM)
)
||
(vac_enabled && vac_bypass &&
(tx_dsp_mode == DSPMode.DIGL ||
tx_dsp_mode == DSPMode.DIGU ||
@ -1911,7 +1945,11 @@ namespace PowerSDR
}
if (console.setupForm.checkBoxMixAudio.Checked == true) // ke9ns add .151 MIX HERE
{
AddBuffer(in_l, in_tl_ptr1, frameCount);
AddBuffer(in_r, in_tr_ptr1, frameCount);
}
// if ((console.TXMeter2 == true) && (console.CurrentMeterTX1Mode == MeterTXMode.MIC)) peak1 = MaxSample(in_l, in_r, frameCount); // ke9ns add to allow for MIC level check in RX mode
}
@ -2579,8 +2617,7 @@ namespace PowerSDR
private static HiPerfTimer t1 = new HiPerfTimer();
#endif
//private static int count = 0;
unsafe public static int Callback4Port(void* input, void* output, int frameCount,
PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void *userData)
unsafe public static int Callback4Port(void* input, void* output, int frameCount,PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void *userData)
{
#if(TIMER)
t1.Start();
@ -2700,8 +2737,8 @@ namespace PowerSDR
// handle VAC Input
if(vac_enabled && rb_vacIN_l != null && rb_vacIN_r != null && rb_vacOUT_l != null && rb_vacOUT_r != null)
{
if(vac_bypass || !localmox) // drain VAC Input ring buffer
{
if(vac_bypass || !localmox) // drain VAC Input ring buffer if in RX or RX/TX with VAC bypassed by PTT
{
if ((rb_vacIN_l.ReadSpace() >= frameCount) && (rb_vacIN_r.ReadSpace() >= frameCount))
{
Win32.EnterCriticalSection(cs_vac);
@ -2822,7 +2859,7 @@ namespace PowerSDR
#endregion
// scale input with mic preamp
if ((!vac_enabled &&
if ((!vac_enabled &&
(tx_dsp_mode == DSPMode.LSB ||
tx_dsp_mode == DSPMode.USB ||
tx_dsp_mode == DSPMode.DSB ||
@ -2840,6 +2877,10 @@ namespace PowerSDR
tx_dsp_mode == DSPMode.AM ||
tx_dsp_mode == DSPMode.SAM ||
tx_dsp_mode == DSPMode.FM)))
// if (vac_enabled)
{
if(wave_playback)
{
@ -2855,8 +2896,7 @@ namespace PowerSDR
ScaleBuffer(in_l, in_l, frameCount, (float)vac_preamp);
ScaleBuffer(in_r, in_r, frameCount, (float)vac_preamp);
// Debug.WriteLine("here===================================");
}
else
{
@ -3488,7 +3528,8 @@ namespace PowerSDR
float* in_l = null, in_r = null;
float* out_l1 = null, out_r1 = null, out_l2 = null, out_r2 = null;
float* out_l3 = null, out_r3 = null, out_l4 = null, out_r4 = null;
float* rx1_in_l = null, rx1_in_r = null, tx_in_l = null, tx_in_r = null;
float* rx1_in_l = null, rx1_in_r = null, tx_in_l = null, tx_in_r = null;
float* tx_in1_l = null, tx_in1_r = null; // ke9ns add: for mix audio
float* rx2_in_l = null, rx2_in_r = null;
float* rx1_out_l = null, rx1_out_r = null, tx_out_l = null, tx_out_r = null;
float* rx2_out_l = null, rx2_out_r = null;
@ -3650,6 +3691,10 @@ namespace PowerSDR
tx_in_l = (float*)array_ptr_input[2]; // = in_l_ptr4; points to = in_l
tx_in_r = (float*)array_ptr_input[3]; // = in_r_ptr4; points to = in_r
// ke9ns add: for mixing audio .151
tx_in1_l = (float*)array_ptr_input[4]; // = in_l_ptr4; points to = in_l
tx_in1_r = (float*)array_ptr_input[5]; // = in_r_ptr4; points to = in_r
//------------------------------------------------------------------------------
// RECEIVER2 INPUT Stream (wide as your sample rate)
// if receiving on RX2 (this is the raw audio stream from the RX2 signal)
@ -3779,7 +3824,7 @@ namespace PowerSDR
if (wave_file_writer2 != null) wave_file_writer2.AddWriteBuffer(rx2_in_l, rx2_in_r);
}
}
else // ke9ns record transmitting audio (mic)
else // ke9ns: record transmitting audio (mic)
{
if (record_tx_preprocessed) // ke9ns capture preprocessed transmitting audio (IQ)
@ -3808,21 +3853,22 @@ namespace PowerSDR
if (vac_enabled && rb_vacOUT_l != null && rb_vacOUT_r != null)
{
// ke9ns here when VAC1 enabled
// ke9ns here when VAC1 enabled
if (vac_bypass || !localmox) // drain VAC Input ring buffer
if (vac_bypass || !localmox) //if VAC ignores PTT in RX/TX, or in RX, drain VAC Input ring buffer
{
// Debug.WriteLine("test");
if ((rb_vacIN_l.ReadSpace() >= frameCount) && (rb_vacIN_r.ReadSpace() >= frameCount))
{
Win32.EnterCriticalSection(cs_vac);
rb_vacIN_l.ReadPtr(out_l_ptr2, frameCount);
rb_vacIN_r.ReadPtr(out_r_ptr2, frameCount);
Win32.LeaveCriticalSection(cs_vac);
}
if (vox_enabled && !vac_bypass) // ke9ns only stream PC MIC audio if VOX is enabled and not bypassing
if (vox_enabled && !vac_bypass) // ke9ns: only stream PC MIC audio if VOX is enabled and not bypassing
{
// Debug.WriteLine("bad");
if (rb_vacIN_l.ReadSpace() >= frameCount)
@ -3850,30 +3896,50 @@ namespace PowerSDR
}
else
{
// ke9ns here when VAC1 enabled and in MOX
if (rb_vacIN_l.ReadSpace() >= frameCount)
// ke9ns: here when VAC1 enabled and in TX (but PTT override is not checked)
if (rb_vacIN_l.ReadSpace() >= frameCount) // ke9ns: should come here every cycle through this code on TX (as long as its not bypassed)
{
Win32.EnterCriticalSection(cs_vac); // ke9ns used to make sure you have control
rb_vacIN_l.ReadPtr(tx_in_l, frameCount);
rb_vacIN_r.ReadPtr(tx_in_r, frameCount);
Win32.LeaveCriticalSection(cs_vac);
if (console.setupForm.checkBoxMixAudio.Checked == true) // ke9ns add
{
// ke9ns at this point tx_in_l and r have MIC audio, unless you copy the VAC1 IN stream into tx_in_l and r
if (vac_combine_input) AddBuffer(tx_in_l, tx_in_r, frameCount);
Win32.EnterCriticalSection(cs_vac); // ke9ns used to make sure you have control
rb_vacIN_l.ReadPtr(tx_in1_l, frameCount);
rb_vacIN_r.ReadPtr(tx_in1_r, frameCount);
Win32.LeaveCriticalSection(cs_vac);
ScaleBuffer(tx_in1_l, tx_in1_l, frameCount, (float)vac_preamp); // ke9ns: PC MIC VAC1 audio stream here (but want option to allow MIX of VAC and radio MIC audio together)
ScaleBuffer(tx_in1_r, tx_in1_r, frameCount, (float)vac_preamp);
}
else
{
Win32.EnterCriticalSection(cs_vac); // ke9ns used to make sure you have control
rb_vacIN_l.ReadPtr(tx_in_l, frameCount);
rb_vacIN_r.ReadPtr(tx_in_r, frameCount);
Win32.LeaveCriticalSection(cs_vac);
if (vac_combine_input) AddBuffer(tx_in_l, tx_in_r, frameCount);
}
}
else
{
// should never come here. only comes here if there is an issue
ClearBuffer(tx_in_l, frameCount);
ClearBuffer(tx_in_r, frameCount);
VACDebug("rb_vacIN underflow 4inTX");
}
ScaleBuffer(tx_in_l, tx_in_l, frameCount, (float)vac_preamp); // ke9ns PC MIC VAC1 audio stream here
ScaleBuffer(tx_in_r, tx_in_r, frameCount, (float)vac_preamp);
if (console.setupForm.checkBoxMixAudio.Checked == false) // ke9ns add
{
ScaleBuffer(tx_in_l, tx_in_l, frameCount, (float)vac_preamp); // ke9ns: PC MIC VAC1 audio stream here (but want option to allow MIX of VAC and radio MIC audio together)
ScaleBuffer(tx_in_r, tx_in_r, frameCount, (float)vac_preamp);
}
}
} // vac1 on
#endregion
//---------------------------------------------------------------------------------
@ -3883,7 +3949,7 @@ namespace PowerSDR
if (vac2_enabled && rb_vac2OUT_l != null && rb_vac2OUT_r != null)
{
if (vac_bypass || !localmox || !vfob_tx) // drain VAC2 Input ring buffer
if (vac_bypass || !localmox || !vfob_tx) // ke9ns: if VAC2 is bypassed OR in RX or VFOA is the current TX VFO, then drain VAC2 Input ring buffer
{
if ((rb_vac2IN_l.ReadSpace() >= frameCount) && (rb_vac2IN_r.ReadSpace() >= frameCount))
@ -3895,7 +3961,7 @@ namespace PowerSDR
}
if (vox_enabled && !vac_bypass ) // ke9ns only stream PC MIC audio if VOX is enabled
if (vox_enabled && !vac_bypass ) // ke9ns: only stream PC MIC audio if VOX is enabled
{
if (rb_vac2IN_l.ReadSpace() >= frameCount)
{
@ -3952,7 +4018,6 @@ namespace PowerSDR
{
if (tx_dsp_mode == DSPMode.LSB ||
tx_dsp_mode == DSPMode.USB ||
tx_dsp_mode == DSPMode.DSB ||
tx_dsp_mode == DSPMode.AM ||
tx_dsp_mode == DSPMode.SAM ||
@ -3961,14 +4026,13 @@ namespace PowerSDR
tx_dsp_mode == DSPMode.DIGU)
{
if (((console.VACEnabled || console.VAC2Enabled) == false) ) // radio audio controls vox, not vac audio
if (((console.VACEnabled || console.VAC2Enabled) == false) ) // if vac1 or VAC2 OFF, but not both OFF radio audio controls vox, not vac audio
{
peak = MaxSample(tx_in_l, tx_in_r, frameCount);
// compare power to threshold
if (peak > vox_threshold)
{
vox_active = true;
}
else
@ -3977,7 +4041,7 @@ namespace PowerSDR
}
}
else
else // both VAC1 and VAC2 ON
{
if (!vac_bypass)
{
@ -3997,12 +4061,13 @@ namespace PowerSDR
}
else
{
Debug.WriteLine("----- VAC BYPASS NOW----");
vox_active = false;
}
}
} // vac1 and vac2 both ON
}
@ -4016,7 +4081,8 @@ namespace PowerSDR
// ke9ns WAVE PLAYBACK HERE
// scale input with mic preamp
if ((!vac_enabled && (tx_dsp_mode == DSPMode.LSB ||
// ke9ns: if VAC off or bypassed
if ( (!vac_enabled && (tx_dsp_mode == DSPMode.LSB ||
tx_dsp_mode == DSPMode.USB ||
tx_dsp_mode == DSPMode.DSB ||
tx_dsp_mode == DSPMode.AM ||
@ -4024,6 +4090,18 @@ namespace PowerSDR
tx_dsp_mode == DSPMode.FM ||
tx_dsp_mode == DSPMode.DIGL ||
tx_dsp_mode == DSPMode.DIGU))
||
( console.setupForm.checkBoxMixAudio.Checked == true &&
(tx_dsp_mode == DSPMode.DIGL ||
tx_dsp_mode == DSPMode.DIGU ||
tx_dsp_mode == DSPMode.LSB ||
tx_dsp_mode == DSPMode.USB ||
tx_dsp_mode == DSPMode.DSB ||
tx_dsp_mode == DSPMode.AM ||
tx_dsp_mode == DSPMode.SAM ||
tx_dsp_mode == DSPMode.FM)
)
||
(vac_enabled && vac_bypass &&
@ -4034,7 +4112,8 @@ namespace PowerSDR
tx_dsp_mode == DSPMode.DSB ||
tx_dsp_mode == DSPMode.AM ||
tx_dsp_mode == DSPMode.SAM ||
tx_dsp_mode == DSPMode.FM)) )
tx_dsp_mode == DSPMode.FM) )
)
{
@ -4044,28 +4123,34 @@ namespace PowerSDR
ScaleBuffer(tx_in_l, tx_in_l, frameCount, (float)wave_preamp);
ScaleBuffer(tx_in_r, tx_in_r, frameCount, (float)wave_preamp);
}
else
{
if (!vac_enabled && (tx_dsp_mode == DSPMode.DIGL || tx_dsp_mode == DSPMode.DIGU || (tx_dsp_mode == DSPMode.FM && console.FMData == true && console.setupForm.chkFMDataMic.Checked == false)))
if (!vac_enabled && (tx_dsp_mode == DSPMode.DIGL || tx_dsp_mode == DSPMode.DIGU || (tx_dsp_mode == DSPMode.FM && console.FMData == true && console.setupForm.chkFMDataMic.Checked == false)) )
{
ScaleBuffer(tx_in_l, tx_in_l, frameCount, (float)vac_preamp);
ScaleBuffer(tx_in_r, tx_in_r, frameCount, (float)vac_preamp);
}
else
{
if (console.setupForm.chkPhaseRotate.Checked == true) // ke9ns add phase rotation
if (console.setupForm.chkPhaseRotate.Checked == true) // ke9ns add phase rotation
{
PhaseRotate(tx_in_l, tx_in_l, frameCount, (float)mic_preamp);
PhaseRotate(tx_in_r, tx_in_r, frameCount, (float)mic_preamp);
}
else
{
ScaleBuffer(tx_in_l, tx_in_l, frameCount, (float)mic_preamp);
ScaleBuffer(tx_in_r, tx_in_r, frameCount, (float)mic_preamp);
}
if (console.setupForm.checkBoxMixAudio.Checked == true) // ke9ns add .151 MIX HERE
{
PhaseRotate(tx_in_l, tx_in_l, frameCount, (float)mic_preamp);
PhaseRotate(tx_in_r, tx_in_r, frameCount, (float)mic_preamp);
}
else
{
ScaleBuffer(tx_in_l, tx_in_l, frameCount, (float)mic_preamp);
ScaleBuffer(tx_in_r, tx_in_r, frameCount, (float)mic_preamp);
AddBuffer(tx_in_l, tx_in1_l, frameCount);
AddBuffer(tx_in_r, tx_in1_r, frameCount);
}
if ((console.TXMeter2 == true) && ((console.CurrentMeterTX1Mode == MeterTXMode.MIC) || (console.CurrentMeterTX1Mode == MeterTXMode.Combo))) peak1 = MaxSample(tx_in_l, tx_in_r, frameCount); // ke9ns add to allow for MIC level check in RX mode
@ -4193,7 +4278,6 @@ namespace PowerSDR
switch (tx_input_signal)
{
case SignalSource.RADIO:
if (console.keydot == true) // ke9ns add allow cw while talking
{
@ -4203,7 +4287,6 @@ namespace PowerSDR
break;
case SignalSource.SINE:
if ((console.PulseON == true)) // ke9ns add
{
Pulser(tx_in_l, frameCount, sine_freq1); // ke9ns add pulser function
@ -4809,7 +4892,7 @@ namespace PowerSDR
{
// Debug.WriteLine("VAC TESTING ENTER");
if ((!localmox))
if ((!localmox)) // if RX
{
// if (monitor_volume == 0) // ke9ns test to mute vac1 audio from the mute button (it works, but that is not the intent of the MUT button as flex designed it)
@ -5529,8 +5612,7 @@ namespace PowerSDR
// ke9ns used to input output VAC1 streams
//=====================================================================================================
// The VAC callback from 1.8.0 untouched in any way.
unsafe public static int CallbackVAC(void* input, void* output, int frameCount,
PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void *userData)
unsafe public static int CallbackVAC(void* input, void* output, int frameCount,PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void *userData)
{
if (!vac_enabled) return 0;
@ -5538,7 +5620,7 @@ namespace PowerSDR
int* array_ptr = (int *)input;
float* in_l_ptr1 = (float *)array_ptr[0]; // ke9ns this is the inpu from VAC1 int new_input = ((PADeviceInfo)comboAudioInput2.SelectedItem).Index;
float* in_l_ptr1 = (float *)array_ptr[0]; // ke9ns this is the input from VAC1 int new_input = ((PADeviceInfo)comboAudioInput2.SelectedItem).Index;
float* in_r_ptr1 = null;
@ -5683,8 +5765,7 @@ namespace PowerSDR
//=====================================================================================================
// ke9ns used to input output VAC2 streams
//=====================================================================================================
unsafe public static int CallbackVAC2(void* input, void* output, int frameCount,
PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void* userData)
unsafe public static int CallbackVAC2(void* input, void* output, int frameCount,PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void* userData)
{
if (!vac2_enabled) return 0;
@ -5818,8 +5899,7 @@ namespace PowerSDR
return 0;
}
unsafe public static int Pipe(void* input, void* output, int frameCount,
PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void *userData)
unsafe public static int Pipe(void* input, void* output, int frameCount,PA19.PaStreamCallbackTimeInfo* timeInfo, int statusFlags, void *userData)
{
float *inptr = (float *)input;
float *outptr = (float *)output;
@ -5865,7 +5945,7 @@ namespace PowerSDR
return;
}
for(int i=0; i<samples; i++)
for(int i=0; i < samples; i++)
outbuf[i] = inbuf[i] * scale;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -138,8 +138,9 @@ namespace PowerSDR
}
}
private static int hires = 4096;
// ke9ns add
private static int hires = 4096;
public static int HiResPan
{
get { return hires; }
@ -150,7 +151,7 @@ namespace PowerSDR
}
}
public static void SetThreadNumber(uint num)
{
DttSP.SetThreadNo(num);

View File

@ -207,6 +207,10 @@ namespace PowerSDR
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SetFMSquelchThreshold")]///
public static extern void SetFMSquelchThreshold(uint thread, uint subrx, float threshold);
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "GetFMSquelchBreak")] // ke9ns add
public static extern void GetFMSquelchBreak(uint thread, uint subrx, bool *fmsquelchbreak );
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SetCTCSSFreq")]///
public static extern void SetCTCSSFreq(uint thread, double freq_hz);
@ -237,7 +241,7 @@ namespace PowerSDR
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "GetSAMPLLvals")]///
public static extern void GetSAMPLLvals(uint thread, uint subrx, float *alpha, float *beta);
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SetSAMPLLvals")]///
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SetSAMPLLvals")]/// ke9ns: update.c
public static extern void SetSAMPLLvals(uint thread, uint subrx, float alpha, float beta);
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SetCorrectIQEnable")]
@ -448,7 +452,7 @@ namespace PowerSDR
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SetDiversityGain")]
unsafe public static extern int SetDiversityGain(float gain); // valid 0.0 - 1.0
[DllImport("DttSP.dll", EntryPoint="SetRingBufferOffset")]
public static extern void SetRingBufferOffset(uint thread, int offset);

View File

@ -1287,7 +1287,6 @@ namespace PowerSDR
//
// grpTXEQ28
//
this.grpTXEQ28.Controls.Add(this.labelTS6);
this.grpTXEQ28.Controls.Add(this.labelTS5);
this.grpTXEQ28.Controls.Add(this.labelTS4);
this.grpTXEQ28.Controls.Add(this.labelTS3);
@ -1350,6 +1349,7 @@ namespace PowerSDR
this.grpTXEQ28.Controls.Add(this.tbTX28EQ2);
this.grpTXEQ28.Controls.Add(this.lbl281);
this.grpTXEQ28.Controls.Add(this.tbTX28EQ1);
this.grpTXEQ28.Controls.Add(this.labelTS6);
this.grpTXEQ28.Location = new System.Drawing.Point(8, 502);
this.grpTXEQ28.Name = "grpTXEQ28";
this.grpTXEQ28.Size = new System.Drawing.Size(790, 200);
@ -2209,7 +2209,7 @@ namespace PowerSDR
// EQForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(654, 502);
this.ClientSize = new System.Drawing.Size(812, 669);
this.Controls.Add(this.chkAlwaysOnTop1);
this.Controls.Add(this.rad10Band);
this.Controls.Add(this.rad3Band);
@ -2586,7 +2586,7 @@ namespace PowerSDR
//===============================================================================
private void tbTXEQ_Scroll(object sender, System.EventArgs e) // ALL EQ slider changes come here
{
int[] txeq = TXEQ; // ke9ns get all the slider values here and put in array of ints
int[] txeq = TXEQ; // ke9ns: get all the slider values here and put in array of ints
if(rad3Band.Checked)
{
@ -2594,9 +2594,18 @@ namespace PowerSDR
}
else
{
console.dsp.GetDSPTX(0).TXEQ10 = txeq; // ke9ns refers to update SetGrphTXEQ10 txeq[0] is the preamp slider;
}
picTXEQ.Invalidate();
if (rad28Band.Checked == true) // ke9ns add: .149 fix
{
tbTX28EQ15_Scroll(this, EventArgs.Empty); // ke9ns: when anyone moves a 28band slider, it goes there.
}
else
{
console.dsp.GetDSPTX(0).TXEQ10 = txeq; // ke9ns refers to update SetGrphTXEQ10 txeq[0] is the preamp slider;
}
} // 10 band or 28 band
picTXEQ.Invalidate();
} // touched a TX EQ scroll bar
@ -3018,9 +3027,7 @@ namespace PowerSDR
{
if (rad28Band.Checked)
{
this.Size = new Size(822,750);
this.Size = new Size(822,750); // ke9ns: resize the window to fit the hidden 28eq
lblRXEQ2.Visible = true;
@ -3150,7 +3157,8 @@ namespace PowerSDR
TXEQ = console.dsp.GetDSPTX(0).TXEQ28;
tbRXEQ_Scroll(this, EventArgs.Empty);
tbTX28EQ15_Scroll(this, EventArgs.Empty);
tbTX28EQ15_Scroll(this, EventArgs.Empty); // ke9ns: when anyone moves a 28band slider, it goes there.
// tbTXEQ28_Scroll(this, EventArgs.Empty);
picRXEQ.Invalidate();
@ -3193,8 +3201,7 @@ namespace PowerSDR
if (rad28Band.Checked)
{
console.dsp.GetDSPTX(0).TXEQ28 = txeq; // ke9ns refers to update SetGrphTXEQ10 txeq[0] is the preamp slider;
console.dsp.GetDSPTX(0).TXEQ28 = txeq; // ke9ns refers to update SetGrphTXEQ10 txeq[0] is the preamp slider;
}
picTXEQ.Invalidate();

View File

@ -879,7 +879,7 @@ namespace PowerSDR
// Extended selector
private void buttonTS1_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show("Warning: You must have Authorization as a MARS Licensed Operator or permission to operate 630m band.\n",
DialogResult dr = MessageBox.Show("Warning: You must have Authorization as a MARS/CAP/SHARES Licensed Operator or permission to operate 630m band.\n",
"Do you have authorization?",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
@ -901,7 +901,7 @@ namespace PowerSDR
private void buttonTS2_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show("This will reset any MARS operate back to Normal Standard Operation\n",
DialogResult dr = MessageBox.Show("This will reset any MARS/CAP/SHARES operate back to Normal Standard Operation\n",
"Yes?",
MessageBoxButtons.YesNo,

View File

@ -106,10 +106,10 @@ namespace PowerSDR
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.btnEEPROMRead1 = new System.Windows.Forms.ButtonTS();
this.buttonTS3 = new System.Windows.Forms.ButtonTS();
this.labelTS1 = new System.Windows.Forms.LabelTS();
this.buttonTS2 = new System.Windows.Forms.ButtonTS();
this.buttonTS1 = new System.Windows.Forms.ButtonTS();
this.buttonTS3 = new System.Windows.Forms.ButtonTS();
this.labelTS1 = new System.Windows.Forms.LabelTS();
this.grpLowLevel.SuspendLayout();
this.groupBox1.SuspendLayout();
this.grpI2c.SuspendLayout();
@ -569,7 +569,7 @@ namespace PowerSDR
// btnEEPROMRead1
//
this.btnEEPROMRead1.Image = null;
this.btnEEPROMRead1.Location = new System.Drawing.Point(402, 352);
this.btnEEPROMRead1.Location = new System.Drawing.Point(402, 399);
this.btnEEPROMRead1.Name = "btnEEPROMRead1";
this.btnEEPROMRead1.Size = new System.Drawing.Size(152, 23);
this.btnEEPROMRead1.TabIndex = 55;
@ -578,6 +578,28 @@ namespace PowerSDR
"EPROMDATA.txt\r\nIt takes almost 1 minute to dump");
this.btnEEPROMRead1.Click += new System.EventHandler(this.btnEEPROMRead1_Click);
//
// buttonTS2
//
this.buttonTS2.Image = null;
this.buttonTS2.Location = new System.Drawing.Point(302, 352);
this.buttonTS2.Name = "buttonTS2";
this.buttonTS2.Size = new System.Drawing.Size(58, 23);
this.buttonTS2.TabIndex = 52;
this.buttonTS2.Text = "Normal";
this.toolTip1.SetToolTip(this.buttonTS2, "Returns radio back to normal band operation");
this.buttonTS2.Click += new System.EventHandler(this.buttonTS2_Click);
//
// buttonTS1
//
this.buttonTS1.Image = null;
this.buttonTS1.Location = new System.Drawing.Point(115, 352);
this.buttonTS1.Name = "buttonTS1";
this.buttonTS1.Size = new System.Drawing.Size(181, 23);
this.buttonTS1.TabIndex = 50;
this.buttonTS1.Text = "MARS/CAP/SHARES";
this.toolTip1.SetToolTip(this.buttonTS1, resources.GetString("buttonTS1.ToolTip"));
this.buttonTS1.Click += new System.EventHandler(this.buttonTS1_Click);
//
// buttonTS3
//
this.buttonTS3.Image = null;
@ -597,34 +619,11 @@ namespace PowerSDR
this.labelTS1.TabIndex = 49;
this.labelTS1.Text = "Select Turf Region:";
//
// buttonTS2
//
this.buttonTS2.Image = null;
this.buttonTS2.Location = new System.Drawing.Point(268, 352);
this.buttonTS2.Name = "buttonTS2";
this.buttonTS2.Size = new System.Drawing.Size(58, 23);
this.buttonTS2.TabIndex = 52;
this.buttonTS2.Text = "Normal";
this.toolTip1.SetToolTip(this.buttonTS2, "Returns radio back to normal band operation");
this.buttonTS2.Click += new System.EventHandler(this.buttonTS2_Click);
//
// buttonTS1
//
this.buttonTS1.Image = null;
this.buttonTS1.Location = new System.Drawing.Point(193, 352);
this.buttonTS1.Name = "buttonTS1";
this.buttonTS1.Size = new System.Drawing.Size(58, 23);
this.buttonTS1.TabIndex = 50;
this.buttonTS1.Text = "MARS";
this.toolTip1.SetToolTip(this.buttonTS1, "Extended Operation should only be applied if you have permission\r\nto Operate MARS" +
" or 630m band");
this.buttonTS1.Click += new System.EventHandler(this.buttonTS1_Click);
//
// FLEX1500DebugForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(573, 339);
this.ClientSize = new System.Drawing.Size(573, 347);
this.Controls.Add(this.btnEEPROMRead1);
this.Controls.Add(this.buttonTS3);
this.Controls.Add(this.numericUpDown1);

View File

@ -122,7 +122,7 @@
</metadata>
<data name="numericUpDown1.ToolTip" xml:space="preserve">
<value>Select your Turf Region value here:
NOTE: This will NOT effect MARS operation
NOTE: This will NOT effect MARS/CAP/SHARES operation
US = 0
UK = 1 UK, Slovakia, France, Malta
@ -150,6 +150,17 @@ NOTE: This will NOT effect MARS operation
IARU2 = 23 Central &amp; South America
Australia = 24
China = 25
</value>
</data>
<data name="buttonTS1.ToolTip" xml:space="preserve">
<value>Extended Operation: should only be applied if you have permission
to Operate MARS,CAP,SHARES, or 630m band (you will need a RX and TX LPF for this band)
You MUST have A License for the following:
MARS (Military Auxiliary Radio System)
CAP (Civil Air Patrol)
SHARES (SHAred RESources) https://www.dhs.gov/cisa/shared-resources-shares-high-frequency-hf-radio-program
630m band Authorization: https://utc.org/plc-database-amateur-notification-process/
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

View File

@ -306,10 +306,9 @@ namespace PowerSDR
"12m",
"10m",
"6m",
"2m",
"WWV",
"VHF0",
"VHF1",
"VU 2m",
"VU 70cm",
"VHF2",
"VHF3",
"VHF4",
@ -321,7 +320,21 @@ namespace PowerSDR
"VHF10",
"VHF11",
"VHF12",
"VHF13"});
"VHF13",
"LMF",
"120m",
"90m",
"61m",
"49m",
"41m",
"31m",
"25m",
"22m",
"19m",
"16m",
"14m",
"13m",
"11m"});
this.comboBand.Location = new System.Drawing.Point(200, 24);
this.comboBand.Name = "comboBand";
this.comboBand.Size = new System.Drawing.Size(56, 21);
@ -483,35 +496,50 @@ namespace PowerSDR
string ret_val = "";
switch(b)
{
case Band.GEN: ret_val = "GEN"; break;
case Band.B160M: ret_val = "160m"; break;
case Band.B80M: ret_val = "80m"; break;
case Band.B60M: ret_val = "60m"; break;
case Band.B40M: ret_val = "40m"; break;
case Band.B30M: ret_val = "30m"; break;
case Band.B20M: ret_val = "20m"; break;
case Band.B17M: ret_val = "17m"; break;
case Band.B15M: ret_val = "15m"; break;
case Band.B12M: ret_val = "12m"; break;
case Band.B10M: ret_val = "10m"; break;
case Band.B6M: ret_val = "6m"; break;
case Band.B2M: ret_val = "2m"; break;
case Band.WWV: ret_val = "WWV"; break;
case Band.VHF0: ret_val = "VHF0"; break;
case Band.VHF1: ret_val = "VHF1"; break;
case Band.VHF2: ret_val = "VHF2"; break;
case Band.VHF3: ret_val = "VHF3"; break;
case Band.VHF4: ret_val = "VHF4"; break;
case Band.VHF5: ret_val = "VHF5"; break;
case Band.VHF6: ret_val = "VHF6"; break;
case Band.VHF7: ret_val = "VHF7"; break;
case Band.VHF8: ret_val = "VHF8"; break;
case Band.VHF9: ret_val = "VHF9"; break;
case Band.VHF10: ret_val = "VHF10"; break;
case Band.VHF11: ret_val = "VHF11"; break;
case Band.VHF12: ret_val = "VHF12"; break;
case Band.VHF13: ret_val = "VHF13"; break;
}
case Band.GEN: ret_val = "GEN"; break; // ke9ns mod
case Band.B160M: ret_val = "160m"; break;
case Band.B80M: ret_val = "80m"; break;
case Band.B60M: ret_val = "60m"; break;
case Band.B40M: ret_val = "40m"; break;
case Band.B30M: ret_val = "30m"; break;
case Band.B20M: ret_val = "20m"; break;
case Band.B17M: ret_val = "17m"; break;
case Band.B15M: ret_val = "15m"; break;
case Band.B12M: ret_val = "12m"; break;
case Band.B10M: ret_val = "10m"; break;
case Band.B6M: ret_val = "6m"; break;
case Band.WWV: ret_val = "WWV"; break;
case Band.VHF0: ret_val = "VU 2m"; break;
case Band.VHF1: ret_val = "VU 70cm"; break;
case Band.VHF2: ret_val = "VHF2"; break;
case Band.VHF3: ret_val = "VHF3"; break;
case Band.VHF4: ret_val = "VHF4"; break;
case Band.VHF5: ret_val = "VHF5"; break;
case Band.VHF6: ret_val = "VHF6"; break;
case Band.VHF7: ret_val = "VHF7"; break;
case Band.VHF8: ret_val = "VHF8"; break;
case Band.VHF9: ret_val = "VHF9"; break;
case Band.VHF10: ret_val = "VHF10"; break;
case Band.VHF11: ret_val = "VHF11"; break;
case Band.VHF12: ret_val = "VHF12"; break;
case Band.VHF13: ret_val = "VHF13"; break;
case Band.BLMF: ret_val = "LMF"; break; // ke9ns add
case Band.B120M: ret_val = "120m"; break;
case Band.B90M: ret_val = "90m"; break;
case Band.B61M: ret_val = "61m"; break;
case Band.B49M: ret_val = "49m"; break;
case Band.B41M: ret_val = "41m"; break;
case Band.B31M: ret_val = "31m"; break;
case Band.B25M: ret_val = "25m"; break;
case Band.B22M: ret_val = "22m"; break;
case Band.B19M: ret_val = "19m"; break;
case Band.B16M: ret_val = "16m"; break;
case Band.B14M: ret_val = "14m"; break;
case Band.B13M: ret_val = "13m"; break;
case Band.B11M: ret_val = "11m"; break;
}
return ret_val;
}
@ -520,35 +548,50 @@ namespace PowerSDR
Band b = Band.GEN;
switch(s)
{
case "GEN": b = Band.GEN; break;
case "160m": b = Band.B160M; break;
case "80m": b = Band.B80M; break;
case "60m": b = Band.B60M; break;
case "40m": b = Band.B40M; break;
case "30m": b = Band.B30M; break;
case "20m": b = Band.B20M; break;
case "17m": b = Band.B17M; break;
case "15m": b = Band.B15M; break;
case "12m": b = Band.B12M; break;
case "10m": b = Band.B10M; break;
case "6m": b = Band.B6M; break;
case "2m": b = Band.B2M; break;
case "WWV": b = Band.WWV; break;
case "VHF0": b = Band.VHF0; break;
case "VHF1": b = Band.VHF1; break;
case "VHF2": b = Band.VHF2; break;
case "VHF3": b = Band.VHF3; break;
case "VHF4": b = Band.VHF4; break;
case "VHF5": b = Band.VHF5; break;
case "VHF6": b = Band.VHF6; break;
case "VHF7": b = Band.VHF7; break;
case "VHF8": b = Band.VHF8; break;
case "VHF9": b = Band.VHF9; break;
case "VHF10": b = Band.VHF10; break;
case "VHF11": b = Band.VHF11; break;
case "VHF12": b = Band.VHF12; break;
case "VHF13": b = Band.VHF13; break;
}
case "GEN": b = Band.GEN; break; // ke9ns mod
case "160m": b = Band.B160M; break;
case "80m": b = Band.B80M; break;
case "60m": b = Band.B60M; break;
case "40m": b = Band.B40M; break;
case "30m": b = Band.B30M; break;
case "20m": b = Band.B20M; break;
case "17m": b = Band.B17M; break;
case "15m": b = Band.B15M; break;
case "12m": b = Band.B12M; break;
case "10m": b = Band.B10M; break;
case "6m": b = Band.B6M; break;
case "WWV": b = Band.WWV; break;
case "VU 2m": b = Band.VHF0; break;
case "VU 70cm": b = Band.VHF1; break;
case "VHF2": b = Band.VHF2; break;
case "VHF3": b = Band.VHF3; break;
case "VHF4": b = Band.VHF4; break;
case "VHF5": b = Band.VHF5; break;
case "VHF6": b = Band.VHF6; break;
case "VHF7": b = Band.VHF7; break;
case "VHF8": b = Band.VHF8; break;
case "VHF9": b = Band.VHF9; break;
case "VHF10": b = Band.VHF10; break;
case "VHF11": b = Band.VHF11; break;
case "VHF12": b = Band.VHF12; break;
case "VHF13": b = Band.VHF13; break;
case "LMF": b = Band.BLMF; break; // ke9ns add
case "120m": b = Band.B120M; break;
case "90m": b = Band.B90M; break;
case "61m": b = Band.B61M; break;
case "49m": b = Band.B49M; break;
case "41m": b = Band.B41M; break;
case "31m": b = Band.B31M; break;
case "25m": b = Band.B25M; break;
case "22m": b = Band.B22M; break;
case "19m": b = Band.B19M; break;
case "16m": b = Band.B16M; break;
case "14m": b = Band.B14M; break;
case "13m": b = Band.B13M; break;
case "11m": b = Band.B11M; break;
}
return b;
}
@ -652,15 +695,20 @@ namespace PowerSDR
break;
}
}
}
if (radModeExpert.Checked) console.CurrentAntMode = AntMode.Expert; // ke9ns add: update console Ant display .119
else console.CurrentAntMode = AntMode.Simple;
}
private void comboTXAnt_SelectedIndexChanged(object sender, System.EventArgs e)
{
console.SetTXAnt1500(StringToBand(comboBand.Text), StringToAnt(comboTXAnt.Text));
if(chkLock.Checked) comboRXAnt.Text = comboTXAnt.Text;
if(chkLock.Checked)
comboRXAnt.Text = comboTXAnt.Text;
}
if (radModeExpert.Checked) console.CurrentAntMode = AntMode.Expert; // ke9ns add: update console Ant display .119
else console.CurrentAntMode = AntMode.Simple;
}
private void chkRCATX1_CheckedChanged(object sender, System.EventArgs e)
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -85,10 +85,10 @@ namespace PowerSDR
string nick = (string)dr["Nickname"];
bool present = false;
switch (m)
{
case Model.SDR1000:
case Model.SOFTROCK40:
case Model.DEMO:
present = true;
break;

View File

@ -8,8 +8,5 @@
<package id="NAudio.Lame" version="1.0.9" targetFramework="net452" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
<package id="Roslyn.Analyzers" version="1.0.3.4" targetFramework="net452" />
<package id="Syncfusion.Core.WinForms" version="17.1.0.50" targetFramework="net452" />
<package id="Syncfusion.Licensing" version="17.1.0.50" targetFramework="net452" />
<package id="Syncfusion.Shared.Base" version="17.1.0.50" targetFramework="net452" />
<package id="System.Json" version="4.5.0" targetFramework="net452" />
</packages>

View File

@ -53,16 +53,16 @@ namespace PortTalk
if(Environment.OSVersion.ToString() == "Microsoft Windows NT 5.1.2600.0")
{
// check for driver file and copy if needed
if(!File.Exists(Environment.SystemDirectory+"\\drivers\\inpoutx64.sys"))
File.Copy(Application.StartupPath+"\\inpoutx64.sys", Environment.SystemDirectory+"\\drivers\\inpoutx64.sys");
if(!File.Exists(Environment.SystemDirectory+"\\drivers\\inpout32.sys"))
File.Copy(Application.StartupPath+"\\inpout32.sys", Environment.SystemDirectory+"\\drivers\\inpout32.sys");
// check for registry entry
RegistryKey rk = null;
RegistryKey hklm = Registry.LocalMachine.OpenSubKey("SYSTEM", true);
if(hklm != null) hklm = hklm.OpenSubKey("CurrentControlSet", true);
if(hklm != null) hklm = hklm.OpenSubKey("Services", true);
if(hklm != null) rk = hklm.OpenSubKey("inpoutx64", true);
if(rk == null) rk = hklm.CreateSubKey("inpoutx64");
if(hklm != null) rk = hklm.OpenSubKey("inpout32", true);
if(rk == null) rk = hklm.CreateSubKey("inpout32");
if(rk != null)
{

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -144,27 +144,11 @@ may be consuming too much time. Chrome can be an offender, or Serial port CAT pr
</data>
<data name="chkBoxIICON.ToolTip" xml:space="preserve">
<value>Check to send IIC signal to activate SS AMP (ON/OFF).
The IIC bus will send 3 bytes of data: 4E, 01, &lt;DATA&gt;
The IIC bus will send 3 bytes of data: 4E (and 4A), 01, &lt;DATA&gt;
Where &lt;DATA&gt; bit6 (64) will always be SET when this box is checked.
Except on VHF/UHF bands
The Band your on determines which bit0-bit5 of the &lt;DATA&gt; byte sets SET
&lt;DATA&gt;
1 = Select bands: L/MW, 160m, 120m (no relay needed with w6qpl design)
2 = Select bands: 90m, 80m, 61m, 60m, 49m
4 = Select bands: 41m, 40m, 31m ,30m
8 = Select bands: 25m, 22m, 20m, 17m, 16m, 15m, 14m
16 = Select bands: 13m, 12m, 11m, 10m
32 = Select bands: 6m
64 = Remote Amp ON (only when 3 pos switch on Amp is in middle position)
(Relay in Amp turns Power supply ON/OFF as well)
128 = PTT ON (only when 3pos switch on Amp is in middle position)</value>
</data>
<data name="chkBoxIIC.ToolTip" xml:space="preserve">
<value>Check to use IIC FlexWire bus (address 0x4E) to send commands to an external device for AMP control.
The AMP uses the relay controlled W6PQL Output FIlter board and a relay for ON/OFF of the AMP
and a relay to enable PTT operation
@ -172,21 +156,100 @@ For reading the IIC bus, you can use a PCA9534 device and some relays, and use
Upon startup and band change, PowerSDR will send 2 IIC command strings:
1) Address 0x4E Register 0x01 Value = &lt;DATA&gt;
2) Address 0x4E, Register 0x03, Value = 0xFF
2) Address 0x4E, Register 0x03, Value = 0x00
(repeats for 0x4A address)
Address 0x4E is for the orignal w6pql LDMOS filter board layout
Address 0x4A is for the newer w6pql LDMOS filter boad layout
Both addresses will be sent
Where &lt;DATA&gt; runs from the following map:
1 = Select bands: L/MW, 160m, 120m (no relay needed with W6PQL design filter board)
2 = Select bands: 90m, 80m, 61m, 60m, 49m
4 = Select bands: 41m, 40m, 31m ,30m
8 = Select bands: 25m, 22m, 20m, 17m, 16m, 15m, 14m
16 = Select bands: 13m, 12m, 11m, 10m
8 = Select bands: 25m, 22m, 20m, 17m, 16m, 15m, 14m (Address 0x4E only)
16 = Select bands: 13m, 12m, 11m, 10m (Address 0x4E only)
and
8 = Select bands: 25m, 22m, 20m, 17m, 16m(Address 0x4A only)
16 = Select bands: 15m, 14m 13m, 12m, 11m, 10m (Address 0x4A only)
32 = Select bands: 6m
64 = Remote ON/OFF (used N.C. contact... 64 relay on = remote control)
128 = Selected bands: VHF/UHF (bit7 is turned OFF)
&lt;DATA&gt; bit6 (64) is SET only if IIC AMP ON/OFF checkbox is set and on an HF/6m band
</value>
</data>
<data name="chkBoxIIC.ToolTip" xml:space="preserve">
<value>Check to use IIC FlexWire bus (8bit address 0x4E &amp; 4A) to send commands to an external device for AMP control.
NOTE: 8bit address 0x40 = Heros Preselector, 0x4C = UCB XVTR, 0x42 &amp; 0x44 &amp; 0x46 = HF band select (starting with 2200m = 1)
The AMP uses the relay controlled W6PQL Output FIlter board and a relay for ON/OFF of the AMP
and a relay to enable PTT operation
For reading the IIC bus, you can use a PCA9534 device and some relays, and use the FlexWire port for power.
Upon startup and band change, PowerSDR will send 2 IIC command strings:
1) 8bit Address 0x4E Register 0x01 Value = &lt;DATA&gt;
2) 8bit Address 0x4E, Register 0x03, Value = 0x00
(repeats for 0x4A address)
8bit Address 0x4E is for the orignal w6pql LDMOS filter board layout
8bit Address 0x4A is for the newer w6pql LDMOS filter boad layout
Both addresses will be sent
Where &lt;DATA&gt; runs from the following map:
1 = Select bands: L/MW, 160m, 120m (no relay needed with W6PQL design filter board)
2 = Select bands: 90m, 80m, 61m, 60m, 49m
4 = Select bands: 41m, 40m, 31m ,30m
8 = Select bands: 25m, 22m, 20m, 17m, 16m, 15m, 14m (Address 0x4E only)
16 = Select bands: 13m, 12m, 11m, 10m (Address 0x4E only)
and
8 = Select bands: 25m, 22m, 20m, 17m, 16m(Address 0x4A only)
16 = Select bands: 15m, 14m 13m, 12m, 11m, 10m (Address 0x4A only)
32 = Select bands: 6m
64 = Remote ON/OFF (used N.C. contact... 64 relay on = remote control)
128 = Selected bands: VHF/UHF (bit7 is turned OFF)
&lt;DATA&gt; bit6 (64) is SET only if IIC AMP ON/OFF checkbox is set and on an HF/6m band
NOTE example: 8bit address 0x4E = 0,1,0,0, A2,A1,A0, 0 = (01001110)
</value>
</data>
<data name="chkBoxHERO.ToolTip" xml:space="preserve">
<value>I2C output when you change into each Ham band
Upon band change, PowerSDR will send 2 IIC command strings:
(For PCS9534 I2C port replacement chip)
1) 8bit Address 0x42 Register 0x01 Value = &lt;DATAA&gt;
2) 8bit Address 0x42, Register 0x03, Value = 0x00
&lt;DATAA&gt; (below)
2200m = 1, 630m = 2, 160m = 4, 80m = 8, 60m = 16, 40m = 32, 30m =64, 20m = 128
(For PCA9534 I2C port replacement chip)
1) 8bit Address 0x44 Register 0x01 Value = &lt;DATAB&gt;
2) 8bit Address 0x44, Register 0x03, Value = 0x00 (all output)
&lt;DATAB&gt; (below)
17m =1, 15m = 2, 12m = 4, 10m = 8, 6m = 16, reserved = 32, reserved = 64, reserved = 128
AND
(For MPC23017 I2C 16bit port replacement chip):
8bit address 0x46, register 0 &amp; 1 to 0 (all output on PortA &amp; B)
8bit address 0x46, register 0x12&lt;DATAA&gt;
8bit address 0x46, register 0x13 &lt;DATAB&gt;
NOTE example: 8bit address 0x46 = 0,1,0,0, A2,A1,A0, 0 = (01000110)</value>
</data>
<data name="chkBoxHTTP.ToolTip" xml:space="preserve">
<value>Setup your Router “Port Forward” to pass the Port# you select. 8081 is default
@ -256,20 +319,55 @@ WDM-KS: Windows Driver Model Kernal Streaming. Very low latency (Buffer La
ASIO: Audio Stream I/O. Very low (10mSec) latency, but only 1 device allowed and is already being used betwen your Flex and PowerSDR
</value>
</data>
<data name="labelTS38.ToolTip" xml:space="preserve">
<value>Slider adjusts where the noise floor will show up on the Waterfall screen
Noise Floor gets DARKER &lt;---&gt; Noise Floor gets LIGHTER
when "auto wtr/pan" checkbox is checked, the slider Lightens/Darkens the signal as the slider move.
If unchecked, you must click on the Auto Water/Pan text (just below the Panadater screen).
</value>
</data>
<data name="chkSpectrumHiRes.ToolTip" xml:space="preserve">
<value>Check box to increase the resolution of the Panadapter and Waterfall display
From 4096 points to 16384 points (x4) for finer detail
From 4096 points to 16384 points (x4) for much finer detail
Most noticable when you zoom in on a signal
NOTE: Because of the finer detail, you may see more signals on the screen, but also more Spurs.
Warning: This will require higher CPU usage</value>
</data>
<data name="chkBoxAutoWtrPan.ToolTip" xml:space="preserve">
<value>Check to Automatically update the waterfall (brightness), and Panadapter levels (height)
<data name="labelTS14.ToolTip" xml:space="preserve">
<value>Slider adjusts where the noise floor will show up on the Waterfall screen
Noise Floor gets DARKER &lt;---&gt; Noise Floor gets LIGHTER
You can still Left and Right Click on the "Auto Wtr/Pan Lvl" console button
for a semi-automatic level adjust</value>
when "auto wtr/pan" checkbox is checked, the slider Lightens/Darkens the signal as the slider move.
If unchecked, you must click on the Auto Water/Pan text (just below the Panadater screen).
</value>
</data>
<data name="tbWaterOffset.ToolTip" xml:space="preserve">
<value>Slider adjusts where the noise floor will show up on the Waterfall screen
Noise Floor gets DARKER &lt;---&gt; Noise Floor gets LIGHTER
when "auto wtr/pan" checkbox is checked, the slider Lightens/Darkens the signal as the slider move.
If unchecked, you must click on the Auto Water/Pan text (just below the Panadater screen).
</value>
</data>
<data name="labelTS13.ToolTip" xml:space="preserve">
<value>Slider adjusts where the noise floor will show up on the Panadapter screen
Noise Floor Moves DOWN &lt;---&gt; Noise Floor Moves UP
when "auto wtr/pan" checkbox is checked, the slider moves the signal as the slider move.
If unchecked, you must click on the Auto Water/Pan text (just below the Panadater screen).
</value>
</data>
<data name="tbGridOffset.ToolTip" xml:space="preserve">
<value>Slider adjusts where the noise floor will show up on the Panadapter screen
Noise Floor Moves DOWN &lt;---&gt; Noise Floor Moves UP
when "auto wtr/pan" checkbox is checked, the slider moves the signal as the slider move.
If unchecked, you must click on the Auto Water/Pan text (just below the Panadater screen).
</value>
</data>
<data name="comboDisplayLabelAlign.ToolTip" xml:space="preserve">
<value>Sets the alignment of the grid callouts on the display.
@ -314,6 +412,13 @@ Set Spectrum Grid-&gt;Max = -19, Min = -135, Step = 6 (S signals are 6 dBm apart
"Auto wtr/pan" box will automatically adjust "Max" for RX mode only, but "Min" works for both RX &amp; TX modes.
TX mode is set permanently to 10 dBm for its virtual "Max" (since you should not exceed 0 dBm)
</value>
</data>
<data name="chkBoxAutoWtrPan.ToolTip" xml:space="preserve">
<value>Check to Automatically update the waterfall (brightness), and Panadapter Noise Floor levels (height)
based on the Sliders.
You can still Left and Right Click on the "Auto Wtr/Pan Lvl" console button
for a semi-automatic level adjust</value>
</data>
<data name="chkDSPLevelerEnabled.ToolTip" xml:space="preserve">
<value>The Leveler is intended to even out the sound level variations through your microphone caused by
@ -332,6 +437,24 @@ algorithm we use (similar to the AGC), this ALC will allow very high average pow
peaks at a controlled level. The Compander (DX and CPDR on the Front Console - see Mode Specific
Controls Phone on page 82) work very well together with the ALC to increase average power without
overdrive.</value>
</data>
<data name="udDSPAGCMaxGaindB.ToolTip" xml:space="preserve">
<value>AGC Max Gain T=Threshold - Operates similarly to traditional RF Gain (but this way the Panadapter signal does not change when you change the gain)
This provides for a “threshold” AGC (see AGC-T on the main Console Screen)
Irrespective of how weak a signal is, no gain over this Max Gain is applied. (-20 dB to +120 dB gain)
AGC-T = 90 (means the AGC will not add more than 90dBm of gain to any signal you hear)
RIGHT CLICK (on top of AGC-T text): Toggle Panadapter Control (Grab Green line with your Mouse and pull up/down)
</value>
</data>
<data name="lblDSPAGCMaxGain.ToolTip" xml:space="preserve">
<value>AGC Max Gain T=Threshold - Operates similarly to traditional RF Gain (but this way the Panadapter signal does not change when you change the gain)
This provides for a “threshold” AGC (see AGC-T on the main console screen)
Irrespective of how weak a signal is, no gain over this Max Gain is applied. (-20 dB to +120 dB gain)
AGC-T = 90 (means the AGC will not add more than 90dBm of gain to any signal you hear)
RIGHT CLICK (on top of AGC-T text): Toggle Panadapter Control (Grab Green line with your Mouse and pull up/down)
</value>
</data>
<data name="grpDSPAGC.ToolTip" xml:space="preserve">
<value>The AGC is a state of the art, dual track AGC with anticipatory response on both fast and slower tracks.
@ -374,7 +497,7 @@ Your Audio should now allow for Peaks of Max power out with a Carrier of 25% max
<value>491, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
<value>69</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -169,7 +169,10 @@ This is the password that you use to login to: https://lotw.arrl.org/lotw/login
Then Right Click again to close the password box (it will be permanently saved)</value>
</data>
<data name="btnTrack.ToolTip" xml:space="preserve">
<value>Click to Turn on/off World Map, and/or GrayLine (Earth Dark &amp; Light Areas),
<value>HIT F2 to watch video showing how to use World map
Click to Turn on/off World Map, and/or GrayLine (Earth Dark &amp; Light Areas),
and/or Sun Tracking (position of Sun directly overhead a spot on Earth) on Panadapter.
Sun Tracking Includes Space Weather (Requires Internet for Weather)"</value>
</data>
@ -189,7 +192,9 @@ JA1IGY, RR9O, VR2B, 4S7B, ZS6DN, 5Z4B, 4X6TU, OH2B, CS3B, LU4AA,
OA4B, and YV5B in 10 second intervals. </value>
</data>
<data name="btnTime.ToolTip" xml:space="preserve">
<value>!!!!!Requires running PowerSDR in ADMIN mode!!!!
<value>Hit F2 to watch video showing how to use Time Sync
!!!!!Requires running PowerSDR in ADMIN mode!!!!
!!!!!Requires Internet Connection!!!!!!
!!!!!Your PC must be set to the correct Local Time Zone!!!!!
!!!!! Your PC must be set to the correct Daylight Savings setting!!!!!
@ -209,6 +214,7 @@ DDUtil may not be running, or configured correctly.
</data>
<data name="button4.ToolTip" xml:space="preserve">
<value>HIT F1 for HELPBOX
HIT F2 to watch video showing how to use LoTW
LoTW (ARRL Log Book of The World)
@ -235,9 +241,11 @@ If you dont have a “FCCDATA.dat” file, PowerSDR will attempt to find EN.d
PowerSDR will go to ARRL and download incremental QSO/QSL updates to your LoTW Log file (based on the Date of the Last Update).
This requires only a few seconds to update.
LoTW when running.
LoTW when downloading a LoTW Log QSO/QSLfile
LoTW when a fault occured.</value>
GREEN LoTW when running.
YELLOW LoTW when downloading a LoTW Log QSO/QSLfile
RED LoTW when a fault occured.
To download a new fcc database: http://wireless.fcc.gov/uls/data/complete/l_amat.zip</value>
</data>
<data name="chkISS.ToolTip" xml:space="preserve">
<value>True (Zenith) position of the ISS will show on Panadapter screen (includes Elevation to you)
@ -253,9 +261,36 @@ When you Click on the TRACK/Map button to activate the World Map
Left Click on the Moon and hit the CTRL key to Rotate your Antenna</value>
</data>
<data name="chkBoxAnt.ToolTip" xml:space="preserve">
<value>HIT F2 to watch video showing how to use VOACAP
Check this box if your using a Beam Antenna instead of a Dipole
Use VOACAP to map Signal Strength from your station,
based on your Lat &amp; Long
View using TRACK button
</value>
</data>
<data name="udDisplayWWV.ToolTip" xml:space="preserve">
<value>If you check the "use WWV HF" Box:
Hit F2 to watch video showing how to use Time Sync
Select a WWV station with a stron non-fading signal.
Usually 10mhz and 15mhz are the cleanest signals
1=2.5mhz
2=5.0mhz
3=10.0mhz
4=15.0mhz
</value>
</data>
<data name="checkBoxWWV.ToolTip" xml:space="preserve">
<value>Check this box, then Click on "Time Sync"
<value>Hit F2 to watch video showing how to use Time Sync
Check this box, then Click on "Time Sync"
Time Sync will listen to Radio WWV BCD time code
found on a 100hz sub-carrier.

View File

@ -43,7 +43,7 @@ namespace PowerSDR
#else
public const string BUILT_BY = "MMods Compiled by [US1GHQ]";
public const string BUILT_BY = "Mods Compiled by [US1GHQ]";
#endif
public const string VERSION_SUFFIX = SVNRev.LATEST_REV; // Make this "" for production

View File

@ -381,16 +381,14 @@ namespace PowerSDR
private System.Windows.Forms.Button btnSetDelay;
private System.Windows.Forms.Button btnSetupXVTR;
private System.Windows.Forms.CheckBoxTS chkFlexWire;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private ToolTip toolTip1;
private IContainer components;
#endregion
#endregion
#region Constructor and Destructor
#region Constructor and Destructor
public UCBForm(Console c)
public UCBForm(Console c)
{
//
// Required for Windows Form Designer support
@ -466,6 +464,7 @@ namespace PowerSDR
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UCBForm));
this.btnEnable = new System.Windows.Forms.ButtonTS();
this.btnDisable = new System.Windows.Forms.ButtonTS();
@ -798,6 +797,7 @@ namespace PowerSDR
this.btnSetDelay = new System.Windows.Forms.Button();
this.btnSetupXVTR = new System.Windows.Forms.Button();
this.chkFlexWire = new System.Windows.Forms.CheckBoxTS();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.SuspendLayout();
//
// btnEnable
@ -3628,6 +3628,7 @@ namespace PowerSDR
this.radLine0.TabIndex = 309;
this.radLine0.TabStop = true;
this.radLine0.Text = "radioButton1";
this.toolTip1.SetToolTip(this.radLine0, "For SDR-1000 only");
this.radLine0.CheckedChanged += new System.EventHandler(this.radLine_CheckedChanged);
//
// radLine1
@ -3843,6 +3844,7 @@ namespace PowerSDR
this.chkFlexWire.TabIndex = 330;
this.chkFlexWire.Text = "FlexWire";
this.chkFlexWire.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.toolTip1.SetToolTip(this.chkFlexWire, resources.GetString("chkFlexWire.ToolTip"));
this.chkFlexWire.CheckedChanged += new System.EventHandler(this.chkFlexWire_CheckedChanged);
//
// UCBForm
@ -4182,7 +4184,7 @@ namespace PowerSDR
this.Controls.Add(this.btnEnable);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "UCBForm";
this.Text = "UCB Configuration and Setup";
this.Text = "UCB (Universal Control Board) Configuration and Setup";
this.Closing += new System.ComponentModel.CancelEventHandler(this.UCBForm_Closing);
this.ResumeLayout(false);
@ -5021,12 +5023,13 @@ namespace PowerSDR
CheckBox chk = sender as CheckBox;
if(chk == null) return;
int index = int.Parse(chk.Name.Substring(4, 2));
int index = int.Parse(chk.Name.Substring(4, 2)); // get the name of the item click on in the form (chkL02R06: index = 2, relay = 6)
int relay = int.Parse(chk.Name.Substring(7, 2));
if(chk.Checked)
line[index] |= (ushort)(1<<(relay-1));
line[index] |= (ushort)(1<<(relay-1)); // add it to the line[2] = line[2] | 0001 0000 = 0x10 (for relay 6) relay1 has no shift
else
line[index] &= (ushort)(0xFFFF - (1 << (relay - 1)));
line[index] &= (ushort)(0xFFFF - (1 << (relay - 1))); // remove it from the line[index]
//Debug.WriteLine("line[" + index + "]: " + line[index]);
}

View File

@ -112,12 +112,31 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="chkFlexWire.ToolTip" xml:space="preserve">
<value>Enable address 0x4C IIC output to the follow format:
3 byte format (address + 2 data bytes)
4 lines for 12 bytes sent
0x4c, 0x06, 0
0x4c, 0x07, 0
0x4c, 0x02, b1
0x4c, 0x03, b2
b1 = (relays 1-8) with each bit representing a relay
b2 = (relays 9-16)
The b1,b2 from the UCB line representing the XVTR line 0 -15</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAEBAAAAAAIABoBAAANgAAACAgAAAAACAAqBAAAJ4EAAAwMAAAAAAgAKglAABGFQAAKAAAABAA

View File

@ -44,8 +44,7 @@ using System.Windows.Forms;
using NAudio;
using NAudio.Wave;
using NAudio.Lame;
using System.Collections.Generic;
namespace PowerSDR
{
@ -767,7 +766,18 @@ namespace PowerSDR
}
} // RECPLAY3
private static void ConvertMp3ToWav(string _inPath_, string _outPath_)
{
using (Mp3FileReader mp3 = new Mp3FileReader(_inPath_))
{
using (WaveStream pcm = WaveFormatConversionStream.CreatePcmStream(mp3))
{
// WaveFileWriter.CreateWaveFile(_outPath_, pcm);
}
}
}
#region Misc Routines
//=============================================================================================================
@ -860,12 +870,13 @@ namespace PowerSDR
return false;
}
if (!TXIDBoxTS.Checked) // ke9ns add
if (!TXIDBoxTS.Checked) // ke9ns add: dont check if doing a TX ID
{ // format =1 means PCM
if (!CheckSampleRate(fmt.sample_rate) || (fmt.format == 1 && fmt.sample_rate != Audio.SampleRate1)) // ke9ns needs to be on the list of sample rates BUT needs to match the current SR otherwise it fails
if (!CheckSampleRate(fmt.sample_rate) || (fmt.format == 1 && fmt.sample_rate != Audio.SampleRate1)) // ke9ns: needs to be on the list of sample rates BUT needs to match the current SR otherwise it fails
{
reader.Close();
MessageBox.Show("File has the wrong sample rate.",
MessageBox.Show("File has the wrong sample rate.> " + fmt.sample_rate + ", " + Audio.SampleRate1,
"Wrong Sample Rate",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
@ -888,7 +899,7 @@ namespace PowerSDR
} // do above if not a WatefallID TX
//----------------------------------------------------------------------
// this is where the audio is loaded up into the proper reader.
@ -1804,7 +1815,7 @@ namespace PowerSDR
// console.MON = false;
// Debug.WriteLine("playing ");
Debug.WriteLine("playing ");
if (!OpenWaveFile(file_name, false))
{
@ -1825,11 +1836,13 @@ namespace PowerSDR
} // txidboxts checked
else// this is what signals the end of playback
{
if (Audio.wave_file_reader != null) Audio.wave_file_reader.Stop();
TXIDBoxTS.BackColor = SystemColors.Control;
// Debug.WriteLine("DONE playing ");
Debug.WriteLine("DONE playing ");
console.MON = temp_mon;
Audio.RecordTXPreProcessed = temp_play; //return to original state
@ -1838,6 +1851,7 @@ namespace PowerSDR
console.DX = temp_dx;
console.TXIDMenuItem.Checked = false; // turn off TX waterfall ID here
} // txidboxts not checked
@ -1914,7 +1928,7 @@ namespace PowerSDR
{
string file_name = console.AppDataPath + "ke9ns.wav"; // TEXT to waterfall image only
string file_name = console.AppDataPath + "ke9ns.wav"; // TEXT to waterfall image only 16bit 48khz SR, 768 kbps
string file_name1 = console.AppDataPath + "ke9ns.bmp"; // image file to waterfall
@ -1962,8 +1976,6 @@ namespace PowerSDR
long xm4 = 4 * ((xm + 3) / 4);
const float bw = .114F; // factors to convert RGB color to grayscale
@ -2001,9 +2013,7 @@ namespace PowerSDR
n4 = 0; // USB
string temp1A = console.Callsign;
int temp2 = console.Callsign.Length;
if (temp2 < 8) //if the callsign text is less then 7 char, then add space between each character to make it more legible
{
@ -2193,8 +2203,7 @@ namespace PowerSDR
ap[n, y] = (byte)(114 - temp);
if (ap[n, y] < 10) ap[n, y] = 0;
}
else // LSB
{
@ -2203,10 +2212,8 @@ namespace PowerSDR
}
} // X
} // Y
@ -2331,8 +2338,8 @@ namespace PowerSDR
const int format = 0x20746D66; // 0x20746D66 0x666d7420
const short formatType = 1; // 1 PCM
const short tracks = 1; // 1 Stereo = 2
const int samplesPerSecond = 48000; // console.SampleRate1; (fixed flex routine to resample audio to correct SR)
const short bitsPerSample = 16; // 16
const int samplesPerSecond = 48000; // console.SampleRate1; (fixed flex routine to resample audio to correct SR)
const short bitsPerSample = 16; // 16
short frameSize = (short)(tracks * ((bitsPerSample + 7) / 8)); // tracks 2.875 @ 8000 sps
@ -2348,12 +2355,10 @@ namespace PowerSDR
{
if (console.TXFilterHigh > 2400) bandpass = (console.TXFilterHigh - 150);
else bandpass = 2400;
}
else
{
bandpass = 2400;
}
int t2 = 2; // divide the time for each line (this controls how long each line takes)
@ -2401,7 +2406,7 @@ namespace PowerSDR
int hzperpixel = (int)(((float)bandpass / (float)xm ) + .5); // 2khz wide = 25hz/pix 6000 = 75 hz per pixel
// Debug.WriteLine("hzperpixel " + hzperpixel);
// Debug.WriteLine("hzperpixel " + hzperpixel);
int sample2 = samplesPerSecond / t2; // samples2 = the amount of time spent on each y1 line
@ -2413,7 +2418,16 @@ namespace PowerSDR
// Create Digital PCM Stream
//=========================================================================================
bool firstdata = false; // true = value other than 0
firstdata = false;
int filesizewav = 0;
int firstzero = 0;
int lastzero = 0;
List<short> s1 = new List<short>(); // (ym*sample2);
for (int y1 = 0; y1 < ym; y1++) // each line (bottom of bitmap is first line out)
{
@ -2437,27 +2451,65 @@ namespace PowerSDR
}
} // freq loop
//============================================================
short s = (short)(temp7 * bright);
short s = (short)(temp7 * bright);
if ((firstdata == false))
{
if (s != 0) firstdata = true; // ke9ns: .139 remove the starting dead space from the transmission
else firstzero++; // count how many 16bit words until the first real data (non-zero)
}
// writer.Write(s); // left 16bits
s1.Add(s); // ke9ns: store wav in array so you can drop the dead space and the start and end of the file
writer.Write(s); // left 16bits
// writer.Write(s); // right 16bits (this channel is needed by Flex Quickplay routine)
if ((firstdata == true))
{
if (s == 0) lastzero++; // counts how many zeros before the end of the file
}
else
{
lastzero = 0;
}
} // n X 1 line at a time
} // Y
Debug.WriteLine("WAVE=== First zero: " + firstzero + " , Last Zero: " + lastzero + " Arry size: " + s1.Count);
filesizewav = s1.Count;
if (IMAGE == 0)
{
if (lastzero > 40000) // ke9ns: .146 remove end of file
{
lastzero = lastzero - 40000;
filesizewav = s1.Count - lastzero; // remove zeros at end of file
}
}
if (firstzero > 30000) firstzero = firstzero - 30000;
else firstzero = 0;
Debug.WriteLine("1WAVE=== First zero: " + firstzero + " , Last Zero: " + lastzero + " Arry size: " + s1.Count);
for (int q = firstzero; q < filesizewav; q++)
{
writer.Write(s1[q]);
}
writer.Flush();
writer.Close(); // close wav file
stream.Close(); // close stream
console.callsignTextBox.BackColor = Color.MediumSpringGreen; // green if you created it or its still a valid wave
console.menuStrip1.Invalidate();
@ -2479,7 +2531,6 @@ namespace PowerSDR
if (chkQuickAudioFolder.Checked)
{
System.IO.Directory.CreateDirectory(console.AppDataPath + "QuickAudio"); // ke9ns create sub directory
}
else
{
@ -3104,6 +3155,7 @@ namespace PowerSDR
count += out_cnt*2*4;
}
// ke9ns: write a wav file (header)
private void WriteWaveHeader(ref BinaryWriter writer, short channels, int sample_rate, short bit_depth, int data_length)
{
writer.Write(0x46464952); // "RIFF" -- descriptor chunk ID

View File

@ -152,7 +152,7 @@ namespace PowerSDR
switch(model)
{
case Model.SDR1000:
// radGenModelSDR1000.Checked = true;
radGenModelSDR1000.Checked = true;
break;
case Model.SOFTROCK40:
// radGenModelSoftRock40.Checked = true;

View File

@ -267,16 +267,19 @@ namespace PowerSDR
private CheckBoxTS chkVHFPAEnable;//
private CheckBoxTS chkUHFPAEnable;//////
public CheckBoxTS chkAlwaysOnTop1;
private System.ComponentModel.Container components = null;////
private CheckBoxTS chkFlexWire;
private ToolTip toolTip1;
private IContainer components;
//bool init = true;
#endregion
#region Constructor and Destructor
#endregion
public XVTRForm(Console c)
#region Constructor and Destructor
public XVTRForm(Console c)
{
//
// Required for Windows Form Designer support
@ -453,6 +456,7 @@ namespace PowerSDR
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XVTRForm));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chkUHFPAEnable = new System.Windows.Forms.CheckBoxTS();
@ -669,6 +673,8 @@ namespace PowerSDR
this.lblUCBAddress = new System.Windows.Forms.LabelTS();
this.lblBandButton = new System.Windows.Forms.LabelTS();
this.chkAlwaysOnTop1 = new System.Windows.Forms.CheckBoxTS();
this.chkFlexWire = new System.Windows.Forms.CheckBoxTS();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.udRXGain1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.udRXGain0)).BeginInit();
@ -5069,6 +5075,7 @@ namespace PowerSDR
this.lblUCBAddress.Size = new System.Drawing.Size(80, 16);
this.lblUCBAddress.TabIndex = 1;
this.lblUCBAddress.Text = "UCB Address";
this.toolTip1.SetToolTip(this.lblUCBAddress, "Universal Control Board I2C 8bit address 0x4C");
//
// lblBandButton
//
@ -5091,10 +5098,25 @@ namespace PowerSDR
this.chkAlwaysOnTop1.Text = "Always On Top";
this.chkAlwaysOnTop1.CheckedChanged += new System.EventHandler(this.ChkAlwaysOnTop1_CheckedChanged);
//
// chkFlexWire
//
this.chkFlexWire.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.chkFlexWire.Appearance = System.Windows.Forms.Appearance.Button;
this.chkFlexWire.Image = null;
this.chkFlexWire.Location = new System.Drawing.Point(907, 428);
this.chkFlexWire.Name = "chkFlexWire";
this.chkFlexWire.Size = new System.Drawing.Size(88, 24);
this.chkFlexWire.TabIndex = 331;
this.chkFlexWire.Text = "FlexWire";
this.chkFlexWire.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.toolTip1.SetToolTip(this.chkFlexWire, resources.GetString("chkFlexWire.ToolTip"));
this.chkFlexWire.CheckedChanged += new System.EventHandler(this.chkFlexWire_CheckedChanged);
//
// XVTRForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(1013, 486);
this.Controls.Add(this.chkFlexWire);
this.Controls.Add(this.chkAlwaysOnTop1);
this.Controls.Add(this.lblPAEnable);
this.Controls.Add(this.lblIFGain);
@ -6211,5 +6233,22 @@ namespace PowerSDR
{
if (console.setupForm.chkBoxAutoFocus.Checked == true && chkAlwaysOnTop1.Checked == true) this.Activate();
}
private void chkFlexWire_CheckedChanged(object sender, EventArgs e)
{
if (console.ucbForm == null || console.ucbForm.IsDisposed)
console.ucbForm = new UCBForm(console);
if (chkFlexWire.Checked == true)
{
chkFlexWire.BackColor = Color.Yellow;
console.ucbForm.Show();
console.ucbForm.Focus();
}
else
{
chkFlexWire.BackColor = SystemColors.ControlLight;
}
}
}
}

View File

@ -117,6 +117,29 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="chkFlexWire.ToolTip" xml:space="preserve">
<value>Open the FlexWire UCB (Universal Control Board) relay panel
or use CTRL+ALT + U keys to open
Enable 8bit address 0x4C IIC output to the follow format:
3 byte format (address + 2 data bytes)
4 lines for 12 bytes sent
0x4c, 0x06, 0
0x4c, 0x07, 0
0x4c, 0x02, b1
0x4c, 0x03, b2
b1 = (relays 1-8) with each bit representing a relay
b2 = (relays 9-16)
The b1,b2 from the UCB line representing the XVTR line 0 -15
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -29,6 +29,9 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>
</WholeProgramOptimization>
<CLRSupport>false</CLRSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
@ -182,7 +185,7 @@
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DttSP_EXPORTS;__CLEANUP_C;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)/</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
@ -200,6 +203,8 @@
<XMLDocumentationFileName>$(IntDir)\</XMLDocumentationFileName>
<DiagnosticsFormat>Classic</DiagnosticsFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<CompileAsManaged>
</CompileAsManaged>
</ClCompile>
<Link>
<AdditionalDependencies>winMM.lib;libfftw3f-3.lib;pthreadVC.lib;</AdditionalDependencies>

View File

@ -41,11 +41,10 @@ Bridgewater, NJ 08807
/* private to AM */
/*------------------------------------------------------------------------------*/
static void
init_pll (AMD am,
REAL samprate, REAL freq, REAL lofreq, REAL hifreq, REAL bandwidth)
static void init_pll (AMD am,REAL samprate, REAL freq, REAL lofreq, REAL hifreq, REAL bandwidth)
{
REAL fac = (REAL) (TWOPI / samprate);
am->pll.freq.f = freq * fac;
am->pll.freq.l = lofreq * fac;
am->pll.freq.h = hifreq * fac;
@ -58,36 +57,34 @@ init_pll (AMD am,
am->pll.fast_alpha = am->pll.alpha;
}
static void
pll (AMD am, COMPLEX sig)
static void pll (AMD am, COMPLEX sig)
{
COMPLEX z = Cmplx ((REAL) cos (am->pll.phs), (REAL) sin (am->pll.phs));
REAL diff;
am->pll.delay.re = z.re * sig.re + z.im * sig.im;
am->pll.delay.im = -z.im * sig.re + z.re * sig.im;
diff = fast_atan2 (am->pll.delay.im, am->pll.delay.re);
am->pll.freq.f += am->pll.beta * diff;
if (am->pll.freq.f < am->pll.freq.l)
am->pll.freq.f = am->pll.freq.l;
if (am->pll.freq.f > am->pll.freq.h)
am->pll.freq.f = am->pll.freq.h;
if (am->pll.freq.f < am->pll.freq.l) am->pll.freq.f = am->pll.freq.l;
if (am->pll.freq.f > am->pll.freq.h) am->pll.freq.f = am->pll.freq.h;
am->pll.phs += am->pll.freq.f + am->pll.alpha * diff;
while (am->pll.phs >= TWOPI)
am->pll.phs -= (REAL) TWOPI;
while (am->pll.phs < 0)
am->pll.phs += (REAL) TWOPI;
}
static REAL
dem (AMD am)
static REAL dem (AMD am)
{
am->lock.curr =
(REAL) (0.999 * am->lock.curr + 0.001 * fabs (am->pll.delay.im));
am->lock.curr = (REAL) (0.999 * am->lock.curr + 0.001 * fabs (am->pll.delay.im));
/* env collapse? */
/* if ((am->lock.curr < 0.05) && (am->lock.prev >= 0.05))
@ -108,8 +105,7 @@ dem (AMD am)
/* public */
/*------------------------------------------------------------------------------*/
void
AMDemod (AMD am)
void AMDemod (AMD am)
{
int i;
REAL demout;
@ -136,12 +132,7 @@ AMDemod (AMD am)
}
}
AMD
newAMD (REAL samprate,
REAL f_initial,
REAL f_lobound,
REAL f_hibound,
REAL f_bandwid,
AMD newAMD (REAL samprate,REAL f_initial,REAL f_lobound,REAL f_hibound,REAL f_bandwid,
int size, COMPLEX * ivec, COMPLEX * ovec, AMMode mode, char *tag)
{
AMD am = (AMD) safealloc (1, sizeof (AMDDesc), tag);
@ -159,8 +150,7 @@ newAMD (REAL samprate,
return am;
}
void
delAMD (AMD am)
void delAMD (AMD am)
{
if (am)
{

View File

@ -1,10 +1,10 @@
/*
* Copyright (c) 2003, 2007-8 Matteo Frigo
* Copyright (c) 2003, 2007-8 Massachusetts Institute of Technology
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* The following statement of license applies *only* to this header file,
* and *not* to the other files distributed with FFTW or derived therefrom:
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -66,281 +66,389 @@ extern "C"
#define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name)
#define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name)
#define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name)
#define FFTW_DLL
#define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name)
/* IMPORTANT: for Windows compilers, you should add a line
#define FFTW_DLL
here and in kernel/ifftw.h if you are compiling/using FFTW as a
DLL, in order to do the proper importing/exporting, or
alternatively compile with -DFFTW_DLL or the equivalent
command-line flag. This is not necessary under MinGW/Cygwin, where
libtool does the imports/exports automatically. */
#if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__))
/* annoying Windows syntax for shared-library declarations */
# if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */
# define FFTW_EXTERN extern __declspec(dllexport)
# define FFTW_EXTERN extern __declspec(dllexport)
# else /* user is calling FFTW; import symbol */
# define FFTW_EXTERN extern __declspec(dllimport)
# define FFTW_EXTERN extern __declspec(dllimport)
# endif
#else
# define FFTW_EXTERN extern
#endif
//==========================================================================
enum fftw_r2r_kind_do_not_use_me
{
/* specify calling convention (Windows only) */
#if defined(_WIN32) || defined(__WIN32__)
# define FFTW_CDECL __cdecl
#else
# define FFTW_CDECL
#endif
enum fftw_r2r_kind_do_not_use_me {
FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2,
FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6,
FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10
};
//==========================================================================
struct fftw_iodim_do_not_use_me
{
int n; /* dimension size */
struct fftw_iodim_do_not_use_me {
int n; /* dimension size */
int is; /* input stride */
int os; /* output stride */
};
#include <stddef.h> /* for ptrdiff_t */
struct fftw_iodim64_do_not_use_me
{
ptrdiff_t n; /* dimension size */
struct fftw_iodim64_do_not_use_me {
ptrdiff_t n; /* dimension size */
ptrdiff_t is; /* input stride */
ptrdiff_t os; /* output stride */
};
typedef void (FFTW_CDECL *fftw_write_char_func_do_not_use_me)(char c, void *);
typedef int (FFTW_CDECL *fftw_read_char_func_do_not_use_me)(void *);
/*
huge second-order macro that defines prototypes for all API
functions. We expand this macro for each supported precision
X: name-mangling macro
R: real data type
C: complex data type
*/
#define FFTW_DEFINE_API(X, R, C) \
\
FFTW_DEFINE_COMPLEX(R, C); \
\
typedef struct X(plan_s) *X(plan); \
\
typedef struct fftw_iodim_do_not_use_me X(iodim); \
typedef struct fftw_iodim64_do_not_use_me X(iodim64); \
\
typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \
\
FFTW_EXTERN void X(execute)(const X(plan) p); \
\
FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \
C *in, C *out, int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \
FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \
R *ro, R *io); \
\
FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \
R *in, C *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, \
R *in, C *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, \
int n2, \
R *in, C *out, unsigned flags); \
\
\
FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, \
C *in, R *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, \
int n2, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \
FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \
\
FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \
R *in, R *ro, R *io); \
FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \
R *ri, R *ii, R *out); \
\
FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \
X(r2r_kind) kind, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \
X(r2r_kind) kind0, X(r2r_kind) kind1, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, \
R *in, R *out, X(r2r_kind) kind0, \
X(r2r_kind) kind1, X(r2r_kind) kind2, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \
\
FFTW_EXTERN void X(destroy_plan)(X(plan) p); \
FFTW_EXTERN void X(forget_wisdom)(void); \
FFTW_EXTERN void X(cleanup)(void); \
\
FFTW_EXTERN void X(set_timelimit)(double); \
\
FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \
FFTW_EXTERN int X(init_threads)(void); \
FFTW_EXTERN void X(cleanup_threads)(void); \
\
FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \
FFTW_EXTERN char *X(export_wisdom_to_string)(void); \
FFTW_EXTERN void X(export_wisdom)(void (*write_char)(char c, void *), \
void *data); \
FFTW_EXTERN int X(import_system_wisdom)(void); \
FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \
FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \
FFTW_EXTERN int X(import_wisdom)(int (*read_char)(void *), void *data); \
\
FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \
FFTW_EXTERN void X(print_plan)(const X(plan) p); \
\
FFTW_EXTERN void *X(malloc)(size_t n); \
FFTW_EXTERN void X(free)(void *p); \
\
FFTW_EXTERN void X(flops)(const X(plan) p, \
double *add, double *mul, double *fmas); \
FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \
\
FFTW_EXTERN const char X(version)[]; \
FFTW_EXTERN const char X(cc)[]; \
#define FFTW_DEFINE_API(X, R, C) \
\
FFTW_DEFINE_COMPLEX(R, C); \
\
typedef struct X(plan_s) *X(plan); \
\
typedef struct fftw_iodim_do_not_use_me X(iodim); \
typedef struct fftw_iodim64_do_not_use_me X(iodim64); \
\
typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \
\
typedef fftw_write_char_func_do_not_use_me X(write_char_func); \
typedef fftw_read_char_func_do_not_use_me X(read_char_func); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute)(const X(plan) p); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft)(int rank, const int *n, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_1d)(int n, C *in, C *out, int sign, \
unsigned flags); \
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_2d)(int n0, int n1, \
C *in, C *out, int sign, unsigned flags); \
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_3d)(int n0, int n1, int n2, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_many_dft)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru64_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru64_split_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute_dft)(const X(plan) p, C *in, C *out); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \
R *ro, R *io); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_many_dft_r2c)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_r2c)(int rank, const int *n, \
R *in, C *out, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_r2c_2d)(int n0, int n1, \
R *in, C *out, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_r2c_3d)(int n0, int n1, \
int n2, \
R *in, C *out, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_many_dft_c2r)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_c2r)(int rank, const int *n, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_c2r_2d)(int n0, int n1, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_dft_c2r_3d)(int n0, int n1, \
int n2, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru_split_dft_r2c)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru_split_dft_c2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru64_dft_r2c)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru64_dft_c2r)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru64_split_dft_r2c)(int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru64_split_dft_c2r)(int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute_split_dft_r2c)(const X(plan) p, \
R *in, R *ro, R *io); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute_split_dft_c2r)(const X(plan) p, \
R *ri, R *ii, R *out); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_many_r2r)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_r2r)(int rank, const int *n, R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_r2r_1d)(int n, R *in, R *out, \
X(r2r_kind) kind, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \
X(r2r_kind) kind0, X(r2r_kind) kind1, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_r2r_3d)(int n0, int n1, int n2, \
R *in, R *out, X(r2r_kind) kind0, \
X(r2r_kind) kind1, X(r2r_kind) kind2, \
unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru_r2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) \
FFTW_CDECL X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN void \
FFTW_CDECL X(execute_r2r)(const X(plan) p, R *in, R *out); \
\
FFTW_EXTERN void \
FFTW_CDECL X(destroy_plan)(X(plan) p); \
\
FFTW_EXTERN void \
FFTW_CDECL X(forget_wisdom)(void); \
FFTW_EXTERN void \
FFTW_CDECL X(cleanup)(void); \
\
FFTW_EXTERN void \
FFTW_CDECL X(set_timelimit)(double t); \
\
FFTW_EXTERN void \
FFTW_CDECL X(plan_with_nthreads)(int nthreads); \
\
FFTW_EXTERN int \
FFTW_CDECL X(init_threads)(void); \
\
FFTW_EXTERN void \
FFTW_CDECL X(cleanup_threads)(void); \
\
FFTW_EXTERN void \
FFTW_CDECL X(make_planner_thread_safe)(void); \
\
FFTW_EXTERN int \
FFTW_CDECL X(export_wisdom_to_filename)(const char *filename); \
\
FFTW_EXTERN void \
FFTW_CDECL X(export_wisdom_to_file)(FILE *output_file); \
\
FFTW_EXTERN char * \
FFTW_CDECL X(export_wisdom_to_string)(void); \
\
FFTW_EXTERN void \
FFTW_CDECL X(export_wisdom)(X(write_char_func) write_char, \
void *data); \
FFTW_EXTERN int \
FFTW_CDECL X(import_system_wisdom)(void); \
\
FFTW_EXTERN int \
FFTW_CDECL X(import_wisdom_from_filename)(const char *filename); \
\
FFTW_EXTERN int \
FFTW_CDECL X(import_wisdom_from_file)(FILE *input_file); \
\
FFTW_EXTERN int \
FFTW_CDECL X(import_wisdom_from_string)(const char *input_string); \
\
FFTW_EXTERN int \
FFTW_CDECL X(import_wisdom)(X(read_char_func) read_char, void *data); \
\
FFTW_EXTERN void \
FFTW_CDECL X(fprint_plan)(const X(plan) p, FILE *output_file); \
\
FFTW_EXTERN void \
FFTW_CDECL X(print_plan)(const X(plan) p); \
\
FFTW_EXTERN char * \
FFTW_CDECL X(sprint_plan)(const X(plan) p); \
\
FFTW_EXTERN void * \
FFTW_CDECL X(malloc)(size_t n); \
\
FFTW_EXTERN R * \
FFTW_CDECL X(alloc_real)(size_t n); \
FFTW_EXTERN C * \
FFTW_CDECL X(alloc_complex)(size_t n); \
\
FFTW_EXTERN void \
FFTW_CDECL X(free)(void *p); \
\
FFTW_EXTERN void \
FFTW_CDECL X(flops)(const X(plan) p, \
double *add, double *mul, double *fmas); \
FFTW_EXTERN double \
FFTW_CDECL X(estimate_cost)(const X(plan) p); \
\
FFTW_EXTERN double \
FFTW_CDECL X(cost)(const X(plan) p); \
\
FFTW_EXTERN int \
FFTW_CDECL X(alignment_of)(R *p); \
\
FFTW_EXTERN const char X(version)[]; \
FFTW_EXTERN const char X(cc)[]; \
FFTW_EXTERN const char X(codelet_optim)[];
@ -350,6 +458,23 @@ FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex)
FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
/* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
&& !(defined(__ICC) || defined(__INTEL_COMPILER) || defined(__CUDACC__) || defined(__PGI)) \
&& (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
# if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
/* note: __float128 is a typedef, which is not supported with the _Complex
keyword in gcc, so instead we use this ugly __attribute__ version.
However, we can't simply pass the __attribute__ version to
FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer
types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */
# undef FFTW_DEFINE_COMPLEX
# define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C
# endif
FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex)
#endif
#define FFTW_FORWARD (-1)
#define FFTW_BACKWARD (+1)
@ -364,6 +489,7 @@ FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
#define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */
#define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */
#define FFTW_ESTIMATE (1U << 6)
#define FFTW_WISDOM_ONLY (1U << 21)
/* undocumented beyond-guru flags */
#define FFTW_ESTIMATE_PATIENT (1U << 7)
@ -380,7 +506,6 @@ FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
#define FFTW_NO_SLOW (1U << 18)
#define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19)
#define FFTW_ALLOW_PRUNING (1U << 20)
#define FFTW_WISDOM_ONLY (1U << 21)
#ifdef __cplusplus
} /* extern "C" */

View File

@ -140,6 +140,7 @@ void FMDemod (FMD fm)
do_IIR_HPF_2P(fm->squelch_HPF);
for (i = 0; i < CXBsize (fm->squelch_obuf); i++)
{
/////Noise Squelch Detector
@ -149,22 +150,32 @@ void FMDemod (FMD fm)
if(fm->squelch_muted) //muted
{
if(fm->squelch_filter < fm->squelch_threshold_unmute ) fm->squelch_muted = FALSE;
if (fm->squelch_filter < fm->squelch_threshold_unmute)
{
fm->squelch_muted = FALSE; // ke9ns add: see update.c to read squelchbreak
}
else CXBreal(fm->obuf, i) = (REAL)(rand()%3 - 1) * 1e-16f;
if(fm->squelch_strong_timer > 0) fm->squelch_strong_timer--;
}
else //unmuted
else //unmuted ke9ns: squelch break here?
{
if(fm->squelch_filter < fm->squelch_threshold_strong) //strong signal
{
fm->squelch_strong_timer = fm->squelch_strong_timer_hang;
fm->squelch_weak_timer = 0;
}
else if(fm->squelch_filter < fm->squelch_threshold_weak) //weak signal
{
if(fm->squelch_strong_timer == 0)
fm->squelch_weak_timer = fm->squelch_weak_timer_hang;
else
@ -172,6 +183,8 @@ void FMDemod (FMD fm)
}
else //no signal?
{
if(fm->squelch_weak_timer > 0)
fm->squelch_weak_timer--;
else
@ -190,7 +203,8 @@ void FMDemod (FMD fm)
// fprintf(stderr, "filter: %f, thresh: %3f, muted: %d\n", fm->squelch_filter, fm->squelch_threshold_weak, fm->squelch_muted);
// fflush(stderr);
//}
}
} // for (i = 0; i < CXBsize (fm->squelch_obuf); i++)
if (fm->deviation == FMDataDeviation) // ke9ns add
{
@ -215,6 +229,9 @@ void FMDemod (FMD fm)
} // FMDemod
FMD
newFMD (REAL samprate,
REAL f_initial,

View File

@ -33,8 +33,7 @@ Bridgewater, NJ 08807
#include <common.h>
NB
new_noiseblanker (CXB sigbuf, REAL threshold)
NB new_noiseblanker (CXB sigbuf, REAL threshold)
{
NB nb = (NB) safealloc (1, sizeof (nbstate), "new nbstate");
nb->sigbuf = sigbuf;
@ -47,8 +46,7 @@ new_noiseblanker (CXB sigbuf, REAL threshold)
return nb;
}
void
del_nb (NB nb)
void del_nb (NB nb)
{
if (nb)
{
@ -56,40 +54,46 @@ del_nb (NB nb)
}
}
void
noiseblanker (NB nb)
void noiseblanker (NB nb)
{
int i;
for (i = 0; i < CXBsize (nb->sigbuf); i++)
int i;
for (i = 0; i < CXBsize (nb->sigbuf); i++)
{
REAL cmag = Cmag (CXBdata (nb->sigbuf, i));
REAL cmag = Cmag (CXBdata (nb->sigbuf, i)); // Cmag = sqrt (sqr (z.re) + sqr (z.im))
nb->delay[nb->sigindex] = CXBdata (nb->sigbuf, i);
nb->average_mag = (REAL) (0.999 * (nb->average_mag) + 0.001 * cmag);
if ((nb->hangtime == 0) && (cmag > (nb->threshold * nb->average_mag)))
nb->hangtime = 7;
{
nb->hangtime = 7;
}
if (nb->hangtime > 0)
{
CXBdata (nb->sigbuf, i) = Cmplx (0.0, 0.0);
nb->hangtime--;
}
{
CXBdata (nb->sigbuf, i) = Cmplx (0.0, 0.0);
nb->hangtime--;
}
else
CXBdata (nb->sigbuf, i) = nb->delay[nb->delayindex];
{
CXBdata(nb->sigbuf, i) = nb->delay[nb->delayindex];
}
nb->sigindex = (nb->sigindex + 7) & 7;
nb->delayindex = (nb->delayindex + 7) & 7;
}
} // for loop
}
void
SDROMnoiseblanker (NB nb)
void SDROMnoiseblanker (NB nb)
{
int i;
for (i = 0; i < CXBsize (nb->sigbuf); i++)
{
REAL cmag = Cmag (CXBdata (nb->sigbuf, i));
nb->average_sig = Cadd (Cscl (nb->average_sig, 0.75),
Cscl (CXBdata (nb->sigbuf, i), 0.25));
nb->average_sig = Cadd (Cscl (nb->average_sig, 0.75), Cscl (CXBdata (nb->sigbuf, i), 0.25));
nb->average_mag = (REAL) (0.999 * (nb->average_mag) + 0.001 * cmag);
if (cmag > (nb->threshold * nb->average_mag))
CXBdata (nb->sigbuf, i) = nb->average_sig;
{
CXBdata(nb->sigbuf, i) = nb->average_sig;
}
}
}

View File

@ -46,7 +46,7 @@ typedef struct _nbstate
COMPLEX delay[8];
int delayindex;
int sigindex;
int hangtime;
int hangtime;
} *NB, nbstate;
extern NB new_noiseblanker (CXB sigbuf, REAL threshold);

View File

@ -1050,38 +1050,32 @@ do_rx_post (int k, unsigned int thread)
/* demod processing */
PRIVATE void
do_rx_SBCW (int k, unsigned int thread)
PRIVATE void do_rx_SBCW (int k, unsigned int thread)
{
}
PRIVATE void
do_rx_AM (int k, unsigned int thread)
PRIVATE void do_rx_AM (int k, unsigned int thread)
{
AMDemod (rx[thread][k].am.gen);
}
PRIVATE void
do_rx_FM (int k, unsigned int thread)
PRIVATE void do_rx_FM (int k, unsigned int thread)
{
FMDemod (rx[thread][k].fm.gen);
}
PRIVATE void
do_rx_DRM (int k, unsigned int thread)
PRIVATE void do_rx_DRM (int k, unsigned int thread)
{
}
PRIVATE void
do_rx_SPEC (int k, unsigned int thread)
PRIVATE void do_rx_SPEC (int k, unsigned int thread)
{
}
PRIVATE void
do_rx_NIL (int k, unsigned int thread)
PRIVATE void do_rx_NIL (int k, unsigned int thread)
{
int i, n = min (CXBhave (rx[thread][k].buf.i), uni[thread].buflen);
for (i = 0; i < n; i++)
@ -1090,8 +1084,7 @@ do_rx_NIL (int k, unsigned int thread)
/* overall dispatch for RX processing */
void
dump_buf (const char* filename, CXB buf)
void dump_buf (const char* filename, CXB buf)
{
int n = CXBsize(buf);
int i = 0;
@ -1160,8 +1153,7 @@ dump_buf (const char* filename, CXB buf)
writer.Flush(); // write the file*/
}
PRIVATE void
do_rx (int k, unsigned int thread)
PRIVATE void do_rx (int k, unsigned int thread)
{
do_rx_pre (k, thread);
switch (rx[thread][k].mode)

View File

@ -198,7 +198,7 @@ extern struct _rx
struct
{
AMD gen;
AMD gen; //am_demod.h ADDDesc
} am;
struct

View File

@ -652,8 +652,7 @@ SetANF (unsigned int thread, unsigned subrx, BOOLEAN setit)
}
DttSP_EXP void
SetANFvals (unsigned int thread, unsigned subrx, int taps, int delay, double gain, double leakage)
DttSP_EXP void SetANFvals (unsigned int thread, unsigned subrx, int taps, int delay, double gain, double leakage)
{
sem_wait(&top[thread].sync.upd.sem);
@ -667,8 +666,7 @@ SetANFvals (unsigned int thread, unsigned subrx, int taps, int delay, double gai
sem_post(&top[thread].sync.upd.sem);
}
DttSP_EXP void
SetNB (unsigned int thread, unsigned subrx, BOOLEAN setit)
DttSP_EXP void SetNB (unsigned int thread, unsigned subrx, BOOLEAN setit) // ke9ns: NB OFF/ON here
{
sem_wait(&top[thread].sync.upd.sem);
@ -677,8 +675,7 @@ SetNB (unsigned int thread, unsigned subrx, BOOLEAN setit)
sem_post(&top[thread].sync.upd.sem);
}
DttSP_EXP void
SetNBvals (unsigned int thread, unsigned subrx, double threshold)
DttSP_EXP void SetNBvals (unsigned int thread, unsigned subrx, double threshold) // ke9ns: threshold value here
{
sem_wait(&top[thread].sync.upd.sem);
@ -687,8 +684,7 @@ SetNBvals (unsigned int thread, unsigned subrx, double threshold)
sem_post(&top[thread].sync.upd.sem);
}
DttSP_EXP void
SetSDROM (unsigned int thread, unsigned subrx, BOOLEAN setit)
DttSP_EXP void SetSDROM (unsigned int thread, unsigned subrx, BOOLEAN setit)
{
sem_wait(&top[thread].sync.upd.sem);
@ -697,8 +693,7 @@ SetSDROM (unsigned int thread, unsigned subrx, BOOLEAN setit)
sem_post(&top[thread].sync.upd.sem);
}
DttSP_EXP void
SetSDROMvals (unsigned int thread, unsigned subrx, double threshold)
DttSP_EXP void SetSDROMvals (unsigned int thread, unsigned subrx, double threshold)
{
sem_wait(&top[thread].sync.upd.sem);
@ -990,18 +985,16 @@ SetFixedAGC (unsigned int thread, unsigned int subrx, double fixed_agc)
sem_post(&top[thread].sync.upd.sem);
}
DttSP_EXP void
SetRXAGCTop (unsigned int thread, unsigned int subrx, double max_agc)
DttSP_EXP void SetRXAGCTop (unsigned int thread, unsigned int subrx, double max_agc)
{
sem_wait(&top[thread].sync.upd.sem);
rx[thread][subrx].dttspagc.gen->gain.top =
max(rx[thread][subrx].dttspagc.gen->gain.bottom,dB2lin((REAL)max_agc));
rx[thread][subrx].dttspagc.gen->gain.top = max(rx[thread][subrx].dttspagc.gen->gain.bottom,dB2lin((REAL)max_agc));
rx[thread][subrx].dttspagc.gen->hangindex = 0;
sem_post(&top[thread].sync.upd.sem);
}
//==============================================================
// ke9ns ?? find the real carrier for SAM mode ??
// ke9ns: get SAM PLL value parameters a,b
DttSP_EXP void GetSAMPLLvals(int thread, int subrx, REAL *alpha, REAL *beta)
{
sem_wait(&top[thread].sync.upd.sem);
@ -1011,7 +1004,7 @@ DttSP_EXP void GetSAMPLLvals(int thread, int subrx, REAL *alpha, REAL *beta)
}
//==============================================================
// ke9ns ?? find the real carrier for SAM mode ??
// ke9ns: set SAM PLL value parameters a,b
DttSP_EXP void SetSAMPLLvals(int thread, int subrx, REAL alpha, REAL beta)
{
sem_wait(&top[thread].sync.upd.sem);
@ -1024,15 +1017,27 @@ DttSP_EXP void SetSAMPLLvals(int thread, int subrx, REAL alpha, REAL beta)
}
//==============================================================
// ke9ns ?? find the real carrier for SAM mode ??
// ke9ns: get SAM Frequency (get the PLL input signal at which the signal will be phase locked with the reference freq)??? (ie offset) how far from phase lock are you?
DttSP_EXP void GetSAMFreq(int thread, int subrx, REAL *freq)
{
sem_wait(&top[thread].sync.upd.sem);
*freq = rx[thread][subrx].am.gen->pll.freq.f;
*freq = rx[thread][subrx].am.gen -> pll.freq.f; // _rx[0][0].am.gne = sdrexport.h sdrexport.c pll.freq.f = (Floating part of Freq of the PLL) am_demod.h
sem_post(&top[thread].sync.upd.sem);
}
//==============================================================
// ke9ns add: get squelch break, true = Squelch, false = break
DttSP_EXP void GetFMSquelchBreak(int thread, int subrx, boolean *fmsquelchbreak)
{
sem_wait(&top[thread].sync.upd.sem);
*fmsquelchbreak= rx[thread][subrx].fm.gen->squelch_muted; // _rx[0][0].am.gne = sdrexport.h sdrexport.c pll.freq.f = (Floating part of Freq of the PLL) am_demod.h
sem_post(&top[thread].sync.upd.sem);
}

View File

@ -155,6 +155,5 @@
<ClCompile Include="EventsHelper.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@ -23,6 +23,8 @@
<Filter>Resource Files</Filter>
</None>
<None Include="ClassDiagram1.cd" />
<None Include="@(NativeLibs)" />
<None Include="@(NativeLibs)" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="app.rc">