Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
spectrum6000 committed Apr 26, 2024
1 parent 3adbc68 commit dc818bc
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 35 deletions.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,31 @@ Full source code. SDR# v.1716 compatible.

- .Net v.4.6
- MS Visual Studio 2015
- SDR# v.1716 SDK
- SDR# v.1716 SDK


## How to build

- clone
- make **Debug** and/or **Release** directories
- dowbload SDR# v.1716 SDK, unpack to **Debug** and/or **Release**
- open FobosSDRPlugin.sln
- Build and run (all dependencies are portable)

## How to install

- copy fobos.dll and SDRSharp.FobosSDR.dll to ypur SDR# directory
- add magic line from **magic line.txt** to **FrontEnds.xml** file
- run SDRSharp.exe

## How it looks like

<img src="./showimg/Untitled001.png" scale="50%"/><br />
<img src="./showimg/Untitled002.png" scale="50%"/><br />
<img src="./showimg/Untitled003.png" scale="50%"/><br />

## What is actually Fobos SDR

For more info see the main product page

https://rigexpert.com/en/products/kits-en/fobos-sdr/
2 changes: 1 addition & 1 deletion SDRSharp.FobosSDR/FobosSDRControllerDialog.Designer.cs

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

83 changes: 53 additions & 30 deletions SDRSharp.FobosSDR/FobosSDRControllerDialog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using SDRSharp.Radio;
//==============================================================================
// _____ __ _______
// / __ \ /_/ / ____/ __
// / /_ / / _ ____ / /__ __ __ ____ ____ ____ _/ /_
// / __ / / / / _ \ / ___/ \ \/ / / __ \ / __ \ / ___\ / _/
// / /\ \ / / / /_/ / / /___ / / / /_/ / / ___/ / / / /_
// /_ / \_\ /_/ \__ / /______/ /_/\_\ / ____/ \____/ /_/ \___/
// /______/ /_/
// Fobos SDR API library
// C# .Net API wrapper for SDR# plugin
// Copyright (C) Rig Expert Ukraine Ltd.
// 2024.04.04
// 2024.04.25 - update
//==============================================================================
using SDRSharp.Radio;
using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand All @@ -18,8 +32,6 @@ public partial class FobosSDRControllerDialog : Form
public FobosSDRControllerDialog(FobosSDRIO owner)
{

//ConsoleHelper.CreateConsole();

try
{
InitializeComponent();
Expand Down Expand Up @@ -81,7 +93,7 @@ private void close_Click(object sender, EventArgs e)
Close();
}

private void EOTAControllerDialog_FormClosing(object sender, FormClosingEventArgs e)
private void FobosSDRControllerDialog_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
Hide();
Expand Down Expand Up @@ -136,23 +148,23 @@ private void FobosSDRControllerDialog_VisibleChanged(object sender, EventArgs e)
{
if (Visible)
{
samplerateComboBox.Enabled = !_owner.Device.IsStreaming;
deviceComboBox.Enabled = !_owner.Device.IsStreaming;

if (!_owner.Device.IsStreaming)
if (_owner.IsOpen)
{
var devices = _owner.GetActiveDevices();
deviceComboBox.Items.Clear();
deviceComboBox.Items.AddRange(devices);

for (var i = 0; i < devices.Length; i++)
if (!_owner.Device.IsStreaming)
{
if (i == _owner.Device.Index)
var devices = _owner.GetActiveDevices();
deviceComboBox.Items.Clear();
deviceComboBox.Items.AddRange(devices);

for (var i = 0; i < devices.Length; i++)
{
_initialized = false;
deviceComboBox.SelectedIndex = i;
_initialized = true;
break;
if (i == _owner.Device.Index)
{
_initialized = false;
deviceComboBox.SelectedIndex = i;
_initialized = true;
break;
}
}
}
}
Expand All @@ -177,10 +189,6 @@ private void TrackBar_VGA_Scroll(object sender, EventArgs e)
}
}

private void CheckBox_DirectSampling_CheckedChanged(object sender, EventArgs e)
{
}

private void CheckBox_ExternalClock_CheckedChanged(object sender, EventArgs e)
{
if (_owner != null)
Expand All @@ -194,15 +202,30 @@ private void timer1_Tick(object sender, EventArgs e)
{
if (_owner != null)
{
samplerateComboBox.Enabled = !_owner.IsStreaming;
deviceComboBox.Enabled = !_owner.IsStreaming;
TextBox_CenterFrequency.Enabled = (_owner.SamplingMode == 0) || (_owner.SamplingMode == 1);
button_SetCenterFrequency.Enabled = (_owner.SamplingMode == 0) || (_owner.SamplingMode == 1);
TrackBar_LNA.Enabled = (_owner.SamplingMode == 0);
TrackBar_VGA.Enabled = (_owner.SamplingMode == 0);
if ((!TextBox_CenterFrequency.Focused) && (!this.Focused) && (!button_SetCenterFrequency.Focused))
if (_owner.IsOpen)
{
ComboBox_Input.Enabled = true;
samplerateComboBox.Enabled = !_owner.IsStreaming;
deviceComboBox.Enabled = !_owner.IsStreaming;
TextBox_CenterFrequency.Enabled = (_owner.SamplingMode == 0) || (_owner.SamplingMode == 1);
button_SetCenterFrequency.Enabled = (_owner.SamplingMode == 0) || (_owner.SamplingMode == 1);
TrackBar_LNA.Enabled = (_owner.SamplingMode == 0);
TrackBar_VGA.Enabled = (_owner.SamplingMode == 0);
if ((!TextBox_CenterFrequency.Focused) && (!this.Focused) && (!button_SetCenterFrequency.Focused))
{
TextBox_CenterFrequency.Text = Convert.ToString(_owner.Frequency);
}
CheckBox_ExternalClock.Enabled = true;
}
else
{
TextBox_CenterFrequency.Text = Convert.ToString(_owner.Frequency);
ComboBox_Input.Enabled = false;
samplerateComboBox.Enabled = false;
TextBox_CenterFrequency.Enabled = false;
button_SetCenterFrequency.Enabled = false;
TrackBar_LNA.Enabled = false;
TrackBar_VGA.Enabled = false;
CheckBox_ExternalClock.Enabled = false;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions SDRSharp.FobosSDR/FobosSDRDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// C# .Net API wrapper for SDR# plugin
// Copyright (C) Rig Expert Ukraine Ltd.
// 2024.04.04
// 2024.04.25 - update
//==============================================================================
using SDRSharp.Radio;
using System;
Expand Down
15 changes: 13 additions & 2 deletions SDRSharp.FobosSDR/FobosSDRIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public unsafe class FobosSDRIO : IFrontendController, IIQStreamController, IFloa
//======================================================================
public FobosSDRIO()
{
//ConsoleHelper.CreateConsole();
// ConsoleHelper.CreateConsole();
_index = -1;
_gui = new FobosSDRControllerDialog(this);
}
Expand Down Expand Up @@ -159,9 +159,11 @@ public void Open()
public void ShowSettingGUI(IWin32Window parent)
{
_main = (SDRSharp.MainForm)parent;
Console.WriteLine(parent.ToString());
Console.WriteLine("parent: "+parent.ToString());
UpdateMainForm();
Console.WriteLine("show");
_gui.Show();
Console.WriteLine("ok");
}
//======================================================================
public void HideSettingGUI()
Expand Down Expand Up @@ -371,6 +373,15 @@ private void SamplesAvailableEvent(object sender, SamplesAvailableEventArgs e)
_callback(this, e.Buffer, e.Length);
}
//======================================================================
public bool IsOpen
{
get
{
return (_dev != null);
}
}
//======================================================================

public bool IsStreaming
{
get
Expand Down
2 changes: 1 addition & 1 deletion SDRSharp.FobosSDR/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SDRSharp.FobosSDR")]
[assembly: AssemblyCopyright("Copyright © RigExpert ltd. 2024")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
1 change: 1 addition & 0 deletions magic line.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add key="Fobos SDR" value="SDRSharp.FobosSDR.FobosSDRIO,SDRSharp.FobosSDR" />
Binary file added showimg/Untitled001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showimg/Untitled002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showimg/Untitled003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc818bc

Please sign in to comment.