Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
Hotfix for missing PTT for Sabre and Info status in TS
  • Loading branch information
Ciaran Fisher committed Mar 25, 2016
1 parent d5d0d3d commit dc81f92
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,5 @@ FakesAssemblies/

# Visual Studio 6 workspace options file
*.opt

DCS-SimpleRadio.VC.opendb
2 changes: 1 addition & 1 deletion Installer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public partial class MainWindow
{
const string REG_PATH = "HKEY_CURRENT_USER\\SOFTWARE\\DCS-SimpleRadio";

const string version = "1.4.1";
const string version = "1.4.2";

string currentPath;
string currentDirectory;
Expand Down
22 changes: 19 additions & 3 deletions Plugin/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static SimpleRadio::Plugin plugin;
namespace SimpleRadio
{
const char* Plugin::NAME = "DCS-SimpleRadio";
const char* Plugin::VERSION = "1.4.1";
const char* Plugin::VERSION = "1.4.2";
const char* Plugin::AUTHOR = "Ciribob - GitHub.com/ciribob";
const char* Plugin::DESCRIPTION = "DCS-SimpleRadio ";
const char* Plugin::COMMAND_KEYWORD = "sr";
Expand Down Expand Up @@ -275,7 +275,7 @@ namespace SimpleRadio

//do we have any valid update at all and when was it last valid?
//clean up if more than 15 seconds have passed
if (clientInfoData.lastUpdate > 5000ull && clientInfoData.lastUpdate < 15000ull)
if (clientInfoData.lastUpdate > 5000ull && (GetTickCount64() - clientInfoData.lastUpdate) < 15000ull)
{
const double MHZ = 1000000;

Expand Down Expand Up @@ -352,7 +352,23 @@ namespace SimpleRadio
}
else
{
return "\nStatus: [B]Not in game or not in Aircraft[/B]";
if (myID == clientId)
{
if (this->disablePlugin)
{
return "Status: Plugin [B][color=red]DISABLED[/color][/B]";
}
else
{
return "Status: [B]Not in game or not in Aircraft[/B]";
}

}
else
{
return "Status: [B]Not in game or not in Aircraft[/B]";
}

}
}
catch (...)
Expand Down
Binary file modified Plugin/Plugin.rc
Binary file not shown.
4 changes: 2 additions & 2 deletions RadioGui/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.1.0")]
[assembly: AssemblyFileVersion("1.4.1.0")]
[assembly: AssemblyVersion("1.4.2.0")]
[assembly: AssemblyFileVersion("1.4.2.0")]
13 changes: 11 additions & 2 deletions Scripts/DCS-SimpleRadio/SimpleRadioInit.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Version 1.4.1
-- Version 1.4.2
-- Special thanks to Cap. Zeen, Tarres and Splash for all the help
-- with getting the radio information :)
SR = {}
Expand Down Expand Up @@ -247,7 +247,7 @@ function SR.exportRadioSU25(_data)
_data.radios[2].modulation = 1
_data.radios[2].volume = 1.0
_data.radios[2].freqMin = 20*1000000
_data.radios[2].freqMax = 60*1000000
_data.radios[2].freqMax = 59.975*1000000

_data.radios[3].name = "No radio"
_data.radios[3].frequency = 0
Expand Down Expand Up @@ -546,6 +546,15 @@ function SR.exportRadioF86Sabre(_data)
_data.radios[1].secondaryFrequency = 243.0*1000000
end

if SR.enableInternalPTT then
-- Check PTT
if(SR.getButtonPosition(213)) > 0.5 then
_data.selected = 0
else
_data.selected = -1
end
end

return _data;
end

Expand Down

0 comments on commit dc81f92

Please sign in to comment.