ajustes no controle direcional autonomo

This commit is contained in:
Diego Freitas 2025-03-28 13:58:07 -03:00
parent 9d8445468d
commit 3cfb100c86
51 changed files with 2154 additions and 1814 deletions

Binary file not shown.

View File

@ -451,9 +451,11 @@
<Compile Include="Models\MKS057DModel.cs" />
<Compile Include="Models\ModbusModel.cs" />
<Compile Include="Models\Modules\AtuadorModel.cs" />
<Compile Include="Models\Modules\DirecionalModel.cs" />
<Compile Include="Models\Modules\DispositivoBaseModel.cs" />
<Compile Include="Models\Enums.cs" />
<Compile Include="Models\GeneralJoystick.cs" />
<Compile Include="Models\Modules\MovimentacaoModel.cs" />
<Compile Include="Models\Modules\MovimentacaoUnificadoModel.cs" />
<Compile Include="Models\Modules\PinoutModel.cs" />
<Compile Include="Models\Modules\SensoriamentoModel.cs" />
@ -462,7 +464,6 @@
<Compile Include="Models\MPCControllerSimple.cs" />
<Compile Include="Models\OAKCameraModel.cs" />
<Compile Include="Models\OIDModel.cs" />
<Compile Include="Models\Operacoes\OperacaoManualModel.cs" />
<Compile Include="Models\Operacoes\OperacaoMapaGPSModel.cs" />
<Compile Include="Models\Operacoes\OperacaoModel.cs" />
<Compile Include="Models\Operacoes\OperacaoParametrosModel.cs" />

View File

