Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Release cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sam210723 committed Feb 16, 2019
1 parent 46b6af9 commit c1bae5a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
14 changes: 0 additions & 14 deletions moRFctrl/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion moRFctrl/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ public void StartSweep()
/// </summary>
public void StopSweep()
{
//TODO: Close CSV
//TODO: Safe thread termination (set flag, !abort)
Program.SweepThread.Abort();
Program.GQRXClass.Disconnect();
CSV.Close(Program.SweepClass.CSVFile); //TODO: unref except

EnableSweepUI();
SweepProgress = 0;
Expand Down Expand Up @@ -775,6 +776,7 @@ private void linkSweepOutFile_LinkClicked(object sender, LinkLabelLinkClickedEve
linkSweepOutFile.Text = Path.GetFileName(CSVFilePath);

EnableSaveSettings();
btnSaveSettings_Click(null, null);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion moRFctrl/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static class Program
public static Thread GQRXThread;

// Globals
public static bool debugOutput = true;
public static bool debugOutput = false;
static bool isExiting = false;

/// <summary>
Expand Down
8 changes: 3 additions & 5 deletions moRFctrl/gqrx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void Send(string cmd, string data)
/// </summary>
public ulong GetFrequency()
{
Console.WriteLine("GFREQ \"" + Get(CMD_FREQUENCY.ToLower() + "\"").Result);
Console.WriteLine("GFREQ \"" + Get(CMD_FREQUENCY.ToLower() + "\""));
return ulong.Parse("0") * 100;
}

Expand All @@ -143,13 +143,13 @@ public ulong GetFrequency()
/// <returns>Carrier strength as string</returns>
public string GetStrength()
{
return Get(CMD_STRENGTH).Result;
return Get(CMD_STRENGTH);
}

/// <summary>
/// Get Gqrx parameter
/// </summary>
private async Task<string> Get(string cmd)
private string Get(string cmd)
{
if (IsConnected)
{
Expand All @@ -158,8 +158,6 @@ private async Task<string> Get(string cmd)
byte[] recBuf = new byte[64];
string responseData = "";

//await tcpStream.FlushAsync();

try
{
int bytes = tcpStream.Read(recBuf, 0, recBuf.Length);
Expand Down

0 comments on commit c1bae5a

Please sign in to comment.