diff --git a/01_DCS/Hooks/Perun.lua b/01_DCS/Hooks/Perun.lua index 5e43a27..d9cbc10 100644 --- a/01_DCS/Hooks/Perun.lua +++ b/01_DCS/Hooks/Perun.lua @@ -9,9 +9,9 @@ package.cpath = package.cpath..";"..lfs.currentdir().."/LuaSocket/?.dll" Perun.RefreshStatus = 15 -- (int) [default: 60] Base refresh rate in seconds to send status update Perun.RefreshMission = 60 -- (int) [default: 120] Refresh rate in seconds to send mission information -Perun.TCPTargetPort = 48622 -- (int) [default: 48621] TCP port to send data to +Perun.TCPTargetPort = 48620 -- (int) [default: 48621] TCP port to send data to Perun.TCPPerunHost = "localhost" -- (string) [default: "localhost"] IP adress of the Perun instance or "localhost" -Perun.Instance = 2 -- (int) [default: 1] Id number of instance (if multiple DCS instances are to run at the same PC) +Perun.Instance = 1 -- (int) [default: 1] Id number of instance (if multiple DCS instances are to run at the same PC) Perun.JsonStatusLocation = "Scripts\\Json\\" -- (string) [default: "Scripts\\Json\\"] Folder relative do user's SaveGames DCS folder -> status file updated each RefreshMission Perun.MissionStartNoDeathWindow = 300 -- (int) [default: 300] Number of secounds after mission start when death of the pilot will not go to statistics, shall avoid death penalty during spawning DCS bugs Perun.DebugMode = 2 -- (int) [0 (default),1,2] Value greater than 0 will display Perun information in DCS log file, values: 1 - minimal verbose, 2 - all log information will be logged @@ -751,7 +751,7 @@ Perun.onSimulationFrame = function() end -- Calucalate time on slot per each of players - if _now > Perun.lastTimer + 5 then + if _now > Perun.lastTimer + 60 then Perun.lastTimer = _now; local _all_players = net.get_player_list() for PlayerIDIndex, _playerID in ipairs(_all_players) do diff --git a/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs b/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs index b6aea20..5880617 100644 --- a/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs +++ b/02_Windows_App/Perun_v1/02_Forms/form_Main.Designer.cs @@ -157,11 +157,11 @@ // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(41, 48); + this.label6.Location = new System.Drawing.Point(19, 48); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(59, 13); + this.label6.Size = new System.Drawing.Size(81, 13); this.label6.TabIndex = 9; - this.label6.Text = "Server port"; + this.label6.Text = "MySQL DB port"; // // con_txt_mysql_port // @@ -198,20 +198,20 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(47, 74); + this.label2.Location = new System.Drawing.Point(18, 74); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(53, 13); + this.label2.Size = new System.Drawing.Size(82, 13); this.label2.TabIndex = 4; - this.label2.Text = "Database"; + this.label2.Text = "Database name"; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(22, 22); + this.label1.Location = new System.Drawing.Point(3, 22); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(78, 13); + this.label1.Size = new System.Drawing.Size(100, 13); this.label1.TabIndex = 3; - this.label1.Text = "Server address"; + this.label1.Text = "MySQL DB address"; // // con_txt_mysql_database // @@ -359,11 +359,11 @@ // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(41, 45); + this.label8.Location = new System.Drawing.Point(7, 45); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(62, 13); + this.label8.Size = new System.Drawing.Size(93, 13); this.label8.TabIndex = 12; - this.label8.Text = "Instance ID"; + this.label8.Text = "Perun Instance ID"; // // con_txt_dcs_instance // @@ -375,11 +375,11 @@ // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(41, 19); + this.label7.Location = new System.Drawing.Point(44, 19); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(59, 13); + this.label7.Size = new System.Drawing.Size(56, 13); this.label7.TabIndex = 10; - this.label7.Text = "Server port"; + this.label7.Text = "Perun port"; // // con_txt_dcs_server_port // diff --git a/03_MySQL/m1081_perun.sql b/03_MySQL/m1081_perun.sql index c800cf1..1d53df4 100644 --- a/03_MySQL/m1081_perun.sql +++ b/03_MySQL/m1081_perun.sql @@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS `pe_Config` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `pe_Config` (`pe_Config_id`, `pe_Config_payload`) VALUES -(1, 'v0.9.2'); +(1, 'v0.9.1'); DROP TABLE IF EXISTS `pe_DataMissionHashes`; CREATE TABLE IF NOT EXISTS `pe_DataMissionHashes` ( @@ -28,7 +28,7 @@ CREATE TABLE IF NOT EXISTS `pe_DataMissionHashes` ( PRIMARY KEY (`pe_DataMissionHashes_id`), UNIQUE KEY `UNIQUE_hash` (`pe_DataMissionHashes_hash`), KEY `pe_DataMissionHashes_instance` (`pe_DataMissionHashes_instance`) -) ENGINE=InnoDB AUTO_INCREMENT=7344 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_DataPlayers`; CREATE TABLE IF NOT EXISTS `pe_DataPlayers` ( @@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS `pe_DataPlayers` ( `pe_DataPlayers_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`pe_DataPlayers_id`), UNIQUE KEY `UNIQUE_UCID` (`pe_DataPlayers_ucid`) -) ENGINE=InnoDB AUTO_INCREMENT=230 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_DataRaw`; CREATE TABLE IF NOT EXISTS `pe_DataRaw` ( @@ -59,7 +59,7 @@ CREATE TABLE IF NOT EXISTS `pe_DataTypes` ( `pe_DataTypes_update` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`pe_DataTypes_id`), UNIQUE KEY `UNIQUE_TYPE_NAME` (`pe_DataTypes_name`) -) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogChat`; CREATE TABLE IF NOT EXISTS `pe_LogChat` ( @@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogChat` ( KEY `pe_LogChat_playerid` (`pe_LogChat_playerid`), KEY `pe_LogChat_datetime` (`pe_LogChat_datetime`), KEY `pe_LogChat_all` (`pe_LogChat_all`) -) ENGINE=InnoDB AUTO_INCREMENT=25202 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogEvent`; CREATE TABLE IF NOT EXISTS `pe_LogEvent` ( @@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogEvent` ( KEY `pe_LogEvent_missionhash_id` (`pe_LogEvent_missionhash_id`), KEY `pe_LogEvent_datetime` (`pe_LogEvent_datetime`), KEY `pe_LogEvent_type_2` (`pe_LogEvent_type`) -) ENGINE=InnoDB AUTO_INCREMENT=104565 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogLogins`; CREATE TABLE IF NOT EXISTS `pe_LogLogins` ( @@ -104,7 +104,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogLogins` ( KEY `pe_LogLogins_playerid` (`pe_LogLogins_playerid`), KEY `pe_LogLogins_datetime` (`pe_LogLogins_datetime`), KEY `pe_LogLogins_instance` (`pe_LogLogins_instance`) -) ENGINE=InnoDB AUTO_INCREMENT=11959 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `pe_LogStats`; CREATE TABLE IF NOT EXISTS `pe_LogStats` ( @@ -148,7 +148,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogStats` ( KEY `pe_LogStats_masterslot` (`pe_LogStats_masterslot`), KEY `pe_LogStats_mstatus` (`pe_LogStats_mstatus`), KEY `pe_LogStats_seat` (`pe_LogStats_seat`) -) ENGINE=InnoDB AUTO_INCREMENT=10723 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TRIGGER IF EXISTS `pe_LogStats_UPDATE`; DELIMITER $$ CREATE TRIGGER `pe_LogStats_UPDATE` BEFORE UPDATE ON `pe_LogStats` FOR EACH ROW BEGIN