@ -209,6 +209,9 @@ namespace AgroBase.Forms.Operacoes
{
(bool sucesso, List<string> ruas) = await Variaveis.OperacaoEmAndamento.CarregarParametrizacaoOperacao(frmDialogo.pnlMapa, frmDialogo.lblMapaCarregado, path);
bool condicaoOperacaoCarregada() => Variaveis.OperacaoEmAndamento.Trajetoria?.CorredorAtual != null;
bool resultado = await FuncoesGlobais.AguardarCondicaoAsync(condicaoOperacaoCarregada, 5000, 200);
ruasSelecionadas = ruas;
foreach (var chb in fpnlInformacoes.Controls.OfType<CheckBox>())
@ -221,7 +224,7 @@ namespace AgroBase.Forms.Operacoes
txtModoOperacao.Text = Variaveis.OperacaoEmAndamento.Modo.ToString();
txtDescricao.Text = Variaveis.OperacaoEmAndamento.Descricao;
txtCriadoEm.Text = new FileInfo(path).CreationTime.ToString("dd/MM/yyyy HH:mm");
txtRuasPercorrer.Text = Variaveis.OperacaoEmAndamento.Mapa.RuasPercorrer.Count().ToString();
txtRuasPercorrer.Text = (Variaveis.OperacaoEmAndamento.Trajetoria?.Corredores?.Count() ?? 0).ToString();
txtDistanciaTotal.Text = (Variaveis.OperacaoEmAndamento.Trajetoria?.DistanciaTotal ?? 0).ToString("0.00");
string tempo = Variaveis.OperacaoEmAndamento.Trajetoria?.TempoEstimadoOperacao;
txtTempoEstimado.Text = tempo;

View File

@ -80,7 +80,7 @@ namespace AgroBase.Forms.Movimentacao
this.gpbAjustes = new System.Windows.Forms.GroupBox();
this.lblIP = new System.Windows.Forms.Label();
this.txtIP = new System.Windows.Forms.TextBox();
this.txtOffsetLeitura = new System.Windows.Forms.TextBox();
this.txtTorqueMaximo = new System.Windows.Forms.TextBox();
this.lblOffsetLeitura = new System.Windows.Forms.Label();
this.lblReducao = new System.Windows.Forms.Label();
this.nudReducao = new System.Windows.Forms.NumericUpDown();
@ -650,7 +650,7 @@ namespace AgroBase.Forms.Movimentacao
//
this.gpbAjustes.Controls.Add(this.lblIP);
this.gpbAjustes.Controls.Add(this.txtIP);
this.gpbAjustes.Controls.Add(this.txtOffsetLeitura);
this.gpbAjustes.Controls.Add(this.txtTorqueMaximo);
this.gpbAjustes.Controls.Add(this.lblOffsetLeitura);
this.gpbAjustes.Controls.Add(this.lblReducao);
this.gpbAjustes.Controls.Add(this.nudReducao);
@ -691,15 +691,15 @@ namespace AgroBase.Forms.Movimentacao
this.txtIP.TabIndex = 12;
this.txtIP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// txtOffsetLeitura
// txtTorqueMaximo
//
this.txtOffsetLeitura.Location = new System.Drawing.Point(191, 84);
this.txtOffsetLeitura.Margin = new System.Windows.Forms.Padding(2);
this.txtOffsetLeitura.Name = "txtOffsetLeitura";
this.txtOffsetLeitura.Size = new System.Drawing.Size(85, 20);
this.txtOffsetLeitura.TabIndex = 12;
this.txtOffsetLeitura.Text = "0,74";
this.txtOffsetLeitura.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtTorqueMaximo.Location = new System.Drawing.Point(191, 84);
this.txtTorqueMaximo.Margin = new System.Windows.Forms.Padding(2);
this.txtTorqueMaximo.Name = "txtTorqueMaximo";
this.txtTorqueMaximo.Size = new System.Drawing.Size(85, 20);
this.txtTorqueMaximo.TabIndex = 12;
this.txtTorqueMaximo.Text = "20";
this.txtTorqueMaximo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// lblOffsetLeitura
//
@ -707,9 +707,9 @@ namespace AgroBase.Forms.Movimentacao
this.lblOffsetLeitura.Location = new System.Drawing.Point(188, 67);
this.lblOffsetLeitura.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblOffsetLeitura.Name = "lblOffsetLeitura";
this.lblOffsetLeitura.Size = new System.Drawing.Size(87, 13);
this.lblOffsetLeitura.Size = new System.Drawing.Size(80, 13);
this.lblOffsetLeitura.TabIndex = 140;
this.lblOffsetLeitura.Text = "Offset Leitura (%)";
this.lblOffsetLeitura.Text = "Torque Max (A)";
//
// lblReducao
//
@ -955,7 +955,7 @@ namespace AgroBase.Forms.Movimentacao
private System.Windows.Forms.NumericUpDown nudNumPolos;
private System.Windows.Forms.ComboBox cmbTipoMovimento;
private System.Windows.Forms.Label lblTipoMovimento;
private System.Windows.Forms.TextBox txtOffsetLeitura;
private System.Windows.Forms.TextBox txtTorqueMaximo;
private System.Windows.Forms.Label lblOffsetLeitura;
private System.Windows.Forms.Label lblIP;
private System.Windows.Forms.TextBox txtIP;

View File

@ -67,7 +67,7 @@ namespace AgroBase.Forms.Movimentacao
nudNumPolos.Value = Modulo.MovMotor.NumeroPolos;
nudRampa.Value = Modulo.MovMotor.Rampa;
txtOffsetLeitura.Text = Modulo.MovMotor.OffsetLeitura.ToString();
txtTorqueMaximo.Text = Modulo.MovMotor.CorrenteTorqueMaximo.ToString();
TextBox txtEndereco = FuncoesGlobais.FindControlRecursive<TextBox>(gpbSentido, "txt" + Modulo.Modulo_ID + "Endereco");
txtEndereco.Text = Modulo.MovMotor.Endereco;
@ -126,7 +126,7 @@ namespace AgroBase.Forms.Movimentacao
Modulo.MovMotor.NumeroPolos = Convert.ToInt32(nudNumPolos.Value);
Modulo.MovMotor.Rampa = Convert.ToInt32(nudRampa.Value);
Modulo.MovMotor.OffsetLeitura = Convert.ToDouble(txtOffsetLeitura.Text);
Modulo.MovMotor.CorrenteTorqueMaximo = Convert.ToInt32(txtTorqueMaximo.Text);
TextBox txtEndereco = FuncoesGlobais.FindControlRecursive<TextBox>(gpbSentido, "txt" + Modulo.Modulo_ID + "Endereco");
Modulo.MovMotor.Endereco = txtEndereco.Text;

View File

@ -52,9 +52,6 @@
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea8 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend8 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea9 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend9 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmResultadosOperacao));
this.trbMomento = new System.Windows.Forms.TrackBar();
this.panel1 = new System.Windows.Forms.Panel();
@ -175,8 +172,6 @@
this.picDIR_EF = new System.Windows.Forms.PictureBox();
this.tabMovimentacao = new System.Windows.Forms.TabPage();
this.tabControl2 = new System.Windows.Forms.TabControl();
this.tabMovVelocidade = new System.Windows.Forms.TabPage();
this.chartMovVelocidade = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.tabMovTemperatura = new System.Windows.Forms.TabPage();
this.gpbMOV_Temperatura_Analise = new System.Windows.Forms.GroupBox();
this.txtMOV_Temperatura_Mediana = new System.Windows.Forms.TextBox();
@ -225,6 +220,9 @@
this.cmbMOV_Alimentacao_Filtro = new System.Windows.Forms.ComboBox();
this.label72 = new System.Windows.Forms.Label();
this.gpbMOV_Alimentacao_Analise = new System.Windows.Forms.GroupBox();
this.chbMOV_Alimentacao_Mediana = new System.Windows.Forms.CheckBox();
this.chbMOV_Alimentacao_Moda = new System.Windows.Forms.CheckBox();
this.chbMOV_Alimentacao_Media = new System.Windows.Forms.CheckBox();
this.txtMOV_Alimentacao_Mediana = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtMOV_Alimentacao_Media = new System.Windows.Forms.TextBox();
@ -432,6 +430,12 @@
this.chartCameras = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.panel6 = new System.Windows.Forms.Panel();
this.pnlInformacoesOperacao = new System.Windows.Forms.Panel();
this.label134 = new System.Windows.Forms.Label();
this.txtNaMargem = new System.Windows.Forms.TextBox();
this.label133 = new System.Windows.Forms.Label();
this.txtDistanciaDireita = new System.Windows.Forms.TextBox();
this.label132 = new System.Windows.Forms.Label();
this.txtDistanciaEsquerda = new System.Windows.Forms.TextBox();
this.label70 = new System.Windows.Forms.Label();
this.txtErvasIdentificadas = new System.Windows.Forms.TextBox();
this.lblPercentualRua = new System.Windows.Forms.Label();
@ -485,12 +489,18 @@
this.label36 = new System.Windows.Forms.Label();
this.txtMomento = new System.Windows.Forms.TextBox();
this.btnPlay = new System.Windows.Forms.Button();
this.label132 = new System.Windows.Forms.Label();
this.txtDistanciaEsquerda = new System.Windows.Forms.TextBox();
this.label133 = new System.Windows.Forms.Label();
this.txtDistanciaDireita = new System.Windows.Forms.TextBox();
this.label134 = new System.Windows.Forms.Label();
this.txtNaMargem = new System.Windows.Forms.TextBox();
this.chbMOV_Temperatura_Mediana = new System.Windows.Forms.CheckBox();
this.chbMOV_Temperatura_Moda = new System.Windows.Forms.CheckBox();
this.chbMOV_Temperatura_Media = new System.Windows.Forms.CheckBox();
this.gpbMOV_Temperatura_Filtro = new System.Windows.Forms.GroupBox();
this.btnMOV_Temperatura_Proximo = new System.Windows.Forms.Button();
this.btnMOV_Temperatura_Anterior = new System.Windows.Forms.Button();
this.btnMOV_Temperatura_Redefinir = new System.Windows.Forms.Button();
this.btnMOV_Temperatura_Buscar = new System.Windows.Forms.Button();
this.cmbMOV_Temperatura_Componente = new System.Windows.Forms.ComboBox();
this.label135 = new System.Windows.Forms.Label();
this.cmbMOV_Temperatura_Filtro = new System.Windows.Forms.ComboBox();
this.label136 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.trbMomento)).BeginInit();
this.panel1.SuspendLayout();
this.tabControl4.SuspendLayout();
@ -506,8 +516,6 @@
((System.ComponentModel.ISupportInitialize)(this.picDIR_EF)).BeginInit();
this.tabMovimentacao.SuspendLayout();
this.tabControl2.SuspendLayout();
this.tabMovVelocidade.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.chartMovVelocidade)).BeginInit();
this.tabMovTemperatura.SuspendLayout();
this.gpbMOV_Temperatura_Analise.SuspendLayout();
this.gpbMOV_Temperatura_DF.SuspendLayout();
@ -561,6 +569,7 @@
this.panel6.SuspendLayout();
this.pnlInformacoesOperacao.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picCameraCaminho)).BeginInit();
this.gpbMOV_Temperatura_Filtro.SuspendLayout();
this.SuspendLayout();
//
// trbMomento
@ -1868,7 +1877,6 @@
//
// tabControl2
//
this.tabControl2.Controls.Add(this.tabMovVelocidade);
this.tabControl2.Controls.Add(this.tabMovTemperatura);
this.tabControl2.Controls.Add(this.tabMovAlimentacao);
this.tabControl2.Controls.Add(this.tabMovGreal);
@ -1879,37 +1887,9 @@
this.tabControl2.Size = new System.Drawing.Size(489, 515);
this.tabControl2.TabIndex = 0;
//
// tabMovVelocidade
//
this.tabMovVelocidade.Controls.Add(this.chartMovVelocidade);
this.tabMovVelocidade.Location = new System.Drawing.Point(4, 22);
this.tabMovVelocidade.Margin = new System.Windows.Forms.Padding(2);
this.tabMovVelocidade.Name = "tabMovVelocidade";
this.tabMovVelocidade.Padding = new System.Windows.Forms.Padding(2);
this.tabMovVelocidade.Size = new System.Drawing.Size(481, 489);
this.tabMovVelocidade.TabIndex = 1;
this.tabMovVelocidade.Text = "Velocidade";
this.tabMovVelocidade.UseVisualStyleBackColor = true;
//
// chartMovVelocidade
//
chartArea1.Name = "ChartArea1";
this.chartMovVelocidade.ChartAreas.Add(chartArea1);
legend1.Name = "Legend1";
this.chartMovVelocidade.Legends.Add(legend1);
this.chartMovVelocidade.Location = new System.Drawing.Point(4, 4);
this.chartMovVelocidade.Margin = new System.Windows.Forms.Padding(2);
this.chartMovVelocidade.Name = "chartMovVelocidade";
series1.ChartArea = "ChartArea1";
series1.Legend = "Legend1";
series1.Name = "Series1";
this.chartMovVelocidade.Series.Add(series1);
this.chartMovVelocidade.Size = new System.Drawing.Size(474, 356);
this.chartMovVelocidade.TabIndex = 96;
this.chartMovVelocidade.Text = "chart1";
//
// tabMovTemperatura
//
this.tabMovTemperatura.Controls.Add(this.gpbMOV_Temperatura_Filtro);
this.tabMovTemperatura.Controls.Add(this.gpbMOV_Temperatura_Analise);
this.tabMovTemperatura.Controls.Add(this.gpbMOV_Temperatura_DF);
this.tabMovTemperatura.Controls.Add(this.gpbMOV_Temperatura_DT);
@ -1927,17 +1907,20 @@
//
// gpbMOV_Temperatura_Analise
//
this.gpbMOV_Temperatura_Analise.Controls.Add(this.chbMOV_Temperatura_Mediana);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.chbMOV_Temperatura_Moda);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.chbMOV_Temperatura_Media);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.txtMOV_Temperatura_Mediana);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.label57);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.txtMOV_Temperatura_Media);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.txtMOV_Temperatura_Moda);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.label58);
this.gpbMOV_Temperatura_Analise.Controls.Add(this.label59);
this.gpbMOV_Temperatura_Analise.Location = new System.Drawing.Point(340, 344);
this.gpbMOV_Temperatura_Analise.Location = new System.Drawing.Point(236, 344);
this.gpbMOV_Temperatura_Analise.Margin = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_Analise.Name = "gpbMOV_Temperatura_Analise";
this.gpbMOV_Temperatura_Analise.Padding = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_Analise.Size = new System.Drawing.Size(80, 143);
this.gpbMOV_Temperatura_Analise.Size = new System.Drawing.Size(98, 143);
this.gpbMOV_Temperatura_Analise.TabIndex = 130;
this.gpbMOV_Temperatura_Analise.TabStop = false;
this.gpbMOV_Temperatura_Analise.Text = "Análise";
@ -1948,7 +1931,7 @@
this.txtMOV_Temperatura_Mediana.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_Temperatura_Mediana.Name = "txtMOV_Temperatura_Mediana";
this.txtMOV_Temperatura_Mediana.ReadOnly = true;
this.txtMOV_Temperatura_Mediana.Size = new System.Drawing.Size(65, 20);
this.txtMOV_Temperatura_Mediana.Size = new System.Drawing.Size(45, 20);
this.txtMOV_Temperatura_Mediana.TabIndex = 125;
this.txtMOV_Temperatura_Mediana.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -1968,7 +1951,7 @@
this.txtMOV_Temperatura_Media.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_Temperatura_Media.Name = "txtMOV_Temperatura_Media";
this.txtMOV_Temperatura_Media.ReadOnly = true;
this.txtMOV_Temperatura_Media.Size = new System.Drawing.Size(65, 20);
this.txtMOV_Temperatura_Media.Size = new System.Drawing.Size(45, 20);
this.txtMOV_Temperatura_Media.TabIndex = 100;
this.txtMOV_Temperatura_Media.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -1978,7 +1961,7 @@
this.txtMOV_Temperatura_Moda.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_Temperatura_Moda.Name = "txtMOV_Temperatura_Moda";
this.txtMOV_Temperatura_Moda.ReadOnly = true;
this.txtMOV_Temperatura_Moda.Size = new System.Drawing.Size(65, 20);
this.txtMOV_Temperatura_Moda.Size = new System.Drawing.Size(45, 20);
this.txtMOV_Temperatura_Moda.TabIndex = 102;
this.txtMOV_Temperatura_Moda.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2010,22 +1993,22 @@
this.gpbMOV_Temperatura_DF.Controls.Add(this.txtMOV_TemperaturaMn_DF);
this.gpbMOV_Temperatura_DF.Controls.Add(this.label55);
this.gpbMOV_Temperatura_DF.Controls.Add(this.label56);
this.gpbMOV_Temperatura_DF.Location = new System.Drawing.Point(256, 344);
this.gpbMOV_Temperatura_DF.Location = new System.Drawing.Point(178, 344);
this.gpbMOV_Temperatura_DF.Margin = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_DF.Name = "gpbMOV_Temperatura_DF";
this.gpbMOV_Temperatura_DF.Padding = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_DF.Size = new System.Drawing.Size(80, 143);
this.gpbMOV_Temperatura_DF.Size = new System.Drawing.Size(54, 143);
this.gpbMOV_Temperatura_DF.TabIndex = 129;
this.gpbMOV_Temperatura_DF.TabStop = false;
this.gpbMOV_Temperatura_DF.Text = "M4 (DF)";
this.gpbMOV_Temperatura_DF.Text = "DF";
//
// txtMOV_TemperaturaMx_DF
//
this.txtMOV_TemperaturaMx_DF.Location = new System.Drawing.Point(7, 116);
this.txtMOV_TemperaturaMx_DF.Location = new System.Drawing.Point(5, 116);
this.txtMOV_TemperaturaMx_DF.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMx_DF.Name = "txtMOV_TemperaturaMx_DF";
this.txtMOV_TemperaturaMx_DF.ReadOnly = true;
this.txtMOV_TemperaturaMx_DF.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMx_DF.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMx_DF.TabIndex = 125;
this.txtMOV_TemperaturaMx_DF.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2041,21 +2024,21 @@
//
// txtMOV_TemperaturaAt_DF
//
this.txtMOV_TemperaturaAt_DF.Location = new System.Drawing.Point(7, 35);
this.txtMOV_TemperaturaAt_DF.Location = new System.Drawing.Point(5, 35);
this.txtMOV_TemperaturaAt_DF.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaAt_DF.Name = "txtMOV_TemperaturaAt_DF";
this.txtMOV_TemperaturaAt_DF.ReadOnly = true;
this.txtMOV_TemperaturaAt_DF.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaAt_DF.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaAt_DF.TabIndex = 100;
this.txtMOV_TemperaturaAt_DF.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// txtMOV_TemperaturaMn_DF
//
this.txtMOV_TemperaturaMn_DF.Location = new System.Drawing.Point(7, 76);
this.txtMOV_TemperaturaMn_DF.Location = new System.Drawing.Point(5, 76);
this.txtMOV_TemperaturaMn_DF.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMn_DF.Name = "txtMOV_TemperaturaMn_DF";
this.txtMOV_TemperaturaMn_DF.ReadOnly = true;
this.txtMOV_TemperaturaMn_DF.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMn_DF.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMn_DF.TabIndex = 102;
this.txtMOV_TemperaturaMn_DF.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2087,22 +2070,22 @@
this.gpbMOV_Temperatura_DT.Controls.Add(this.txtMOV_TemperaturaMn_DT);
this.gpbMOV_Temperatura_DT.Controls.Add(this.label52);
this.gpbMOV_Temperatura_DT.Controls.Add(this.label53);
this.gpbMOV_Temperatura_DT.Location = new System.Drawing.Point(172, 344);
this.gpbMOV_Temperatura_DT.Location = new System.Drawing.Point(120, 344);
this.gpbMOV_Temperatura_DT.Margin = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_DT.Name = "gpbMOV_Temperatura_DT";
this.gpbMOV_Temperatura_DT.Padding = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_DT.Size = new System.Drawing.Size(80, 143);
this.gpbMOV_Temperatura_DT.Size = new System.Drawing.Size(54, 143);
this.gpbMOV_Temperatura_DT.TabIndex = 129;
this.gpbMOV_Temperatura_DT.TabStop = false;
this.gpbMOV_Temperatura_DT.Text = "M3 (DT)";
this.gpbMOV_Temperatura_DT.Text = "DT";
//
// txtMOV_TemperaturaMx_DT
//
this.txtMOV_TemperaturaMx_DT.Location = new System.Drawing.Point(7, 116);
this.txtMOV_TemperaturaMx_DT.Location = new System.Drawing.Point(5, 116);
this.txtMOV_TemperaturaMx_DT.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMx_DT.Name = "txtMOV_TemperaturaMx_DT";
this.txtMOV_TemperaturaMx_DT.ReadOnly = true;
this.txtMOV_TemperaturaMx_DT.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMx_DT.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMx_DT.TabIndex = 125;
this.txtMOV_TemperaturaMx_DT.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2118,21 +2101,21 @@
//
// txtMOV_TemperaturaAt_DT
//
this.txtMOV_TemperaturaAt_DT.Location = new System.Drawing.Point(7, 35);
this.txtMOV_TemperaturaAt_DT.Location = new System.Drawing.Point(5, 35);
this.txtMOV_TemperaturaAt_DT.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaAt_DT.Name = "txtMOV_TemperaturaAt_DT";
this.txtMOV_TemperaturaAt_DT.ReadOnly = true;
this.txtMOV_TemperaturaAt_DT.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaAt_DT.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaAt_DT.TabIndex = 100;
this.txtMOV_TemperaturaAt_DT.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// txtMOV_TemperaturaMn_DT
//
this.txtMOV_TemperaturaMn_DT.Location = new System.Drawing.Point(7, 76);
this.txtMOV_TemperaturaMn_DT.Location = new System.Drawing.Point(5, 76);
this.txtMOV_TemperaturaMn_DT.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMn_DT.Name = "txtMOV_TemperaturaMn_DT";
this.txtMOV_TemperaturaMn_DT.ReadOnly = true;
this.txtMOV_TemperaturaMn_DT.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMn_DT.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMn_DT.TabIndex = 102;
this.txtMOV_TemperaturaMn_DT.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2164,22 +2147,22 @@
this.gpbMOV_Temperatura_ET.Controls.Add(this.txtMOV_TemperaturaMn_ET);
this.gpbMOV_Temperatura_ET.Controls.Add(this.label49);
this.gpbMOV_Temperatura_ET.Controls.Add(this.label50);
this.gpbMOV_Temperatura_ET.Location = new System.Drawing.Point(88, 344);
this.gpbMOV_Temperatura_ET.Location = new System.Drawing.Point(62, 344);
this.gpbMOV_Temperatura_ET.Margin = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_ET.Name = "gpbMOV_Temperatura_ET";
this.gpbMOV_Temperatura_ET.Padding = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_ET.Size = new System.Drawing.Size(80, 143);
this.gpbMOV_Temperatura_ET.Size = new System.Drawing.Size(54, 143);
this.gpbMOV_Temperatura_ET.TabIndex = 129;
this.gpbMOV_Temperatura_ET.TabStop = false;
this.gpbMOV_Temperatura_ET.Text = "M2 (ET)";
this.gpbMOV_Temperatura_ET.Text = "ET";
//
// txtMOV_TemperaturaMx_ET
//
this.txtMOV_TemperaturaMx_ET.Location = new System.Drawing.Point(7, 116);
this.txtMOV_TemperaturaMx_ET.Location = new System.Drawing.Point(5, 116);
this.txtMOV_TemperaturaMx_ET.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMx_ET.Name = "txtMOV_TemperaturaMx_ET";
this.txtMOV_TemperaturaMx_ET.ReadOnly = true;
this.txtMOV_TemperaturaMx_ET.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMx_ET.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMx_ET.TabIndex = 125;
this.txtMOV_TemperaturaMx_ET.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2195,21 +2178,21 @@
//
// txtMOV_TemperaturaAt_ET
//
this.txtMOV_TemperaturaAt_ET.Location = new System.Drawing.Point(7, 35);
this.txtMOV_TemperaturaAt_ET.Location = new System.Drawing.Point(5, 35);
this.txtMOV_TemperaturaAt_ET.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaAt_ET.Name = "txtMOV_TemperaturaAt_ET";
this.txtMOV_TemperaturaAt_ET.ReadOnly = true;
this.txtMOV_TemperaturaAt_ET.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaAt_ET.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaAt_ET.TabIndex = 100;
this.txtMOV_TemperaturaAt_ET.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// txtMOV_TemperaturaMn_ET
//
this.txtMOV_TemperaturaMn_ET.Location = new System.Drawing.Point(7, 76);
this.txtMOV_TemperaturaMn_ET.Location = new System.Drawing.Point(5, 76);
this.txtMOV_TemperaturaMn_ET.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMn_ET.Name = "txtMOV_TemperaturaMn_ET";
this.txtMOV_TemperaturaMn_ET.ReadOnly = true;
this.txtMOV_TemperaturaMn_ET.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMn_ET.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMn_ET.TabIndex = 102;
this.txtMOV_TemperaturaMn_ET.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2245,18 +2228,18 @@
this.gpbMOV_Temperatura_EF.Margin = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_EF.Name = "gpbMOV_Temperatura_EF";
this.gpbMOV_Temperatura_EF.Padding = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_EF.Size = new System.Drawing.Size(80, 143);
this.gpbMOV_Temperatura_EF.Size = new System.Drawing.Size(54, 143);
this.gpbMOV_Temperatura_EF.TabIndex = 128;
this.gpbMOV_Temperatura_EF.TabStop = false;
this.gpbMOV_Temperatura_EF.Text = "M1 (EF)";
this.gpbMOV_Temperatura_EF.Text = "EF";
//
// txtMOV_TemperaturaMx_EF
//
this.txtMOV_TemperaturaMx_EF.Location = new System.Drawing.Point(7, 116);
this.txtMOV_TemperaturaMx_EF.Location = new System.Drawing.Point(5, 116);
this.txtMOV_TemperaturaMx_EF.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMx_EF.Name = "txtMOV_TemperaturaMx_EF";
this.txtMOV_TemperaturaMx_EF.ReadOnly = true;
this.txtMOV_TemperaturaMx_EF.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMx_EF.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMx_EF.TabIndex = 125;
this.txtMOV_TemperaturaMx_EF.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2272,21 +2255,21 @@
//
// txtMOV_TemperaturaAt_EF
//
this.txtMOV_TemperaturaAt_EF.Location = new System.Drawing.Point(7, 35);
this.txtMOV_TemperaturaAt_EF.Location = new System.Drawing.Point(5, 35);
this.txtMOV_TemperaturaAt_EF.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaAt_EF.Name = "txtMOV_TemperaturaAt_EF";
this.txtMOV_TemperaturaAt_EF.ReadOnly = true;
this.txtMOV_TemperaturaAt_EF.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaAt_EF.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaAt_EF.TabIndex = 100;
this.txtMOV_TemperaturaAt_EF.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// txtMOV_TemperaturaMn_EF
//
this.txtMOV_TemperaturaMn_EF.Location = new System.Drawing.Point(7, 76);
this.txtMOV_TemperaturaMn_EF.Location = new System.Drawing.Point(5, 76);
this.txtMOV_TemperaturaMn_EF.Margin = new System.Windows.Forms.Padding(2);
this.txtMOV_TemperaturaMn_EF.Name = "txtMOV_TemperaturaMn_EF";
this.txtMOV_TemperaturaMn_EF.ReadOnly = true;
this.txtMOV_TemperaturaMn_EF.Size = new System.Drawing.Size(65, 20);
this.txtMOV_TemperaturaMn_EF.Size = new System.Drawing.Size(43, 20);
this.txtMOV_TemperaturaMn_EF.TabIndex = 102;
this.txtMOV_TemperaturaMn_EF.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
@ -2312,17 +2295,17 @@
//
// chartMovTemperatura
//
chartArea2.Name = "ChartArea1";
this.chartMovTemperatura.ChartAreas.Add(chartArea2);
legend2.Name = "Legend1";
this.chartMovTemperatura.Legends.Add(legend2);
chartArea1.Name = "ChartArea1";
this.chartMovTemperatura.ChartAreas.Add(chartArea1);
legend1.Name = "Legend1";
this.chartMovTemperatura.Legends.Add(legend1);
this.chartMovTemperatura.Location = new System.Drawing.Point(4, 4);
this.chartMovTemperatura.Margin = new System.Windows.Forms.Padding(2);
this.chartMovTemperatura.Name = "chartMovTemperatura";
series2.ChartArea = "ChartArea1";
series2.Legend = "Legend1";
series2.Name = "Series1";
this.chartMovTemperatura.Series.Add(series2);
series1.ChartArea = "ChartArea1";
series1.Legend = "Legend1";
series1.Name = "Series1";
this.chartMovTemperatura.Series.Add(series1);
this.chartMovTemperatura.Size = new System.Drawing.Size(474, 336);
this.chartMovTemperatura.TabIndex = 95;
this.chartMovTemperatura.Text = "chart1";
@ -2445,6 +2428,9 @@
//
// gpbMOV_Alimentacao_Analise
//
this.gpbMOV_Alimentacao_Analise.Controls.Add(this.chbMOV_Alimentacao_Mediana);
this.gpbMOV_Alimentacao_Analise.Controls.Add(this.chbMOV_Alimentacao_Moda);
this.gpbMOV_Alimentacao_Analise.Controls.Add(this.chbMOV_Alimentacao_Media);
this.gpbMOV_Alimentacao_Analise.Controls.Add(this.txtMOV_Alimentacao_Mediana);
this.gpbMOV_Alimentacao_Analise.Controls.Add(this.label1);
this.gpbMOV_Alimentacao_Analise.Controls.Add(this.txtMOV_Alimentacao_Media);
@ -2455,11 +2441,41 @@
this.gpbMOV_Alimentacao_Analise.Margin = new System.Windows.Forms.Padding(2);
this.gpbMOV_Alimentacao_Analise.Name = "gpbMOV_Alimentacao_Analise";
this.gpbMOV_Alimentacao_Analise.Padding = new System.Windows.Forms.Padding(2);
this.gpbMOV_Alimentacao_Analise.Size = new System.Drawing.Size(60, 143);
this.gpbMOV_Alimentacao_Analise.Size = new System.Drawing.Size(98, 143);
this.gpbMOV_Alimentacao_Analise.TabIndex = 136;
this.gpbMOV_Alimentacao_Analise.TabStop = false;
this.gpbMOV_Alimentacao_Analise.Text = "Análise";
//
// chbMOV_Alimentacao_Mediana
//
this.chbMOV_Alimentacao_Mediana.AutoSize = true;
this.chbMOV_Alimentacao_Mediana.Location = new System.Drawing.Point(57, 118);
this.chbMOV_Alimentacao_Mediana.Name = "chbMOV_Alimentacao_Mediana";
this.chbMOV_Alimentacao_Mediana.Size = new System.Drawing.Size(41, 17);
this.chbMOV_Alimentacao_Mediana.TabIndex = 129;
this.chbMOV_Alimentacao_Mediana.Text = "Ind";
this.chbMOV_Alimentacao_Mediana.UseVisualStyleBackColor = true;
//
// chbMOV_Alimentacao_Moda
//
this.chbMOV_Alimentacao_Moda.AutoSize = true;
this.chbMOV_Alimentacao_Moda.Location = new System.Drawing.Point(57, 78);
this.chbMOV_Alimentacao_Moda.Name = "chbMOV_Alimentacao_Moda";
this.chbMOV_Alimentacao_Moda.Size = new System.Drawing.Size(41, 17);
this.chbMOV_Alimentacao_Moda.TabIndex = 128;
this.chbMOV_Alimentacao_Moda.Text = "Ind";
this.chbMOV_Alimentacao_Moda.UseVisualStyleBackColor = true;
//
// chbMOV_Alimentacao_Media
//
this.chbMOV_Alimentacao_Media.AutoSize = true;
this.chbMOV_Alimentacao_Media.Location = new System.Drawing.Point(57, 37);
this.chbMOV_Alimentacao_Media.Name = "chbMOV_Alimentacao_Media";
this.chbMOV_Alimentacao_Media.Size = new System.Drawing.Size(41, 17);
this.chbMOV_Alimentacao_Media.TabIndex = 127;
this.chbMOV_Alimentacao_Media.Text = "Ind";
this.chbMOV_Alimentacao_Media.UseVisualStyleBackColor = true;
//
// txtMOV_Alimentacao_Mediana
//
this.txtMOV_Alimentacao_Mediana.Location = new System.Drawing.Point(7, 116);
@ -2830,17 +2846,17 @@
//
// chartMovTensao
//
chartArea3.Name = "ChartArea1";
this.chartMovTensao.ChartAreas.Add(chartArea3);
legend3.Name = "Legend1";
this.chartMovTensao.Legends.Add(legend3);
chartArea2.Name = "ChartArea1";
this.chartMovTensao.ChartAreas.Add(chartArea2);
legend2.Name = "Legend1";
this.chartMovTensao.Legends.Add(legend2);
this.chartMovTensao.Location = new System.Drawing.Point(4, 4);
this.chartMovTensao.Margin = new System.Windows.Forms.Padding(2);
this.chartMovTensao.Name = "chartMovTensao";
series3.ChartArea = "ChartArea1";
series3.Legend = "Legend1";
series3.Name = "Series1";
this.chartMovTensao.Series.Add(series3);
series2.ChartArea = "ChartArea1";
series2.Legend = "Legend1";
series2.Name = "Series1";
this.chartMovTensao.Series.Add(series2);
this.chartMovTensao.Size = new System.Drawing.Size(474, 336);
this.chartMovTensao.TabIndex = 131;
this.chartMovTensao.Text = "chart1";
@ -3339,17 +3355,17 @@
//
// chartMovGeral
//
chartArea4.Name = "ChartArea1";
this.chartMovGeral.ChartAreas.Add(chartArea4);
legend4.Name = "Legend1";
this.chartMovGeral.Legends.Add(legend4);
chartArea3.Name = "ChartArea1";
this.chartMovGeral.ChartAreas.Add(chartArea3);
legend3.Name = "Legend1";
this.chartMovGeral.Legends.Add(legend3);
this.chartMovGeral.Location = new System.Drawing.Point(4, 4);
this.chartMovGeral.Margin = new System.Windows.Forms.Padding(2);
this.chartMovGeral.Name = "chartMovGeral";
series4.ChartArea = "ChartArea1";
series4.Legend = "Legend1";
series4.Name = "Series1";
this.chartMovGeral.Series.Add(series4);
series3.ChartArea = "ChartArea1";
series3.Legend = "Legend1";
series3.Name = "Series1";
this.chartMovGeral.Series.Add(series3);
this.chartMovGeral.Size = new System.Drawing.Size(474, 311);
this.chartMovGeral.TabIndex = 94;
this.chartMovGeral.Text = "chart1";
@ -3410,17 +3426,17 @@
//
// chartAtuador
//
chartArea5.Name = "ChartArea1";
this.chartAtuador.ChartAreas.Add(chartArea5);
legend5.Name = "Legend1";
this.chartAtuador.Legends.Add(legend5);
chartArea4.Name = "ChartArea1";
this.chartAtuador.ChartAreas.Add(chartArea4);
legend4.Name = "Legend1";
this.chartAtuador.Legends.Add(legend4);
this.chartAtuador.Location = new System.Drawing.Point(4, 276);
this.chartAtuador.Margin = new System.Windows.Forms.Padding(2);
this.chartAtuador.Name = "chartAtuador";
series5.ChartArea = "ChartArea1";
series5.Legend = "Legend1";
series5.Name = "Series1";
this.chartAtuador.Series.Add(series5);
series4.ChartArea = "ChartArea1";
series4.Legend = "Legend1";
series4.Name = "Series1";
this.chartAtuador.Series.Add(series4);
this.chartAtuador.Size = new System.Drawing.Size(489, 241);
this.chartAtuador.TabIndex = 95;
this.chartAtuador.Text = "chart1";
@ -3447,16 +3463,16 @@
//
// chartErvas
//
chartArea6.Name = "ChartArea1";
this.chartErvas.ChartAreas.Add(chartArea6);
legend6.Name = "Legend1";
this.chartErvas.Legends.Add(legend6);
chartArea5.Name = "ChartArea1";
this.chartErvas.ChartAreas.Add(chartArea5);
legend5.Name = "Legend1";
this.chartErvas.Legends.Add(legend5);
this.chartErvas.Location = new System.Drawing.Point(6, 6);
this.chartErvas.Name = "chartErvas";
series6.ChartArea = "ChartArea1";
series6.Legend = "Legend1";
series6.Name = "Series1";
this.chartErvas.Series.Add(series6);
series5.ChartArea = "ChartArea1";
series5.Legend = "Legend1";
series5.Name = "Series1";
this.chartErvas.Series.Add(series5);
this.chartErvas.Size = new System.Drawing.Size(484, 510);
this.chartErvas.TabIndex = 0;
this.chartErvas.Text = "chart1";
@ -3739,17 +3755,17 @@
//
// chartSensoriamento
//
chartArea7.Name = "ChartArea1";
this.chartSensoriamento.ChartAreas.Add(chartArea7);
legend7.Name = "Legend1";
this.chartSensoriamento.Legends.Add(legend7);
chartArea6.Name = "ChartArea1";
this.chartSensoriamento.ChartAreas.Add(chartArea6);
legend6.Name = "Legend1";
this.chartSensoriamento.Legends.Add(legend6);
this.chartSensoriamento.Location = new System.Drawing.Point(2, 4);
this.chartSensoriamento.Margin = new System.Windows.Forms.Padding(2);
this.chartSensoriamento.Name = "chartSensoriamento";
series7.ChartArea = "ChartArea1";
series7.Legend = "Legend1";
series7.Name = "Series1";
this.chartSensoriamento.Series.Add(series7);
series6.ChartArea = "ChartArea1";
series6.Legend = "Legend1";
series6.Name = "Series1";
this.chartSensoriamento.Series.Add(series6);
this.chartSensoriamento.Size = new System.Drawing.Size(491, 389);
this.chartSensoriamento.TabIndex = 95;
this.chartSensoriamento.Text = "chart1";
@ -4465,17 +4481,17 @@
//
// chartCpu
//
chartArea8.Name = "ChartArea1";
this.chartCpu.ChartAreas.Add(chartArea8);
legend8.Name = "Legend1";
this.chartCpu.Legends.Add(legend8);
chartArea7.Name = "ChartArea1";
this.chartCpu.ChartAreas.Add(chartArea7);
legend7.Name = "Legend1";
this.chartCpu.Legends.Add(legend7);
this.chartCpu.Location = new System.Drawing.Point(2, 3);
this.chartCpu.Margin = new System.Windows.Forms.Padding(2);
this.chartCpu.Name = "chartCpu";
series8.ChartArea = "ChartArea1";
series8.Legend = "Legend1";
series8.Name = "Series1";
this.chartCpu.Series.Add(series8);
series7.ChartArea = "ChartArea1";
series7.Legend = "Legend1";
series7.Name = "Series1";
this.chartCpu.Series.Add(series7);
this.chartCpu.Size = new System.Drawing.Size(491, 389);
this.chartCpu.TabIndex = 134;
this.chartCpu.Text = "chart1";
@ -4737,17 +4753,17 @@
//
// chartCameras
//
chartArea9.Name = "ChartArea1";
this.chartCameras.ChartAreas.Add(chartArea9);
legend9.Name = "Legend1";
this.chartCameras.Legends.Add(legend9);
chartArea8.Name = "ChartArea1";
this.chartCameras.ChartAreas.Add(chartArea8);
legend8.Name = "Legend1";
this.chartCameras.Legends.Add(legend8);
this.chartCameras.Location = new System.Drawing.Point(2, 3);
this.chartCameras.Margin = new System.Windows.Forms.Padding(2);
this.chartCameras.Name = "chartCameras";
series9.ChartArea = "ChartArea1";
series9.Legend = "Legend1";
series9.Name = "Series1";
this.chartCameras.Series.Add(series9);
series8.ChartArea = "ChartArea1";
series8.Legend = "Legend1";
series8.Name = "Series1";
this.chartCameras.Series.Add(series8);
this.chartCameras.Size = new System.Drawing.Size(491, 389);
this.chartCameras.TabIndex = 137;
this.chartCameras.Text = "chart1";
@ -4824,6 +4840,66 @@
this.pnlInformacoesOperacao.Size = new System.Drawing.Size(385, 264);
this.pnlInformacoesOperacao.TabIndex = 69;
//
// label134
//
this.label134.AutoSize = true;
this.label134.Location = new System.Drawing.Point(245, 120);
this.label134.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label134.Name = "label134";
this.label134.Size = new System.Drawing.Size(62, 13);
this.label134.TabIndex = 81;
this.label134.Text = "Na Margem";
//
// txtNaMargem
//
this.txtNaMargem.Location = new System.Drawing.Point(247, 136);
this.txtNaMargem.Margin = new System.Windows.Forms.Padding(2);
this.txtNaMargem.Name = "txtNaMargem";
this.txtNaMargem.ReadOnly = true;
this.txtNaMargem.Size = new System.Drawing.Size(117, 20);
this.txtNaMargem.TabIndex = 82;
this.txtNaMargem.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label133
//
this.label133.AutoSize = true;
this.label133.Location = new System.Drawing.Point(124, 120);
this.label133.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label133.Name = "label133";
this.label133.Size = new System.Drawing.Size(99, 13);
this.label133.TabIndex = 79;
this.label133.Text = "Distancia da Direita";
//
// txtDistanciaDireita
//
this.txtDistanciaDireita.Location = new System.Drawing.Point(126, 136);
this.txtDistanciaDireita.Margin = new System.Windows.Forms.Padding(2);
this.txtDistanciaDireita.Name = "txtDistanciaDireita";
this.txtDistanciaDireita.ReadOnly = true;
this.txtDistanciaDireita.Size = new System.Drawing.Size(117, 20);
this.txtDistanciaDireita.TabIndex = 80;
this.txtDistanciaDireita.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label132
//
this.label132.AutoSize = true;
this.label132.Location = new System.Drawing.Point(2, 120);
this.label132.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label132.Name = "label132";
this.label132.Size = new System.Drawing.Size(114, 13);
this.label132.TabIndex = 77;
this.label132.Text = "Distancia da Esquerda";
//
// txtDistanciaEsquerda
//
this.txtDistanciaEsquerda.Location = new System.Drawing.Point(4, 136);
this.txtDistanciaEsquerda.Margin = new System.Windows.Forms.Padding(2);
this.txtDistanciaEsquerda.Name = "txtDistanciaEsquerda";
this.txtDistanciaEsquerda.ReadOnly = true;
this.txtDistanciaEsquerda.Size = new System.Drawing.Size(117, 20);
this.txtDistanciaEsquerda.TabIndex = 78;
this.txtDistanciaEsquerda.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label70
//
this.label70.AutoSize = true;
@ -5345,65 +5421,134 @@
this.btnPlay.UseVisualStyleBackColor = true;
this.btnPlay.Click += new System.EventHandler(this.btnPlay_Click);
//
// label132
// chbMOV_Temperatura_Mediana
//
this.label132.AutoSize = true;
this.label132.Location = new System.Drawing.Point(2, 120);
this.label132.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label132.Name = "label132";
this.label132.Size = new System.Drawing.Size(114, 13);
this.label132.TabIndex = 77;
this.label132.Text = "Distancia da Esquerda";
this.chbMOV_Temperatura_Mediana.AutoSize = true;
this.chbMOV_Temperatura_Mediana.Location = new System.Drawing.Point(57, 118);
this.chbMOV_Temperatura_Mediana.Name = "chbMOV_Temperatura_Mediana";
this.chbMOV_Temperatura_Mediana.Size = new System.Drawing.Size(41, 17);
this.chbMOV_Temperatura_Mediana.TabIndex = 132;
this.chbMOV_Temperatura_Mediana.Text = "Ind";
this.chbMOV_Temperatura_Mediana.UseVisualStyleBackColor = true;
//
// txtDistanciaEsquerda
// chbMOV_Temperatura_Moda
//
this.txtDistanciaEsquerda.Location = new System.Drawing.Point(4, 136);
this.txtDistanciaEsquerda.Margin = new System.Windows.Forms.Padding(2);
this.txtDistanciaEsquerda.Name = "txtDistanciaEsquerda";
this.txtDistanciaEsquerda.ReadOnly = true;
this.txtDistanciaEsquerda.Size = new System.Drawing.Size(117, 20);
this.txtDistanciaEsquerda.TabIndex = 78;
this.txtDistanciaEsquerda.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.chbMOV_Temperatura_Moda.AutoSize = true;
this.chbMOV_Temperatura_Moda.Location = new System.Drawing.Point(57, 78);
this.chbMOV_Temperatura_Moda.Name = "chbMOV_Temperatura_Moda";
this.chbMOV_Temperatura_Moda.Size = new System.Drawing.Size(41, 17);
this.chbMOV_Temperatura_Moda.TabIndex = 131;
this.chbMOV_Temperatura_Moda.Text = "Ind";
this.chbMOV_Temperatura_Moda.UseVisualStyleBackColor = true;
//
// label133
// chbMOV_Temperatura_Media
//
this.label133.AutoSize = true;
this.label133.Location = new System.Drawing.Point(124, 120);
this.label133.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label133.Name = "label133";
this.label133.Size = new System.Drawing.Size(99, 13);
this.label133.TabIndex = 79;
this.label133.Text = "Distancia da Direita";
this.chbMOV_Temperatura_Media.AutoSize = true;
this.chbMOV_Temperatura_Media.Location = new System.Drawing.Point(57, 37);
this.chbMOV_Temperatura_Media.Name = "chbMOV_Temperatura_Media";
this.chbMOV_Temperatura_Media.Size = new System.Drawing.Size(41, 17);
this.chbMOV_Temperatura_Media.TabIndex = 130;
this.chbMOV_Temperatura_Media.Text = "Ind";
this.chbMOV_Temperatura_Media.UseVisualStyleBackColor = true;
//
// txtDistanciaDireita
// gpbMOV_Temperatura_Filtro
//
this.txtDistanciaDireita.Location = new System.Drawing.Point(126, 136);
this.txtDistanciaDireita.Margin = new System.Windows.Forms.Padding(2);
this.txtDistanciaDireita.Name = "txtDistanciaDireita";
this.txtDistanciaDireita.ReadOnly = true;
this.txtDistanciaDireita.Size = new System.Drawing.Size(117, 20);
this.txtDistanciaDireita.TabIndex = 80;
this.txtDistanciaDireita.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.btnMOV_Temperatura_Proximo);
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.btnMOV_Temperatura_Anterior);
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.btnMOV_Temperatura_Redefinir);
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.btnMOV_Temperatura_Buscar);
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.cmbMOV_Temperatura_Componente);
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.label135);
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.cmbMOV_Temperatura_Filtro);
this.gpbMOV_Temperatura_Filtro.Controls.Add(this.label136);
this.gpbMOV_Temperatura_Filtro.Location = new System.Drawing.Point(339, 344);
this.gpbMOV_Temperatura_Filtro.Margin = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_Filtro.Name = "gpbMOV_Temperatura_Filtro";
this.gpbMOV_Temperatura_Filtro.Padding = new System.Windows.Forms.Padding(2);
this.gpbMOV_Temperatura_Filtro.Size = new System.Drawing.Size(138, 143);
this.gpbMOV_Temperatura_Filtro.TabIndex = 138;
this.gpbMOV_Temperatura_Filtro.TabStop = false;
this.gpbMOV_Temperatura_Filtro.Text = "Filtro";
//
// label134
// btnMOV_Temperatura_Proximo
//
this.label134.AutoSize = true;
this.label134.Location = new System.Drawing.Point(245, 120);
this.label134.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label134.Name = "label134";
this.label134.Size = new System.Drawing.Size(62, 13);
this.label134.TabIndex = 81;
this.label134.Text = "Na Margem";
this.btnMOV_Temperatura_Proximo.Location = new System.Drawing.Point(112, 94);
this.btnMOV_Temperatura_Proximo.Margin = new System.Windows.Forms.Padding(2);
this.btnMOV_Temperatura_Proximo.Name = "btnMOV_Temperatura_Proximo";
this.btnMOV_Temperatura_Proximo.Size = new System.Drawing.Size(21, 23);
this.btnMOV_Temperatura_Proximo.TabIndex = 130;
this.btnMOV_Temperatura_Proximo.Text = ">";
this.btnMOV_Temperatura_Proximo.UseVisualStyleBackColor = true;
//
// txtNaMargem
// btnMOV_Temperatura_Anterior
//
this.txtNaMargem.Location = new System.Drawing.Point(247, 136);
this.txtNaMargem.Margin = new System.Windows.Forms.Padding(2);
this.txtNaMargem.Name = "txtNaMargem";
this.txtNaMargem.ReadOnly = true;
this.txtNaMargem.Size = new System.Drawing.Size(117, 20);
this.txtNaMargem.TabIndex = 82;
this.txtNaMargem.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.btnMOV_Temperatura_Anterior.Location = new System.Drawing.Point(32, 95);
this.btnMOV_Temperatura_Anterior.Margin = new System.Windows.Forms.Padding(2);
this.btnMOV_Temperatura_Anterior.Name = "btnMOV_Temperatura_Anterior";
this.btnMOV_Temperatura_Anterior.Size = new System.Drawing.Size(21, 23);
this.btnMOV_Temperatura_Anterior.TabIndex = 129;
this.btnMOV_Temperatura_Anterior.Text = "<";
this.btnMOV_Temperatura_Anterior.UseVisualStyleBackColor = true;
//
// btnMOV_Temperatura_Redefinir
//
this.btnMOV_Temperatura_Redefinir.Location = new System.Drawing.Point(7, 95);
this.btnMOV_Temperatura_Redefinir.Margin = new System.Windows.Forms.Padding(2);
this.btnMOV_Temperatura_Redefinir.Name = "btnMOV_Temperatura_Redefinir";
this.btnMOV_Temperatura_Redefinir.Size = new System.Drawing.Size(21, 23);
this.btnMOV_Temperatura_Redefinir.TabIndex = 128;
this.btnMOV_Temperatura_Redefinir.Text = "X";
this.btnMOV_Temperatura_Redefinir.UseVisualStyleBackColor = true;
//
// btnMOV_Temperatura_Buscar
//
this.btnMOV_Temperatura_Buscar.Location = new System.Drawing.Point(58, 95);
this.btnMOV_Temperatura_Buscar.Margin = new System.Windows.Forms.Padding(2);
this.btnMOV_Temperatura_Buscar.Name = "btnMOV_Temperatura_Buscar";
this.btnMOV_Temperatura_Buscar.Size = new System.Drawing.Size(50, 23);
this.btnMOV_Temperatura_Buscar.TabIndex = 127;
this.btnMOV_Temperatura_Buscar.Text = "Buscar";
this.btnMOV_Temperatura_Buscar.UseVisualStyleBackColor = true;
//
// cmbMOV_Temperatura_Componente
//
this.cmbMOV_Temperatura_Componente.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbMOV_Temperatura_Componente.FormattingEnabled = true;
this.cmbMOV_Temperatura_Componente.Location = new System.Drawing.Point(7, 71);
this.cmbMOV_Temperatura_Componente.Margin = new System.Windows.Forms.Padding(2);
this.cmbMOV_Temperatura_Componente.Name = "cmbMOV_Temperatura_Componente";
this.cmbMOV_Temperatura_Componente.Size = new System.Drawing.Size(128, 21);
this.cmbMOV_Temperatura_Componente.TabIndex = 126;
//
// label135
//
this.label135.AutoSize = true;
this.label135.Location = new System.Drawing.Point(4, 55);
this.label135.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label135.Name = "label135";
this.label135.Size = new System.Drawing.Size(67, 13);
this.label135.TabIndex = 125;
this.label135.Text = "Componente";
//
// cmbMOV_Temperatura_Filtro
//
this.cmbMOV_Temperatura_Filtro.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbMOV_Temperatura_Filtro.FormattingEnabled = true;
this.cmbMOV_Temperatura_Filtro.Location = new System.Drawing.Point(7, 33);
this.cmbMOV_Temperatura_Filtro.Margin = new System.Windows.Forms.Padding(2);
this.cmbMOV_Temperatura_Filtro.Name = "cmbMOV_Temperatura_Filtro";
this.cmbMOV_Temperatura_Filtro.Size = new System.Drawing.Size(128, 21);
this.cmbMOV_Temperatura_Filtro.TabIndex = 124;
//
// label136
//
this.label136.AutoSize = true;
this.label136.Location = new System.Drawing.Point(4, 18);
this.label136.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label136.Name = "label136";
this.label136.Size = new System.Drawing.Size(58, 13);
this.label136.TabIndex = 123;
this.label136.Text = "Buscar por";
//
// frmResultadosOperacao
//
@ -5442,8 +5587,6 @@
((System.ComponentModel.ISupportInitialize)(this.picDIR_EF)).EndInit();
this.tabMovimentacao.ResumeLayout(false);
this.tabControl2.ResumeLayout(false);
this.tabMovVelocidade.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.chartMovVelocidade)).EndInit();
this.tabMovTemperatura.ResumeLayout(false);
this.gpbMOV_Temperatura_Analise.ResumeLayout(false);
this.gpbMOV_Temperatura_Analise.PerformLayout();
@ -5524,6 +5667,8 @@
this.pnlInformacoesOperacao.ResumeLayout(false);
this.pnlInformacoesOperacao.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picCameraCaminho)).EndInit();
this.gpbMOV_Temperatura_Filtro.ResumeLayout(false);
this.gpbMOV_Temperatura_Filtro.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -5570,7 +5715,6 @@
private System.Windows.Forms.Label lblDIR_ET;
private System.Windows.Forms.PictureBox picDIR_ET;
private System.Windows.Forms.TabControl tabControl2;
private System.Windows.Forms.TabPage tabMovVelocidade;
private System.Windows.Forms.TabPage tabMovTemperatura;
private System.Windows.Forms.TabPage tabMovGreal;
public System.Windows.Forms.DataVisualization.Charting.Chart chartMovGeral;
@ -5699,7 +5843,6 @@
private System.Windows.Forms.Label label61;
private System.Windows.Forms.Button btnMOV_Geral_Buscar;
private System.Windows.Forms.Button btnMOV_Geral_Redefinir;
public System.Windows.Forms.DataVisualization.Charting.Chart chartMovVelocidade;
private System.Windows.Forms.GroupBox gpbSEN_Filtro;
private System.Windows.Forms.Button btnSen_Redefinir;
private System.Windows.Forms.Button btnSen_Buscar;
@ -5966,5 +6109,20 @@
private System.Windows.Forms.TextBox txtDistanciaDireita;
private System.Windows.Forms.Label label132;
private System.Windows.Forms.TextBox txtDistanciaEsquerda;
private System.Windows.Forms.CheckBox chbMOV_Alimentacao_Mediana;
private System.Windows.Forms.CheckBox chbMOV_Alimentacao_Moda;
private System.Windows.Forms.CheckBox chbMOV_Alimentacao_Media;
private System.Windows.Forms.CheckBox chbMOV_Temperatura_Mediana;
private System.Windows.Forms.CheckBox chbMOV_Temperatura_Moda;
private System.Windows.Forms.CheckBox chbMOV_Temperatura_Media;
private System.Windows.Forms.GroupBox gpbMOV_Temperatura_Filtro;
private System.Windows.Forms.Button btnMOV_Temperatura_Proximo;
private System.Windows.Forms.Button btnMOV_Temperatura_Anterior;
private System.Windows.Forms.Button btnMOV_Temperatura_Redefinir;
private System.Windows.Forms.Button btnMOV_Temperatura_Buscar;
private System.Windows.Forms.ComboBox cmbMOV_Temperatura_Componente;
private System.Windows.Forms.Label label135;
private System.Windows.Forms.ComboBox cmbMOV_Temperatura_Filtro;
private System.Windows.Forms.Label label136;
}
}

View File

@ -55,7 +55,6 @@ namespace AgroBase.Forms.Operacoes
GraficoInterativoModel graficoMovGeral;
GraficoInterativoModel graficoMovTemperatura;
GraficoInterativoModel graficoMovAlimentacao;
GraficoInterativoModel graficoMovVelocidade;
GraficoInterativoModel graficoAtu;
GraficoInterativoModel graficoSen;
GraficoInterativoModel graficoCpu;
@ -200,6 +199,14 @@ namespace AgroBase.Forms.Operacoes
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "EF SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.RPM_SP).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "EF Roda",
@ -216,8 +223,16 @@ namespace AgroBase.Forms.Operacoes
},
new GraficoInterativoSerieModel()
{
Titulo = "EF SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.RPM_SP).ToList(),
Titulo = "EF km/h",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.Velocidade).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "ET SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.RPM_SP).ToList(),
Visivel = false,
MostrarValor = true
},
@ -237,8 +252,16 @@ namespace AgroBase.Forms.Operacoes
},
new GraficoInterativoSerieModel()
{
Titulo = "ET SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.RPM_SP).ToList(),
Titulo = "ET km/h",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Velocidade).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DT SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.RPM_SP).ToList(),
Visivel = false,
MostrarValor = true
},
@ -258,8 +281,16 @@ namespace AgroBase.Forms.Operacoes
},
new GraficoInterativoSerieModel()
{
Titulo = "DT SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.RPM_SP).ToList(),
Titulo = "DT km/h",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Velocidade).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DF SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.RPM_SP).ToList(),
Visivel = false,
MostrarValor = true
},
@ -279,8 +310,8 @@ namespace AgroBase.Forms.Operacoes
},
new GraficoInterativoSerieModel()
{
Titulo = "DF SP",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.RPM_SP).ToList(),
Titulo = "DF km/h",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Velocidade).ToList(),
Visivel = false,
MostrarValor = true
},
@ -290,51 +321,60 @@ namespace AgroBase.Forms.Operacoes
{
new GraficoInterativoSerieModel()
{
Titulo = "EF",
Titulo = "EF Motor",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.Temperatura).ToList(),
Visivel = true
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "ET Motor",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Temperatura).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DT Motor",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Temperatura).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DF Motor",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Temperatura).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "EF Driver",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.TemperaturaDriver).ToList(),
Visivel = false
},
new GraficoInterativoSerieModel()
{
Titulo = "ET",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Temperatura).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "ET Driver",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.TemperaturaDriver).ToList(),
Visivel = false
},
new GraficoInterativoSerieModel()
{
Titulo = "DT",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Temperatura).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DT Driver",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.TemperaturaDriver).ToList(),
Visivel = false
},
new GraficoInterativoSerieModel()
{
Titulo = "DF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Temperatura).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DF Driver",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.TemperaturaDriver).ToList(),
Visivel = false
Visivel = false,
MostrarValor = true
},
});
@ -344,128 +384,145 @@ namespace AgroBase.Forms.Operacoes
{
Titulo = "V EF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.Tensao).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "V ET",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Tensao).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "V DT",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Tensao).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "V DF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Tensao).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A EF",
Titulo = "AM EF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.Corrente_Motor).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A ET",
Titulo = "AM ET",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Corrente_Motor).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A DT",
Titulo = "AM DT",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Corrente_Motor).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A DF",
Titulo = "AM DF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Corrente_Motor).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "AB EF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.Corrente_Barramento).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "AB ET",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Corrente_Barramento).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "AB DT",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Corrente_Barramento).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "AB DF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Corrente_Barramento).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "W EF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.Potencia).ToList(),
Visivel = true
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "W ET",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Potencia).ToList(),
Visivel = true
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "W DT",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Potencia).ToList(),
Visivel = true
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "W DF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Potencia).ToList(),
Visivel = true
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "% EF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.CicloTrabalho).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "% ET",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.CicloTrabalho).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "% DT",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.CicloTrabalho).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "% DF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.CicloTrabalho).ToList(),
Visivel = true
},
});
graficoMovVelocidade = new GraficoInterativoModel(chartMovVelocidade, Momentos, new List<GraficoInterativoSerieModel>()
{
new GraficoInterativoSerieModel()
{
Titulo = "EF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.Velocidade).ToList(),
Visivel = true
},
new GraficoInterativoSerieModel()
{
Titulo = "ET",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.Velocidade).ToList(),
Visivel = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DT",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.Velocidade).ToList(),
Visivel = true
},
new GraficoInterativoSerieModel()
{
Titulo = "DF",
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.Velocidade).ToList(),
Visivel = true
Visivel = false,
MostrarValor = true
},
});
@ -476,36 +533,42 @@ namespace AgroBase.Forms.Operacoes
Titulo = "Pressão SP",
Valores = LogsAtuador.Select(x => x?.PressaoLinha_SP ?? 0).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Pressão",
Valores = LogsAtuador.Select(x => x?.PressaoLinha ?? 0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Potência",
Valores = LogsAtuador.Select(x => x?.PotenciaBomba ?? 0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Volume",
Valores = LogsAtuador.Select(x => x?.VolumeReservatorio ?? 0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Reservatório",
Valores = LogsAtuador.Select(x => x?.PercentualReservatorio ?? 0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Vazão",
Valores = LogsAtuador.Select(x => x?.VazaoFluxoMLpSMedia ?? 0).ToList(),
Visivel = true,
MostrarValor = true
}
});
@ -516,60 +579,70 @@ namespace AgroBase.Forms.Operacoes
Titulo = "V 3v3",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("3V"))?.BusVoltage ?? 0).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A 3v3",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("3V"))?.Current ?? 0).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "V 5v0",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("5V"))?.BusVoltage ?? 0).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A 5v0",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("5V"))?.Current ?? 0).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "V 7v2",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("7V2"))?.BusVoltage ?? 0).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A 7v2",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("7V2"))?.Current ?? 0).ToList(),
Visivel = false,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "V 12v",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("12V"))?.BusVoltage ?? 0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A 12v",
Valores = LogsSensoriamento.Select(x => x?.SensoresCorrente?.FirstOrDefault(y => y.ID.Contains("12V"))?.Current ?? 0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "V Bat",
Valores = LogsPzem.Select(x => x?.Tensao ?? 0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "A Bat",
Valores = LogsPzem.Select(x => x?.Corrente ?? 0).ToList(),
Visivel = true,
MostrarValor = true
}
});
@ -580,54 +653,63 @@ namespace AgroBase.Forms.Operacoes
Titulo = "CPU %",
Valores = LogsOperacao.Select(x => (double)(x?.DadosPerformance.CPU_load ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "GPU %",
Valores = LogsOperacao.Select(x => (double)(x?.DadosPerformance.GPU_load ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "HDD %",
Valores = LogsOperacao.Select(x => (double)(x?.DadosPerformance.HDD_load ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "RAM %",
Valores = LogsOperacao.Select(x => (double)(x?.DadosPerformance.RAM_usage ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "CPU Temp",
Valores = LogsOperacao.Select(x => (double)(x?.DadosPerformance.CPU_temp ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "GPU Temp",
Valores = LogsOperacao.Select(x => (double)(x?.DadosPerformance.GPU_temp ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Threads Ativas",
Valores = LogsOperacao.Select(x => (double)(x?.DadosPerformance.ActiveThreads ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Threads de Trabalho %",
Valores = LogsOperacao.Select(x => (double)((x?.DadosPerformance.MaxWorkerThreads ?? 1) - (x?.DadosPerformance.WorkerThreads ?? 0)) / (x?.DadosPerformance.MaxWorkerThreads ?? 1) * 100.0).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = "Threads de Portas %",
Valores = LogsOperacao.Select(x => (double)((x?.DadosPerformance.MaxCompletionPortThreads ?? 1) - (x?.DadosPerformance.CompletionPortThreads ?? 0)) / (x?.DadosPerformance.MaxCompletionPortThreads ?? 1) * 100.0).ToList(),
Visivel = true,
MostrarValor = true
},
});
@ -699,24 +781,28 @@ namespace AgroBase.Forms.Operacoes
Titulo = $"{camNome} RAM %",
Valores = camSolo.Select(x => (double)(x?.Leitura?.device_data?.Memory_Usage?.Percent ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = $"{camNome} CPU Temp",
Valores = camSolo.Select(x => (double)(x?.Leitura?.device_data?.Temperature?.css ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = $"{camNome} RAM Temp",
Valores = camSolo.Select(x => (double)(x?.Leitura?.device_data?.Temperature?.mss ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = $"{camNome} VCC Temp",
Valores = camSolo.Select(x => (double)(x?.Leitura?.device_data?.Temperature?.upa ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
}
});
}
@ -732,24 +818,28 @@ namespace AgroBase.Forms.Operacoes
Titulo = $"{camNome} RAM %",
Valores = camCaminho.Select(x => (double)(x?.Leitura?.device_data?.Memory_Usage?.Percent ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = $"{camNome} CPU Temp",
Valores = camCaminho.Select(x => (double)(x?.Leitura?.device_data?.Temperature?.css ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = $"{camNome} RAM Temp",
Valores = camCaminho.Select(x => (double)(x?.Leitura?.device_data?.Temperature?.mss ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
},
new GraficoInterativoSerieModel()
{
Titulo = $"{camNome} VCC Temp",
Valores = camCaminho.Select(x => (double)(x?.Leitura?.device_data?.Temperature?.upa ?? 0)).ToList(),
Visivel = true,
MostrarValor = true
}
});
}
@ -761,6 +851,7 @@ namespace AgroBase.Forms.Operacoes
private void InicializarCombosBusca()
{
CarregarInformacoesBusca(gpbMOV_Alimentacao_Filtro, graficoMovAlimentacao.Series.Select(x => x.Titulo).ToArray());
CarregarInformacoesBusca(gpbMOV_Temperatura_Filtro, graficoMovTemperatura.Series.Select(x => x.Titulo).ToArray());
CarregarInformacoesBusca(gpbMOV_Geral_Filtro, graficoMovGeral.Series.Select(x => x.Titulo).ToArray());
CarregarInformacoesBusca(gpbSEN_Filtro, graficoSen.Series.Select(x => x.Titulo).ToArray());
CarregarInformacoesBusca(gpbCpu_Filtro, graficoCpu.Series.Select(x => x.Titulo).ToArray());
@ -844,6 +935,10 @@ namespace AgroBase.Forms.Operacoes
{
grafico = graficoSen;
}
else if (gpb.Name.Contains("MOV_Temperatura"))
{
grafico = graficoMovTemperatura;
}
else if (gpb.Name.Contains("MOV_Alimentacao"))
{
grafico = graficoMovAlimentacao;
@ -1176,7 +1271,6 @@ namespace AgroBase.Forms.Operacoes
graficoMovGeral.AtualizarDados(idxMomentoAtual);
graficoMovTemperatura.AtualizarDados(idxMomentoAtual);
graficoMovAlimentacao.AtualizarDados(idxMomentoAtual);
graficoMovVelocidade.AtualizarDados(idxMomentoAtual);
AtulizarDadosMotorMovimentacao("DF");
AtulizarDadosMotorMovimentacao("DT");
@ -1208,17 +1302,24 @@ namespace AgroBase.Forms.Operacoes
TextBox txtSentido = FuncoesGlobais.FindControlRecursive<TextBox>(gpbRpm, "txtMOV_Sentido_" + ID);
txtSentido.Text = Log.EmFreio ? Enums.Direcao.EmFreio.ToString() : Log.Sentido.ToString();
GroupBox gpbTmp = FuncoesGlobais.FindControlRecursive<GroupBox>(tabMovTemperatura, "gpbMOV_Temperatura_" + ID);
TextBox txtAtual = FuncoesGlobais.FindControlRecursive<TextBox>(gpbTmp, "txtMOV_TemperaturaAt_" + ID);
txtAtual.Text = Log.Temperatura.ToString();
TextBox txtMinima = FuncoesGlobais.FindControlRecursive<TextBox>(gpbTmp, "txtMOV_TemperaturaMn_" + ID);
txtMinima.Text = LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && x.Modulo_ID == ID).Min(x => x.Temperatura).ToString("0.00");
TextBox txtMaxima = FuncoesGlobais.FindControlRecursive<TextBox>(gpbTmp, "txtMOV_TemperaturaMx_" + ID);
txtMaxima.Text = LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && x.Modulo_ID == ID).Max(x => x.Temperatura).ToString("0.00");
if (cmbMOV_Temperatura_Componente.SelectedIndex > -1)
{
var Valores = graficoMovTemperatura.Series.FirstOrDefault(x => x.Titulo == (ID + " " + cmbMOV_Temperatura_Componente.Text.Split(' ')[1])).Valores.Take(idxMomentoAtual + 1).ToList();
txtMOV_Temperatura_Media.Text = LogsMovimentacao.Where(x => x.Momento <= MomentoAtual).Average(x => x.Temperatura).ToString("0.00");
txtMOV_Temperatura_Mediana.Text = FuncoesMatematicas.CalcularMediana(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual).Select(x => x.Temperatura).ToList()).ToString("0.00");
txtMOV_Temperatura_Moda.Text = FuncoesMatematicas.CalcularModa(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual).Select(x => x.Temperatura).ToList()).ToString("0.00");
GroupBox gpbTmp = FuncoesGlobais.FindControlRecursive<GroupBox>(tabMovTemperatura, "gpbMOV_Temperatura_" + ID);
TextBox txtTmpAtual = FuncoesGlobais.FindControlRecursive<TextBox>(gpbTmp, "txtMOV_TemperaturaAt_" + ID);
txtTmpAtual.Text = Valores[idxMomentoAtual].ToString("0.00");
TextBox txtTmpMinima = FuncoesGlobais.FindControlRecursive<TextBox>(gpbTmp, "txtMOV_TemperaturaMn_" + ID);
txtTmpMinima.Text = Valores.Min().ToString("0.00");
TextBox txtTmpMaxima = FuncoesGlobais.FindControlRecursive<TextBox>(gpbTmp, "txtMOV_TemperaturaMx_" + ID);
txtTmpMaxima.Text = Valores.Max().ToString("0.00");
int dado = (cmbMOV_Temperatura_Componente.SelectedIndex) / 4;
txtMOV_Temperatura_Media.Text = LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && (chbMOV_Temperatura_Media.Checked ? x.Modulo_ID == ID : true)).Average(x => dado == 0 ? x.Temperatura : x.TemperaturaDriver).ToString("0.00");
txtMOV_Temperatura_Mediana.Text = FuncoesMatematicas.CalcularMediana(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && (chbMOV_Temperatura_Moda.Checked ? x.Modulo_ID == ID : true)).Select(x => dado == 0 ? x.Temperatura : x.TemperaturaDriver).ToList()).ToString("0.00");
txtMOV_Temperatura_Moda.Text = FuncoesMatematicas.CalcularModa(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && (chbMOV_Temperatura_Mediana.Checked ? x.Modulo_ID == ID : true)).Select(x => dado == 0 ? x.Temperatura : x.TemperaturaDriver).ToList()).ToString("0.00");
}
if (cmbMOV_AlImentacao_Componente.SelectedIndex > -1)
{
@ -1231,11 +1332,13 @@ namespace AgroBase.Forms.Operacoes
txtTnsMinima.Text = Valores.Min().ToString("0.00");
TextBox txtTnsMaxima = FuncoesGlobais.FindControlRecursive<TextBox>(gpbTns, "txtMOV_AlimentacaoMx_" + ID);
txtTnsMaxima.Text = Valores.Max().ToString("0.00");
}
txtMOV_Alimentacao_Media.Text = LogsMovimentacao.Where(x => x.Momento <= MomentoAtual).Average(x => x.Tensao).ToString("0.00");
txtMOV_Alimentacao_Mediana.Text = FuncoesMatematicas.CalcularMediana(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual).Select(x => x.Tensao).ToList()).ToString("0.00");
txtMOV_Alimentacao_Moda.Text = FuncoesMatematicas.CalcularModa(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual).Select(x => x.Tensao).ToList()).ToString("0.00");
int dado = (cmbMOV_AlImentacao_Componente.SelectedIndex) / 4;
txtMOV_Alimentacao_Media.Text = LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && (chbMOV_Alimentacao_Media.Checked ? x.Modulo_ID == ID : true)).Average(x => dado == 0 ? x.Tensao : dado == 1 ? x.Corrente_Motor : dado == 2 ? x.Corrente_Barramento : dado == 3 ? x.Potencia : x.CicloTrabalho).ToString("0.00");
txtMOV_Alimentacao_Mediana.Text = FuncoesMatematicas.CalcularMediana(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && (chbMOV_Alimentacao_Moda.Checked ? x.Modulo_ID == ID : true)).Select(x => dado == 0 ? x.Tensao : dado == 1 ? x.Corrente_Motor : dado == 2 ? x.Corrente_Barramento : dado == 3 ? x.Potencia : x.CicloTrabalho).ToList()).ToString("0.00");
txtMOV_Alimentacao_Moda.Text = FuncoesMatematicas.CalcularModa(LogsMovimentacao.Where(x => x.Momento <= MomentoAtual && (chbMOV_Alimentacao_Mediana.Checked ? x.Modulo_ID == ID : true)).Select(x => dado == 0 ? x.Tensao : dado == 1 ? x.Corrente_Motor : dado == 2 ? x.Corrente_Barramento : dado == 3 ? x.Potencia : x.CicloTrabalho).ToList()).ToString("0.00");
}
}
private void AtualizarInformacoesAtuador()

View File

@ -128,16 +128,19 @@ namespace AgroBase.Forms
pnlAnguloControle.Invalidate();
pnlOrientacaoCarro.Invalidate();
MapaDinamico.AtualizarDados(
KinectService.Iniciado && KinectService.Leitura.StatusDetecao ? KinectService.Leitura.ObstaculoCritico : null,
(float)_Sensoriamento.Trajetoria.AnguloCaminho,
(float)_Sensoriamento.Gps.AnguloCarroDefinido,
_Sensoriamento.Gps,
_Trajetoria._TrajetoriaDinamica,
_Trajetoria.CorredorAtual.Pontos,
Variaveis.OperacaoEmAndamento.GPSTrajetoria,
_Trajetoria.RuasPlantacao
);
if (_Trajetoria?.CorredorAtual != null)
{
MapaDinamico.AtualizarDados(
KinectService.Iniciado && KinectService.Leitura.StatusDetecao ? KinectService.Leitura.ObstaculoCritico : null,
(float)_Sensoriamento.Trajetoria.AnguloCaminho,
(float)_Sensoriamento.Gps.AnguloCarroDefinido,
_Sensoriamento.Gps,
_Trajetoria._TrajetoriaDinamica,
_Trajetoria.CorredorAtual.Pontos,
Variaveis.OperacaoEmAndamento.GPSTrajetoria,
_Trajetoria.RuasPlantacao
);
}
if (!Variaveis.OperacaoEmAndamento.Iniciado)
@ -364,7 +367,8 @@ namespace AgroBase.Forms
try
{
double angulo = Variaveis.OperacaoEmAndamento.SimulacaoAnguloControle;
FuncoesGlobais.DesenharInclinacao((Panel)sender, e, (float)angulo, 90);
double dif = Variaveis.OperacaoEmAndamento.OpMapaGPS.Sensoriamento.AnguloDif;
FuncoesGlobais.DesenharInclinacao((Panel)sender, e, (float)angulo, 90, (float)dif);
}
catch { }
}

View File

@ -28,7 +28,7 @@ namespace AgroBase.Models
public void btnCarregar_Click(object sender, EventArgs e, string caminhoArquivo = "", bool monitoramento = false)
{
TipoMapaOperacao? _tipoMapa = TipoMapaOperacao.Indefinido;
TipoMapaOperacao? _tipoMapa = TipoMapa;
if (!monitoramento && string.IsNullOrEmpty(caminhoArquivo))
{
@ -243,6 +243,28 @@ namespace AgroBase.Models
}
}
public void LimparDados(bool ManterDadosCarregados = false)
{
lblMapa = null;
pnlMapa = null;
chromiumWebBrowser = null;
tmrCarregamento = null;
picLoading = null;
mapaService.CaminhoMapa = null;
mapaService.MapaUrl = null;
mapaService.CaminhoDadosMapa = null;
mapaService.ArquivoSaida = null;
mapaService.CaminhoArquivo = null;
mapaService.Carregado = false;
mapaService.NomeArquivoMapa = null;
mapaService.NomeArquivos = null;
mapaService.pythonProcess = null;
mapaService.opfMapa = null;
if (!ManterDadosCarregados)
{
mapaService.DadosMapa = null;
}
}
}

View File

@ -0,0 +1,497 @@
using AgroBase.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static AgroBase.Models.Enums;
namespace AgroBase.Models.Modules
{
public class DirecionalModel
{
public string ID { get; set; } = T_Code.Dir.ToString();
// SETs
public string Endereco { get; set; }
public byte EnderecoByte
{
get
{
return Convert.ToByte(Endereco.Replace("0x", ""), 16);
}
}
public string Mod_ID
{
get
{
return Variaveis.OperacaoEmAndamento.DispMvd?.Dados?.Modulos?.FirstOrDefault(x => x.DirMotor.EnderecoByte == EnderecoByte)?.Modulo_ID ?? "";
}
}
public Sentido Sentido_SP { get; set; } = Sentido.Parado;
public double Angulo_SP { get; set; } = 0;
public double Angulo_Offset { get; set; } = 0;
public double Velocidade_Max { get; set; } = 600;
public int Velocidade
{
get
{
return Convert.ToInt32(((Variaveis.OperacaoEmAndamento.Controle?.VelocidadeMP ?? 0) / 100.0) * Velocidade_Max);
}
}
// GETs
public Sentido Sentido
{
get
{
return
Angulo > 0 ? Sentido.Horario :
Angulo < 0 ? Sentido.Antihorario :
Sentido.Parado;
}
}
public Sentido SentidoReal
{
get
{
return IN1_Atuado ? Sentido.Horario : Sentido.Antihorario;
}
}
public double Angulo
{
get
{
return MKS057DService.PulsosParaAngulo(Leitura?.NumeroPulsos ?? 0);
}
}
public double RPM
{
get
{
return Leitura?.RPM ?? 0;
}
}
public bool IN1_Atuado
{
get
{
return !(Leitura?.Entradas?[0] ?? true);
}
}
public bool IN2_Atuado
{
get
{
return !(Leitura?.Entradas?[1] ?? true);
}
}
public bool Comandar { get; set; } = false;
public bool Inicializado
{
get
{
return Leitura?.Iniciado ?? false;
}
}
private MKS057DModel _leitura = null;
public MKS057DModel Leitura
{
get
{
_leitura = MKS057DService.DadosLeitura?.FirstOrDefault(x => x.Endereco == EnderecoByte);
return _leitura;
}
set
{
_leitura = value;
}
}
public Direcao UltimaDirecao { get; set; } = Direcao.Parado;
public DateTime UltimoComandoEnviado { get; set; } = DateTime.MinValue;
public bool RetornandoAzero
{
get
{
bool foraZero = !FuncoesMatematicas.ValorEstaEntre(Angulo, 0, 1);
bool parar = UltimaDirecao == Direcao.Parado;
return foraZero && parar;
}
}
public bool EmMovimento
{
get
{
return RPM != 0;
}
}
public bool AtingiuAnguloSP
{
get
{
double anguloSp = Comandar ? Angulo_SP : 0;
return FuncoesMatematicas.ValorEstaEntre(Angulo, anguloSp, 1);
}
}
public bool PosicaoTipoMovimentoConcluido(Direcao DirecaoAtual)
{
var TipoMovimento = Variaveis.OperacaoEmAndamento.Controle.TipoMovimento;
switch (TipoMovimento)
{
case TipoMovimentoDirecional.RotacionarNoEixo:
case TipoMovimentoDirecional.MovimentoLateral:
int agSP = DirecaoAtual != Direcao.Parado ? VariaveisEquipamento.AnguloMovimento[TipoMovimento] : 0;
bool anguloCorreto = agSP == Angulo;
if (!anguloCorreto && agSP != 0)
{
if (agSP > 0)
{
anguloCorreto = Angulo >= agSP;
}
else
{
anguloCorreto = Angulo <= agSP;
}
}
return !Comandar || anguloCorreto;
default:
return !Comandar || Angulo_SP == Angulo;
}
}
public Dictionary<TipoMovimentoDirecional, ConfiguracaoSentidoMotor> ConfigSentidos { get; set; }
public List<FuncoesPinout> Funcoes { get; set; }
public static DirecionalModel CarregarParametrosIniciais(string Mod_ID, string _Endereco)
{
return new DirecionalModel()
{
ID = T_Code.Dir.ToString(),
Endereco = _Endereco,
Funcoes = new List<FuncoesPinout>()
{
FuncoesPinout.PUL,
FuncoesPinout.DIR,
FuncoesPinout.ENA,
FuncoesPinout.EncoderAbsoluto
},
ConfigSentidos = new Dictionary<TipoMovimentoDirecional, ConfiguracaoSentidoMotor>()
{
{
TipoMovimentoDirecional.RodasDianteiras,
new ConfiguracaoSentidoMotor()
{
Direita = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Esquerda = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario,
Frente = Sentido.Parado,
Tras = Sentido.Parado
}
},
{
TipoMovimentoDirecional.RodasTraseiras,
new ConfiguracaoSentidoMotor()
{
Direita = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Esquerda = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario,
Frente = Sentido.Parado,
Tras = Sentido.Parado
}
},
{
TipoMovimentoDirecional.MovimentoDiagonal,
new ConfiguracaoSentidoMotor()
{
Direita = Mod_ID == "EF" || Mod_ID == "DT" ? Sentido.Horario : Sentido.Antihorario,
Esquerda = Mod_ID == "EF" || Mod_ID == "DT" ? Sentido.Antihorario : Sentido.Horario,
Frente = Sentido.Parado,
Tras = Sentido.Parado
}
},
{
TipoMovimentoDirecional.MovimentoArco,
new ConfiguracaoSentidoMotor()
{
Direita = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Esquerda = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario,
Frente = Sentido.Parado,
Tras = Sentido.Parado
}
},
{
TipoMovimentoDirecional.RotacionarNoEixo,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Horario,
Esquerda = Sentido.Horario,
Frente = Sentido.Parado,
Tras = Sentido.Parado
}
},
{
TipoMovimentoDirecional.MovimentoLateral,
new ConfiguracaoSentidoMotor()
{
Direita = Mod_ID == "EF" || Mod_ID == "DT" ? Sentido.Horario : Sentido.Antihorario,
Esquerda = Mod_ID == "EF" || Mod_ID == "DT" ? Sentido.Antihorario : Sentido.Horario,
Frente = Sentido.Parado,
Tras = Sentido.Parado
}
},
{
TipoMovimentoDirecional.Diagnostico,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Horario,
Esquerda = Sentido.Antihorario,
Frente = Sentido.Parado,
Tras = Sentido.Parado
}
},
}
};
}
public void EnviarComandoControle(Direcao Direcao)
{
var _Simulando = Variaveis.OperacaoEmAndamento.Simulando;
if ((Inicializado && (Comandar || !AtingiuAnguloSP)) || _Simulando)
{
var _Controle = Variaveis.OperacaoEmAndamento.Controle;
int AnguloTipoMovimento = VariaveisEquipamento.AnguloMovimento[_Controle.TipoMovimento];
if (!Comandar)
{
Sentido_SP = Sentido.Parado;
}
else if (Direcao == Direcao.Direita)
{
Sentido_SP = ConfigSentidos[_Controle.TipoMovimento].Direita;
}
else if (Direcao == Direcao.Esquerda)
{
Sentido_SP = ConfigSentidos[_Controle.TipoMovimento].Esquerda;
}
else
{
Sentido_SP = Sentido.Parado;
}
UltimaDirecao = Direcao;
if (Sentido_SP == Sentido.Parado)
{
Angulo_SP = 0;
UltimaDirecao = Direcao.Parado;
}
else if (AnguloTipoMovimento != -1)
{
Angulo_SP = AnguloTipoMovimento;
}
else
{
Angulo_SP = _Controle.Angulo;
}
if (Comandar)
{
Variaveis.OperacaoEmAndamento.SimulacaoAnguloControle = Angulo_SP;
}
int mx = Sentido_SP == Sentido.Antihorario ? -1 : 1;
Angulo_SP = Math.Abs(Angulo_SP) * mx;
if (_Simulando)
{
return;
}
MKS057DService.AdicionarComandoNaFila(MKS057DService.MontarComandoMovimento(EnderecoByte, Angulo_SP, Velocidade, Sentido_SP));
UltimoComandoEnviado = DateTime.Now;
}
}
public async Task ReferenciaMotor()
{
byte Addr = EnderecoByte;
MKS057DService.AddrRef = Addr;
MKS057DService.UltimoReferenciamento = DateTime.Now;
await Task.Delay(2000);
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoSetZero(Addr));
await Task.Delay(500);
bool Sucesso = false;
bool EstadoInicial = IN1_Atuado;
bool EstadoAnterior = EstadoInicial;
double _anguloAnterior = Angulo;
double _velocidadeAnterior = 0;
int _angulo = 45;
int _offset = 0;
int tentativas = 0;
double _anguloEntrada = 9999;
double _anguloSaida = 9999;
const int MaxTentativas = 10;
DateTime TimeoutGeral = DateTime.Now.AddMinutes(2); // Timeout geral para o processo.
double anguloMaxVisitado = 0;
double anguloMinVisitado = 0;
Sentido _sentido = Sentido.Horario;
if (SentidoReal != Sentido.Parado)
{
_sentido = SentidoReal == Sentido.Horario ? Sentido.Antihorario : Sentido.Horario;
_angulo *= _sentido == Sentido.Antihorario ? -1 : 1;
}
if (!Sucesso)
{
while (!Sucesso && tentativas < MaxTentativas && DateTime.Now < TimeoutGeral && MKS057DService.Referenciando)
{
// Se o angulo ja foi visitado, entao pode se mover mais rapido, senao, se move mais devagar
int VelocidadeGiro = DefineVelocidadeReferenciamento(EstadoInicial, anguloMaxVisitado, anguloMinVisitado);
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoMovimento(Addr, _angulo, VelocidadeGiro, _sentido));
DateTime Inicio = DateTime.Now;
bool inverterGiro = false;
while (!Sucesso && !inverterGiro && Inicio.AddSeconds(120) > DateTime.Now && MKS057DService.Referenciando)
{
bool _ref = IN1_Atuado;
// Comecou com o sensor ja atuado
if (EstadoInicial)
{
// Quando houver alteracao na leitura do sensor
if (_ref != EstadoAnterior)
{
// Se estava atuado e agora nao esta mais, e ainda nao definiu o angulo de entrada
if (!_ref && _anguloEntrada == 9999)
{
_anguloEntrada = Angulo;
inverterGiro = true;
}
// Se estava atuado e agora nao esta mais, e ja definiu o angulo de entrada, e ainda nao definiu o angulo de saida
else if (!_ref && _anguloEntrada != 9999 && _anguloSaida == 9999)
{
_anguloSaida = Angulo;
}
}
}
// Comecou com o sensor nao atuado
else
{
// Quando houver alteracao na leitura do sensor
if (_ref != EstadoAnterior)
{
// Se nao estava atuado e agora esta, e ainda nao definiu o angulo de entrada
if (_ref && _anguloEntrada == 9999)
{
_anguloEntrada = Angulo;
}
// Se estava atuado e agora nao esta mais, e ja definiu o angulo de entrada, e ainda nao definiu o angulo de saida
else if (!_ref && _anguloEntrada != 9999 && _anguloSaida == 9999)
{
_anguloSaida = Angulo;
inverterGiro = true;
}
}
}
// Realiza a verificacao de necessidade de reverter a rotacao do motor apenas se ainda nao encontrou o angulo de entrada do sensor
if (_anguloEntrada == 9999)
{
inverterGiro = (_angulo > 0 && Angulo >= (_angulo - 0.5)) || (_angulo < 0 && Angulo <= (_angulo + 0.5));
}
Sucesso = _anguloEntrada != 9999 && _anguloSaida != 9999;
EstadoAnterior = _ref;
//Console.WriteLine($"Ref {Addr}: Angulo SP = {_angulo}, Velocidade: {VelocidadeGiro}, Angulo Atual = {Angulo}, Sentido SP = {_sentido.ToString()}, Passou = {inverterGiro}, Sucesso = {Sucesso}, Entrada: {_ref}");
if (Sucesso)
{
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoParada(Addr));
await Task.Delay(1500);
int _centro = Convert.ToInt32((_anguloEntrada + _anguloSaida) / 2.0);
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoMovimento(Addr, _centro, 36, Sentido.Horario));
await Task.Delay(2500);
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoSetZero(Addr));
await Task.Delay(1000);
break;
}
await Task.Delay(200); // Verificações rápidas.
VelocidadeGiro = DefineVelocidadeReferenciamento(EstadoInicial, anguloMaxVisitado, anguloMinVisitado);
if (
(_anguloAnterior == Angulo && RPM == 0) || // Verifica se o angulo nao foi alterado desde a ultima leitura, e o motor nao esta em movimento
(_velocidadeAnterior != VelocidadeGiro) // Verifica se mudou a velocidade de giro do motor de acordo com o angulo atual
)
{
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoMovimento(Addr, _angulo, VelocidadeGiro, _sentido));
}
_anguloAnterior = Angulo;
_velocidadeAnterior = VelocidadeGiro;
if (Angulo > anguloMaxVisitado)
{
anguloMaxVisitado = Angulo;
}
else if (Angulo < anguloMinVisitado)
{
anguloMinVisitado = Angulo;
}
}
if (!Sucesso && inverterGiro)
{
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoParada(Addr));
await Task.Delay(500);
_sentido = _sentido == Sentido.Horario ? Sentido.Antihorario : Sentido.Horario;
_offset = Math.Min(100, _offset + 25); // Limita o offset máximo para evitar valores extremos.
int mx = _sentido == Sentido.Antihorario ? -1 : 1;
_angulo = (Math.Abs(_angulo) + _offset) * mx;
tentativas++;
}
}
}
if (!Sucesso)
{
await MKS057DService.EnviarComandoControle(MKS057DService.MontarComandoParada(Addr));
}
MKS057DService.AddrRef = 0x00;
MKS057DService.UltimoReferenciamento = DateTime.Now;
}
private int DefineVelocidadeReferenciamento(bool EstadoInicial, double anguloMaxVisitado, double anguloMinVisitado)
{
int VelocidadeGiro =
EstadoInicial || IN1_Atuado ? 10 : // Se o sensor estiver atuado ou o fluxo tiver iniciado com ele ja atuado, entao deve se mover lentamente para melhor precisao dos angulos de entrada e saida
Angulo > (anguloMaxVisitado + 5) || Angulo < (anguloMinVisitado - 5) ? 18 : // Se o angulo atual ainda nao foi visitado, deve se mover em velocidade media
20; // Se o angulo ja foi visitado, deve se mover em uma velocidade maior
return VelocidadeGiro;
}
}
}

View File

@ -0,0 +1,623 @@
using AgroBase.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using static AgroBase.Models.Enums;
namespace AgroBase.Models.Modules
{
public class MovimentacaoModel
{
public string ID { get; set; } = T_Code.Mov.ToString();
// SETs
public string Endereco { get; set; }
public byte EnderecoByte
{
get
{
return Convert.ToByte(Endereco.Replace("0x", ""), 16);
}
}
public string Mod_ID
{
get
{
return Variaveis.OperacaoEmAndamento.DispMvd?.Dados?.Modulos?.FirstOrDefault(x => x.MovMotor.EnderecoByte == EnderecoByte)?.Modulo_ID ?? "";
}
}
public bool LeituraLigado
{
get
{
return Leitura?.CorrenteMotor != 0;
}
}
public bool ComandoLigado { get; set; } = false;
//public bool Freio { get; set; } = false;
public int CodigoAlarme
{
get
{
return Leitura?.CodigoAlarme ?? 0;
}
}
public bool AlarmeMotor
{
get
{
return CodigoAlarme > 0 && CodigoAlarme < 99;
}
}
public int RPM_SP { get; set; } = 0;
public int RPM_SP_Controle { get; set; } = 0;
public int RPM_SP_Leitura
{
get
{
return RPM_SP / Convert.ToInt32(Variaveis.OperacaoEmAndamento.DispMvd?.Dados?.ReducaoMotorBLDC ?? 1);
}
}
public Sentido Sentido_SP { get; set; } = Sentido.Parado;
public int NumeroPolos { get; set; } = 10;
public int Rampa { get; set; } = 0;
public int CorrenteTorqueMaximo { get; set; } = 40;
public double OffsetLeitura { get; set; } = 1.0;
private DateTime UltimoAlarmeComando { get; set; } = DateTime.MinValue;
public bool AlarmeComando
{
get
{
bool _alarme = ComandoLigado && !LeituraLigado && Sentido != Sentido.Parado;
if (_alarme)
{
if (UltimoAlarmeComando == DateTime.MinValue)
{
UltimoAlarmeComando = DateTime.Now;
}
if (UltimoAlarmeComando.AddSeconds(5) < DateTime.Now)
{
return true;
}
}
else
{
UltimoAlarmeComando = DateTime.MinValue;
}
return false;
}
}
// GETs
public double RPM_Roda
{
get
{
//return (Leitura?.RPM ?? 0) * OffsetLeitura;
return RPM_Motor / VariaveisEquipamento.RelacaoRPM;
}
}
public Sentido Sentido
{
get
{
return Leitura?.Direcao ?? Sentido.Parado;
}
}
public double Temperatura { get; set; } = 0;
public double TemperaturaDriver
{
get
{
return Math.Round(Leitura?.Temperatura ?? 0, 2);
}
}
public double Tensao
{
get
{
return Math.Round(Leitura?.Tensao ?? 0, 2);
}
}
public double Corrente_Barramento
{
get
{
return Math.Round(Leitura?.CorrenteBarramento ?? 0, 2);
}
}
public double Corrente_Motor
{
get
{
return Math.Round(Leitura?.CorrenteMotor ?? 0, 2);
}
}
public double Potencia
{
get
{
return Math.Round(Leitura?.Potencia ?? 0, 2);
}
}
public double CicloTrabalho
{
get
{
return Math.Round(Leitura?.CicloTrabalho ?? 0, 2);
}
}
public double RPM_Motor
{
get
{
//return Convert.ToInt32(RPM_Motor / VariaveisEquipamento.RelacaoRPM);
//return RPM_Roda * VariaveisEquipamento.RelacaoRPM;
//return RPM_Roda * 0.74;
return (Leitura?.RPM ?? 0);
}
}
public double VelocidadeInstantanea
{
get
{
return FuncoesMatematicas.CalculaVelocidadeRPM(RPM_Roda);
}
}
public bool Comandar { get; set; } = false;
public bool AlarmeSensores { get; set; } = false;
public bool Inicializado
{
get
{
return Leitura?.Iniciado ?? false;
}
}
private OIDModel _leitura = null;
public OIDModel Leitura
{
get
{
_leitura = OIDService.DadosLeitura?.FirstOrDefault(x => x.Endereco == EnderecoByte);
return _leitura;
}
set
{
_leitura = value;
}
}
public bool CompensacaoNecessaria
{
get
{
if (ComandoLigado)
{
var _Controle = Variaveis.OperacaoEmAndamento.Controle;
var _ControleDir = _Controle.TiposControle.FirstOrDefault(x => x.Tipo == T_Code.Dir);
bool movimentoCompensado =
(_Controle.TipoMovimento == TipoMovimentoDirecional.MovimentoArco) ||
(_Controle.TipoMovimento == TipoMovimentoDirecional.RodasDianteiras && Mod_ID.Contains("F")) ||
(_Controle.TipoMovimento == TipoMovimentoDirecional.RodasTraseiras && Mod_ID.Contains("T"));
bool emCurva = _ControleDir.UltimaDirecao != Direcao.Parado;
double anguloDir = Variaveis.OperacaoEmAndamento.DispMvd?.Dados?.Modulos?.FirstOrDefault(x => x.Modulo_ID == Mod_ID)?.DirMotor?.Angulo_SP ?? 0;
bool direcionalAtuado = anguloDir != 0;
if (movimentoCompensado && emCurva && direcionalAtuado)
{
if (
(_ControleDir.UltimaDirecao == Direcao.Esquerda && Mod_ID.Contains("E")) ||
(_ControleDir.UltimaDirecao == Direcao.Direita && Mod_ID.Contains("D"))
)
{
return true;
}
}
}
return false;
}
}
private float FatorCompensacaoCurvas
{
get
{
if (CompensacaoNecessaria)
{
double compensacao = 1 - FuncoesMatematicas.Map(Math.Abs(Variaveis.OperacaoEmAndamento.Controle.Angulo), 0.0, 45.0, 0.0, 0.7);
return (float)compensacao;
}
else
{
return 1;
}
}
}
public Dictionary<TipoMovimentoDirecional, ConfiguracaoSentidoMotor> ConfigSentidos { get; set; }
public List<FuncoesPinout> Funcoes { get; set; }
public List<MvdMotorMOVSensorimanetoGrafico> LogGrafico { get; set; } = new List<MvdMotorMOVSensorimanetoGrafico>();
public List<AlarmeModel> Alarmes { get; set; } = new List<AlarmeModel>();
public MvdServoFreioModel ConfigFreio { get; set; } = new MvdServoFreioModel();
public static MovimentacaoModel CarregarParametrosIniciais(string Mod_ID, string _Endereco)
{
return new MovimentacaoModel()
{
ID = T_Code.Mov.ToString(),
Endereco = _Endereco,
Funcoes = new List<FuncoesPinout>()
{
FuncoesPinout.TMP,
FuncoesPinout.ENA,
FuncoesPinout.DIR,
FuncoesPinout.PWM,
FuncoesPinout.BRK,
},
ConfigFreio = new MvdServoFreioModel()
{
AnguloInicial = 10,
Incremental = Mod_ID.Contains("E"),
Leitura = false,
},
ConfigSentidos = new Dictionary<TipoMovimentoDirecional, ConfiguracaoSentidoMotor>()
{
{
TipoMovimentoDirecional.RodasDianteiras,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Parado,
Esquerda = Sentido.Parado,
Frente = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Tras = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario
}
},
{
TipoMovimentoDirecional.RodasTraseiras,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Parado,
Esquerda = Sentido.Parado,
Frente = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Tras = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario
}
},
{
TipoMovimentoDirecional.MovimentoDiagonal,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Parado,
Esquerda = Sentido.Parado,
Frente = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Tras = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario
}
},
{
TipoMovimentoDirecional.MovimentoArco,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Parado,
Esquerda = Sentido.Parado,
Frente = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Tras = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario
}
},
{
TipoMovimentoDirecional.RotacionarNoEixo,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Parado,
Esquerda = Sentido.Parado,
Frente = Sentido.Horario,
Tras = Sentido.Antihorario
}
},
{
TipoMovimentoDirecional.MovimentoLateral,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Parado,
Esquerda = Sentido.Parado,
Frente = Mod_ID.Contains("T") ? Sentido.Horario : Sentido.Antihorario,
Tras = Mod_ID.Contains("T") ? Sentido.Antihorario : Sentido.Horario
}
},
{
TipoMovimentoDirecional.Diagnostico,
new ConfiguracaoSentidoMotor()
{
Direita = Sentido.Parado,
Esquerda = Sentido.Parado,
Frente = Mod_ID.Contains("E") ? Sentido.Horario : Sentido.Antihorario,
Tras = Mod_ID.Contains("E") ? Sentido.Antihorario : Sentido.Horario
}
},
},
};
}
public string ProtocoloConfiguracao(bool Conectar)
{
var _pinout = new PinoutDataModel()
{
ExpansorGPIO = ModuloMvdModel.Pinout.ExpansorGPIO,
EnderecoGPIO = ModuloMvdModel.Pinout.EnderecoGPIO,
ExpansorADS = ModuloMvdModel.Pinout.ExpansorADS,
EnderecoADS = ModuloMvdModel.Pinout.EnderecoADS,
Pinos = ModuloMvdModel.Pinout.Pinos.ToList(),
};
_pinout.Pinos = _pinout.Pinos.Where(x => x.ComponenteID == ID).ToList();
string Protocolo =
((int)F_Code.Cfg).ToString() + SerialService.SplitMessage +
ID + SerialService.SplitParams +
(Conectar ? "1" : "0") + SerialService.SplitParams +
Endereco + SerialService.SplitParams +
NumeroPolos + SerialService.SplitParams +
Rampa + SerialService.SplitParams +
Variaveis.OperacaoEmAndamento.DispMvd.Dados.RPM_Max_MotorBLDC + SerialService.SplitParams +
PinoutModel.PinoProtocolo(_pinout, Funcoes, SerialService.SplitParams);
return Protocolo;
}
public void EnviarComandoControle(Direcao DirecaoAtual)
{
var simulando = Variaveis.OperacaoEmAndamento.Simulando || Variaveis.OperacaoEmAndamento.Treinando;
bool Freado = DirecaoAtual == Direcao.EmFreio;
(bool AtuarServo, int AnguloFreio) = ConfigFreio.AtualizarDadosFreio(Freado, 0, -1, 5);
if ((Comandar && Inicializado) || simulando)
{
if (AlarmeSensores || AlarmeMotor)
{
DirecaoAtual = Direcao.Parado;
Freado = false;
(AtuarServo, AnguloFreio) = ConfigFreio.AtualizarDadosFreio(Freado, 0, -1, 5);
if (AlarmeMotor)
{
OIDService.RegisrarErrosComunicacao(EnderecoByte, $"Módulo com código de alarme {CodigoAlarme}, reiniciando o módulo...");
OIDService.AdicionarComandoNaFila(new OIDComandoModel()
{
Endereco = EnderecoByte,
AguardaResposta = true,
TimeoutResposta = 500,
Get = false,
Parametro = OIDService.Parametros.First(x => x.Chave == "CodErro"),
Valor = 0
});
}
}
RPM_SP_Controle = Variaveis.OperacaoEmAndamento.Controle.RPM_Motor;
RPM_SP =
DirecaoAtual == Direcao.Parado || Freado ? 0 :
RPM_SP_Controle;
ComandoLigado = RPM_SP > 0;
RPM_SP = Convert.ToInt32(RPM_SP * FatorCompensacaoCurvas);
Variaveis.OperacaoEmAndamento.SimulacaoRpmControle = (RPM_SP / VariaveisEquipamento.RelacaoRPM);
switch (DirecaoAtual)
{
case Direcao.Frente:
Sentido_SP = ConfigSentidos[Variaveis.OperacaoEmAndamento.Controle.TipoMovimento].Frente;
break;
case Direcao.Tras:
Sentido_SP = ConfigSentidos[Variaveis.OperacaoEmAndamento.Controle.TipoMovimento].Tras;
break;
default:
Sentido_SP = Sentido.Parado;
break;
}
if (simulando)
{
return;
}
byte Addr = EnderecoByte;
DateTime Agora = DateTime.Now;
bool SentidoAlterado = Sentido_SP != Sentido.Parado && (Leitura == null || Leitura.Direcao != Sentido_SP);
bool RPMAlterado = ComandoLigado && (Leitura == null || Leitura.ControleVelocidade != RPM_SP_Controle);
bool LigadoAlterado = Leitura == null || ComandoLigado != LeituraLigado;
bool FreioAlterado = Leitura == null || Leitura.Freado != Freado;
bool EnviaComando = SentidoAlterado || RPMAlterado || LigadoAlterado;
OIDModoControle modoControle =
Freado ? OIDModoControle.Freio :
ComandoLigado ? OIDModoControle.Velocidade :
OIDModoControle.Corrente;
if ((Leitura?.ModoControle ?? OIDModoControle.Velocidade) != modoControle)
{
OIDService.AdicionarComandoNaFila(new OIDComandoModel()
{
Endereco = Addr,
Parametro = OIDService.Parametros.First(x => x.Chave == "ModoControle"),
Valor = (int)modoControle,
Get = false,
AguardaResposta = false,
TimeoutResposta = 50,
});
}
if (EnviaComando && !Freado)
{
int mx =
Sentido_SP == Sentido.Horario ? 1 :
Sentido_SP == Sentido.Antihorario ? -1 :
0;
float velocidade = RPM_SP * mx;
string regisro = modoControle == OIDModoControle.Velocidade ? "ControleVelocidade" : "ControleCorrente";
OIDService.AdicionarComandoNaFila(new OIDComandoModel()
{
Endereco = Addr,
Parametro = OIDService.Parametros.First(x => x.Chave == regisro),
Valor = velocidade,
Get = false,
AguardaResposta = false,
TimeoutResposta = 50,
});
}
}
if (AtuarServo)
{
string Mod_ID = Variaveis.OperacaoEmAndamento.DispMvd.Dados.Modulos.FirstOrDefault(x => x.MovMotor.Endereco == Endereco)?.Modulo_ID ?? "";
var ServoFreio = Variaveis.OperacaoEmAndamento.DispSen.Dados.Servos.FirstOrDefault(x => x.ID.Contains(Mod_ID) && x.Inicializado && x.Controlar);
if (ServoFreio != null)
{
GeneralJoystick.EnviarComandoSensoriamento(S_Code.sFRO, ServoFreio.ID, AnguloFreio);
}
}
}
}
public class MvdServoFreioModel
{
public bool Incremental { get; set; }
public int AnguloInicial { get; set; }
private int AnguloControle { get; set; } = -1;
private int AnguloControleMin
{
get
{
if (Incremental)
{
return AnguloMin;
}
else
{
return AnguloMax;
}
}
}
private int AnguloControleMax { get; set; } = 20;
public bool Leitura { get; set; }
private bool _controle { get; set; }
public bool Controle
{
get
{
return _controle;
}
}
private int RPM_SP { get; set; }
private int MargemRPM { get; set; } = 2; // Margem de tolerância no RPM
private int AnguloMin { get; set; } = 0; // Ângulo mínimo permitido pelo servo
private int AnguloMax { get; set; } = 180; // Ângulo máximo permitido pelo servo
private int FatorEscala { get; set; } = 10; // Fator de ajuste do controle proporcional
public (bool, int) AtualizarDadosFreio(bool status, int rpm_sp = 0, int anguloInicial = -1, int anguloSP = -1)
{
bool mudou = _controle != status;
_controle = status;
RPM_SP = rpm_sp;
if (!_controle)
{
AnguloControle = AnguloControleMin; // Solta o freio se não estiver no modo de controle
return (mudou, AnguloControle);
}
if (anguloInicial == -1)
{
anguloInicial = AnguloInicial;
}
if (AnguloControle == -1)
{
AnguloControle = AnguloControleMin;
}
if (AnguloControle == AnguloControleMin)
{
AnguloControle = anguloInicial;
}
int ajuste = anguloSP;
if (anguloSP == -1)
{
double Rpm_Atual = FuncoesMatematicas.CalculaRPMVelocidade(Variaveis.OperacaoEmAndamento.DispMvd.Dados.VelocidadeMedia);
// Garante que os valores de RPM sejam válidos
Rpm_Atual = Math.Max(Rpm_Atual, 0);
RPM_SP = Math.Max(RPM_SP, 0);
// Verifica se o RPM atual está dentro da margem de tolerância
if (Math.Abs(Rpm_Atual - RPM_SP) <= MargemRPM)
{
return (false, AnguloControle); // Se dentro da margem, não ajusta o ângulo
}
// Calcula o erro e ajusta proporcionalmente
int erroRPM = RPM_SP - (int)Rpm_Atual;
ajuste = erroRPM / FatorEscala;
// Se incremental, aplica um ajuste limitado
if (Incremental)
{
ajuste = Math.Abs(ajuste); // Garante que o ajuste seja positivo
}
else
{
ajuste = -Math.Abs(ajuste); // Garante que o ajuste seja negativo
}
}
// Atualiza o ângulo de controle, garantindo que fique dentro dos limites
int limiteMax = AnguloInicial + (Incremental ? AnguloControleMax : -AnguloControleMax);
if (Incremental)
{
AnguloControle = (int)FuncoesMatematicas.Clamp(AnguloControle + ajuste, AnguloMin, limiteMax);
}
else
{
AnguloControle = (int)FuncoesMatematicas.Clamp(AnguloControle - ajuste, limiteMax, AnguloMax);
}
return (true, AnguloControle);
}
}
public class MvdMotorMOVSensorimanetoGrafico
{
public DateTime Momento { get; set; }
public string Modulo_ID { get; set; }
public int RPM_SP { get; set; }
public double RPM_Motor { get; set; }
public double RPM_Roda { get; set; }
public double Temperatura { get; set; }
public double TemperaturaDriver { get; set; }
public Sentido Sentido { get; set; }
public double Velocidade { get; set; }
public double Tensao { get; set; }
public double Corrente { get; set; }
public double Potencia { get; set; }
public double CicloTrabalho { get; set; }
}
}

File diff suppressed because it is too large Load Diff

View File

@ -780,28 +780,28 @@ namespace AgroBase.Models.Modules
public (bool, List<string>) StatusModulosSEN()
{
var _Sensores = Sensores.Where(x => x.Aferir).ToList();
var _SensoresComFalha = _Sensores.Where(x => !x.Inicializado).ToList();
bool _sensoresOperantes = _SensoresComFalha.Count() < _Sensores.Count();
var _Sensores = Sensores?.Where(x => x.Aferir).ToList();
var _SensoresComFalha = _Sensores?.Where(x => !x.Inicializado).ToList();
bool _sensoresOperantes = (_SensoresComFalha?.Count() ?? 0) < (_Sensores?.Count() ?? 0);
var _Sinaleiros = Sinaleiros.ToList();
var _SinaleirosComFalha = _Sinaleiros.Where(x => !x.Inicializado).ToList();
bool _sinaleirosOperantes = !_SinaleirosComFalha.Any();
var _Sinaleiros = Sinaleiros?.ToList();
var _SinaleirosComFalha = _Sinaleiros?.Where(x => !x.Inicializado).ToList();
bool _sinaleirosOperantes = !(_SinaleirosComFalha?.Any() ?? false);
var _Reles = Reles.Where(x => x.Controlar).ToList();
var _RelesComFalha = _Reles.Where(x => !x.Inicializado).ToList();
bool _relesOperantes = !_RelesComFalha.Any();
var _Reles = Reles?.Where(x => x.Controlar).ToList();
var _RelesComFalha = _Reles?.Where(x => !x.Inicializado).ToList();
bool _relesOperantes = !(_RelesComFalha?.Any() ?? false);
var _Servos = Servos.Where(x => x.Controlar).ToList();
var _ServosComFalha = _Servos.Where(x => !x.Inicializado).ToList();
bool _servosOperantes = !_ServosComFalha.Any();
var _Servos = Servos?.Where(x => x.Controlar).ToList();
var _ServosComFalha = _Servos?.Where(x => !x.Inicializado).ToList();
bool _servosOperantes = !(_ServosComFalha?.Any() ?? false);
bool _sensoriamentoOperante = _sensoresOperantes && _relesOperantes && _servosOperantes;
List<string> ModsComFalha =
_SensoresComFalha.Select(x => x.ID)
.Union(_SinaleirosComFalha.Select(x => x.ID))
.Union(_RelesComFalha.Select(x => x.ID))
.Union(_ServosComFalha.Select(x => x.ID))
(_SensoresComFalha?.Select(x => x.ID) ?? new List<string>())
.Union(_SinaleirosComFalha?.Select(x => x.ID) ?? new List<string>())
.Union(_RelesComFalha?.Select(x => x.ID) ?? new List<string>())
.Union(_ServosComFalha?.Select(x => x.ID) ?? new List<string>())
.ToList();
return (_sensoriamentoOperante, ModsComFalha);

View File

@ -1,18 +0,0 @@
using AgroBase.Forms.Operacoes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AgroBase.Models.Operacoes
{
public class OperacaoManualModel
{
public Form frmOperacao { get; set; } = new frmOperacaoManual();
public string frmOperacaoNome { get; set; } = "frmOperacaoManual";
public OperacaoControleModel Controle { get; set; } = new OperacaoControleModel();
public OperacaoControleModel ControleAnterior { get; set; } = new OperacaoControleModel();
}
}

View File

@ -80,7 +80,7 @@ namespace AgroBase.Models.Operacoes
double erroOrientacao = 0.0;
double anguloCamera = Variaveis.OperacaoEmAndamento.Sensoriamento.AnguloRuaCamera;
double anguloCarro = Variaveis.OperacaoEmAndamento.Sensoriamento.Gps.AnguloCarroDefinido;
double anguloRua = _Trajetoria.AnguloCaminho;
double anguloRua = _Trajetoria.ProximoPonto.OrientacaoAtual;
// Calcula a diferença de ângulo entre o carro e a rua
double diferencaAngulo = GPSUtils.CalcularDiferencaAngulo(anguloCarro, anguloRua);

View File

@ -1,5 +1,4 @@
using AgroBase.Comum;
using AgroBase.Forms;
using AgroBase.Forms.Operacoes;
using AgroBase.Models.Modules;
using AgroBase.Models.Operacoes;
@ -325,10 +324,7 @@ namespace AgroBase.Models
SonarAtivado = sonarAtivado,
QtdCamerasSolo = qtdCamerasSolo
};
Parametros.Mapa.lblMapa = null;
Parametros.Mapa.pnlMapa = null;
Parametros.Mapa.chromiumWebBrowser = null;
Parametros.Mapa.mapaService.pythonProcess = null;
Parametros.Mapa.LimparDados(true);
string ParametrosJson = JsonConvert.SerializeObject(Parametros, Formatting.None);
SaveFileDialog saveFileDialog = new SaveFileDialog();

View File

@ -954,6 +954,7 @@ namespace AgroBase.Models
int incEsq = 0;
int incDir = 0;
_Corredores = _TrajetoriaFixa
.Where(x => x.Tipo != TipoPontoRua.PosicaoRobo)
.GroupBy(x => x.idxCorredor)
.Select((x, i) =>
{

View File

@ -528,7 +528,7 @@ namespace AgroBase.Comum
File.WriteAllText(nomeArquivo, JsonConvert.SerializeObject(newConfig));
}
var configText = File.ReadAllText(nomeArquivo);
Console.WriteLine(configText);
//Console.WriteLine(configText);
var Parametros = JsonConvert.DeserializeObject<T>(configText);
return Parametros;

View File

@ -1,4 +1,5 @@
using AgroBase.Models;
using CefSharp.WinForms;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@ -22,7 +23,7 @@ namespace AgroBase.Services
public class MapasService
{
OpenFileDialog opfMapa;
public OpenFileDialog opfMapa;
public Process pythonProcess;
private string CaminhoSaida = Variaveis.CaminhoSistema + PythonService.CaminhoGeral + PythonService.CaminhoLeitura;
public string NomeArquivoMapa = "";

View File

@ -820,7 +820,7 @@ namespace AgroBase.Services
TimeoutResposta = 50,
Get = false,
Parametro = Parametros.First(x => x.Chave == "CorrenteTorqueMaximo"),
Valor = 20
Valor = Modulo.MovMotor.CorrenteTorqueMaximo
});
AdicionarComandoNaFila(new OIDComandoModel()
{

View File

@ -30,7 +30,7 @@ namespace AgroBase.Services
private static double FatorLeituraTensao = 0.01;
private static double FatorLeituraCorrente = 0.025;
private static double FatorLeituraPotencia = 0.00001;
private static double FatorLeituraPotencia = 0.001;
public static Dictionary<string, byte> CodigosFuncoes = new Dictionary<string, byte>()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@
<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
#map_eebe03e1c8b35c4c6efb116b6a0e830a {
#map_0c3554ee11c5591d304c0c6d4d52e50e {
position: relative;
width: 100.0%;
height: 100.0%;
@ -39,14 +39,14 @@
<body>
<div class="folium-map" id="map_eebe03e1c8b35c4c6efb116b6a0e830a" ></div>
<div class="folium-map" id="map_0c3554ee11c5591d304c0c6d4d52e50e" ></div>
</body>
<script>
var map_eebe03e1c8b35c4c6efb116b6a0e830a = L.map(
"map_eebe03e1c8b35c4c6efb116b6a0e830a",
var map_0c3554ee11c5591d304c0c6d4d52e50e = L.map(
"map_0c3554ee11c5591d304c0c6d4d52e50e",
{
center: [0.0, 0.0],
crs: L.CRS.EPSG3857,
@ -59,15 +59,6 @@
var tile_layer_6e83d216a544ed55ce673d8001133d0a = L.tileLayer(
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
{"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors", "detectRetina": false, "maxNativeZoom": 19, "maxZoom": 19, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
);
tile_layer_6e83d216a544ed55ce673d8001133d0a.addTo(map_eebe03e1c8b35c4c6efb116b6a0e830a);
</script>
<script>
@ -87,7 +78,7 @@
}
trajeto_json_add({"features": []});
trajeto_json.addTo(map_eebe03e1c8b35c4c6efb116b6a0e830a);
trajeto_json.addTo(map_0c3554ee11c5591d304c0c6d4d52e50e);
function adicionarGeometria(novaGeometria) {
trajeto_json.addData(novaGeometria);
@ -145,7 +136,7 @@
var marcadorDinamico = L.marker([0, 0], {
icon: customIcon
}).addTo(map_eebe03e1c8b35c4c6efb116b6a0e830a);
}).addTo(map_0c3554ee11c5591d304c0c6d4d52e50e);
// Conectar ao broker MQTT
const client = mqtt.connect('ws://localhost:9001'); // Use wss para conexão segura
@ -183,7 +174,7 @@
marcadorDinamico.setRotationAngle(angulo);
adicionarCoordenada("Tj", [novaLongitude, novaLatitude]);
map_eebe03e1c8b35c4c6efb116b6a0e830a.setView(novaPosicao, map_eebe03e1c8b35c4c6efb116b6a0e830a.getZoom());
map_0c3554ee11c5591d304c0c6d4d52e50e.setView(novaPosicao, map_0c3554ee11c5591d304c0c6d4d52e50e.getZoom());
});
function calcularOrientacao(P1latitude, P1longitude, P2latitude, P2longitude) {

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
baee8a0ca18d340abe8739a630dc7cdec8260037bef83b42509798d9be128a31
5941701e8325b99f36fff6b9c1588b65d819d36a36bdbfbca35ae4c40535bf7e

View File

@ -72,6 +72,8 @@
this.lblVelocidadeComErvas = new System.Windows.Forms.Label();
this.lblVelocidadeSemErvas = new System.Windows.Forms.Label();
this.gpbAtuador = new System.Windows.Forms.GroupBox();
this.txtQtdCameras = new System.Windows.Forms.TextBox();
this.lblQuantidadeCamerasSolo = new System.Windows.Forms.Label();
this.lblMs = new System.Windows.Forms.Label();
this.txtDuracaoAtuacao = new System.Windows.Forms.TextBox();
this.lblDuracaoAtuacao = new System.Windows.Forms.Label();
@ -103,8 +105,8 @@
this.btnCarregar = new System.Windows.Forms.Button();
this.txtDescricao = new System.Windows.Forms.TextBox();
this.lblDescricao = new System.Windows.Forms.Label();
this.txtQtdCameras = new System.Windows.Forms.TextBox();
this.lblQuantidadeCamerasSolo = new System.Windows.Forms.Label();
this.pnlZoomMapa = new System.Windows.Forms.Panel();
this.chbMapaDinamico = new System.Windows.Forms.CheckBox();
this.gpbModulos.SuspendLayout();
this.pnlModulos.SuspendLayout();
this.tabControl1.SuspendLayout();
@ -117,6 +119,7 @@
this.gpbAtuador.SuspendLayout();
this.gpbDirecional.SuspendLayout();
this.tabMapa.SuspendLayout();
this.pnlMapa.SuspendLayout();
this.SuspendLayout();
//
// gpbModulos
@ -640,6 +643,24 @@
this.gpbAtuador.TabStop = false;
this.gpbAtuador.Text = "Atuador";
//
// txtQtdCameras
//
this.txtQtdCameras.Location = new System.Drawing.Point(358, 163);
this.txtQtdCameras.Name = "txtQtdCameras";
this.txtQtdCameras.Size = new System.Drawing.Size(100, 20);
this.txtQtdCameras.TabIndex = 13;
this.txtQtdCameras.Text = "1";
this.txtQtdCameras.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// lblQuantidadeCamerasSolo
//
this.lblQuantidadeCamerasSolo.AutoSize = true;
this.lblQuantidadeCamerasSolo.Location = new System.Drawing.Point(6, 166);
this.lblQuantidadeCamerasSolo.Name = "lblQuantidadeCamerasSolo";
this.lblQuantidadeCamerasSolo.Size = new System.Drawing.Size(319, 13);
this.lblQuantidadeCamerasSolo.TabIndex = 14;
this.lblQuantidadeCamerasSolo.Text = "Quantidade de câmeras para detecção de ervas daninhas no solo";
//
// lblMs
//
this.lblMs.AutoSize = true;
@ -828,6 +849,7 @@
//
// tabMapa
//
this.tabMapa.Controls.Add(this.chbMapaDinamico);
this.tabMapa.Controls.Add(this.lblTempoEstimado);
this.tabMapa.Controls.Add(this.lblDistanciaOperacao);
this.tabMapa.Controls.Add(this.lblDistanciaTotal);
@ -894,6 +916,7 @@
this.pnlMapa.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlMapa.Controls.Add(this.pnlZoomMapa);
this.pnlMapa.Location = new System.Drawing.Point(6, 52);
this.pnlMapa.Name = "pnlMapa";
this.pnlMapa.Size = new System.Drawing.Size(550, 359);
@ -937,23 +960,28 @@
this.lblDescricao.TabIndex = 7;
this.lblDescricao.Text = "Descrição";
//
// txtQtdCameras
// pnlZoomMapa
//
this.txtQtdCameras.Location = new System.Drawing.Point(358, 163);
this.txtQtdCameras.Name = "txtQtdCameras";
this.txtQtdCameras.Size = new System.Drawing.Size(100, 20);
this.txtQtdCameras.TabIndex = 13;
this.txtQtdCameras.Text = "1";
this.txtQtdCameras.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.pnlZoomMapa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pnlZoomMapa.BackColor = System.Drawing.Color.White;
this.pnlZoomMapa.Location = new System.Drawing.Point(159, 43);
this.pnlZoomMapa.Name = "pnlZoomMapa";
this.pnlZoomMapa.Size = new System.Drawing.Size(388, 313);
this.pnlZoomMapa.TabIndex = 16;
this.pnlZoomMapa.Visible = false;
//
// lblQuantidadeCamerasSolo
// chbMapaDinamico
//
this.lblQuantidadeCamerasSolo.AutoSize = true;
this.lblQuantidadeCamerasSolo.Location = new System.Drawing.Point(6, 166);
this.lblQuantidadeCamerasSolo.Name = "lblQuantidadeCamerasSolo";
this.lblQuantidadeCamerasSolo.Size = new System.Drawing.Size(319, 13);
this.lblQuantidadeCamerasSolo.TabIndex = 14;
this.lblQuantidadeCamerasSolo.Text = "Quantidade de câmeras para detecção de ervas daninhas no solo";
this.chbMapaDinamico.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbMapaDinamico.AutoSize = true;
this.chbMapaDinamico.Location = new System.Drawing.Point(425, 34);
this.chbMapaDinamico.Name = "chbMapaDinamico";
this.chbMapaDinamico.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.chbMapaDinamico.Size = new System.Drawing.Size(128, 17);
this.chbMapaDinamico.TabIndex = 6;
this.chbMapaDinamico.Text = "Exibir Mapa Dinamico";
this.chbMapaDinamico.UseVisualStyleBackColor = true;
this.chbMapaDinamico.CheckedChanged += new System.EventHandler(this.chbMapaDinamico_CheckedChanged);
//
// frmAjustesOperacao
//
@ -991,6 +1019,7 @@
this.gpbDirecional.PerformLayout();
this.tabMapa.ResumeLayout(false);
this.tabMapa.PerformLayout();
this.pnlMapa.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -1075,5 +1104,7 @@
private System.Windows.Forms.CheckBox chbSonarAtivado;
private System.Windows.Forms.TextBox txtQtdCameras;
private System.Windows.Forms.Label lblQuantidadeCamerasSolo;
private System.Windows.Forms.Panel pnlZoomMapa;
private System.Windows.Forms.CheckBox chbMapaDinamico;
}
}

View File

@ -17,10 +17,13 @@ namespace AgroMonitor.Forms
string path = Variaveis.CaminhoSistema + Variaveis.CaminhoOperacoes + "\\" + MapasVariaveisModel.NomeArquivoMapaInterativoSaida;
UltrasonicA05Configuracoes ConfigUltrassom = UltrasonicA05Helper.CarregarConfiguracaoPadrao(ConfiguracaoSensorUltrassonico.NaoUtilizado);
bool carregarOpPadrao = true;
MapaDinamicoModel MapaDinamico;
public frmAjustesOperacao()
{
InitializeComponent();
MapaDinamico = new MapaDinamicoModel(this, pnlZoomMapa);
}
private void frmAjustesOperacao_Load(object sender, EventArgs e)
@ -81,6 +84,9 @@ namespace AgroMonitor.Forms
cmbConfiguracaoUltrassom.SelectedIndex = (int)ConfigUltrassom.Configuracao;
}
chbSonarAtivado.Checked = Variaveis.OperacaoEmAndamento.Controle.SonarAtivado;
string nomeOpPadrao = "OP_" + DateTime.Now.ToString("dd_MM_yyyy_mm_ss");
txtDescricao.Text = nomeOpPadrao;
}
private void btnProximo_Click(object sender, EventArgs e)
@ -128,6 +134,24 @@ namespace AgroMonitor.Forms
string tempo = Variaveis.OperacaoEmAndamento.Trajetoria?.TempoEstimadoOperacao;
lblTempoEstimado.Text = $"Tempo estimado: {tempo}";
if (chbMapaDinamico.Checked)
{
var _Trajetoria = Variaveis.OperacaoEmAndamento.Trajetoria;
GPSModel posicao = _Trajetoria.RuasPlantacao.Any() ? _Trajetoria.RuasPlantacao[0][_Trajetoria.ExtremoMaisProximoMapa == 0 ? 0 : _Trajetoria.RuasPlantacao[0].Count - 1] : GPSService.UltimaLeitura;
MapaDinamico.AtualizarDados(
null,
(float)0,
(float)0,
posicao,
_Trajetoria._TrajetoriaDinamica,
_Trajetoria.CorredorAtual.Pontos,
Variaveis.OperacaoEmAndamento.GPSTrajetoria,
_Trajetoria.RuasPlantacao
);
}
}
@ -171,8 +195,9 @@ namespace AgroMonitor.Forms
MessageBox.Show("Operação carregada com sucesso!", "Sucesso", MessageBoxButtons.OK, MessageBoxIcon.Information);
tmrDadosMapa?.Dispose();
tmrDadosMapa = new AsyncTaskTimerModel("tmrDadosMapa", tmrDadosMapa_Tick, 500, this);
tmrDadosMapa.Start();
tmrDadosMapa?.Start();
await Task.Delay(2000);
@ -246,5 +271,10 @@ namespace AgroMonitor.Forms
double Velocidade = FuncoesMatematicas.ConverteMsParaKmh(velocidadeMs);
txtVelocidadeComErvas.Text = Velocidade.ToString("0.00");
}
private void chbMapaDinamico_CheckedChanged(object sender, EventArgs e)
{
pnlZoomMapa.Visible = chbMapaDinamico.Checked;
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long