diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/4b0c79da-8553-44d3-9669-36b42a88db71.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/4b0c79da-8553-44d3-9669-36b42a88db71.vsidx new file mode 100644 index 000000000..d9680cf26 Binary files /dev/null and b/AgroBase/.vs/AgroBase/FileContentIndex/4b0c79da-8553-44d3-9669-36b42a88db71.vsidx differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/e1485980-9f8d-47dd-9b6f-a196945b13d9.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/e1485980-9f8d-47dd-9b6f-a196945b13d9.vsidx deleted file mode 100644 index decc9ec1a..000000000 Binary files a/AgroBase/.vs/AgroBase/FileContentIndex/e1485980-9f8d-47dd-9b6f-a196945b13d9.vsidx and /dev/null differ diff --git a/AgroBase/.vs/AgroBase/v17/.suo b/AgroBase/.vs/AgroBase/v17/.suo index 870749adf..9f760820f 100644 Binary files a/AgroBase/.vs/AgroBase/v17/.suo and b/AgroBase/.vs/AgroBase/v17/.suo differ diff --git a/AgroBase/AgroBase/Forms/Atuador/frmAtuCalibragem.cs b/AgroBase/AgroBase/Forms/Atuador/frmAtuCalibragem.cs index ef7ea1044..1b87e4114 100644 --- a/AgroBase/AgroBase/Forms/Atuador/frmAtuCalibragem.cs +++ b/AgroBase/AgroBase/Forms/Atuador/frmAtuCalibragem.cs @@ -145,7 +145,7 @@ namespace AgroBase.Forms.Atuador grdSensoriamento.Rows[0].Cells[1].Value = DispAtu.Dados.BombaPressurizadora.Inicializado; grdSensoriamento.Rows[1].Cells[1].Value = DispAtu.Dados.BombaPressurizadora.ComandoAtuar; grdSensoriamento.Rows[2].Cells[1].Value = DispAtu.Dados.BombaPressurizadora.LeituraEstado; - grdSensoriamento.Rows[3].Cells[1].Value = DispAtu.Dados.BombaPressurizadora.Potencia; + grdSensoriamento.Rows[3].Cells[1].Value = DispAtu.Dados.BombaPressurizadora.LeituraPotencia; grdSensoriamento.Rows[4].Cells[1].Value = DispAtu.Dados.PressaoLinha.ToString("0.00000"); grdSensoriamento.Rows[5].Cells[1].Value = DispAtu.Dados.PressaoLinhaCalc.ToString("0.00000"); grdSensoriamento.Rows[6].Cells[1].Value = DispAtu.Dados.VazaoFluxoMLpS.ToString("0.00000"); diff --git a/AgroBase/AgroBase/Forms/Atuador/frmAtuConfig.cs b/AgroBase/AgroBase/Forms/Atuador/frmAtuConfig.cs index a9225c2cd..f4ad5b194 100644 --- a/AgroBase/AgroBase/Forms/Atuador/frmAtuConfig.cs +++ b/AgroBase/AgroBase/Forms/Atuador/frmAtuConfig.cs @@ -2,15 +2,8 @@ using AgroBase.Forms.Sensoriamento; using AgroBase.Models; using AgroBase.Models.Modules; -using Emgu.CV.Ocl; using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; using static AgroBase.Models.Enums; @@ -32,7 +25,7 @@ namespace AgroBase.Forms.Atuador return; } - chbBicosAtuacao.Checked = Disp.Dados.AtuacaoNivelAlto; + chbBicosAtuacao.Checked = Disp.Dados.BicosPulverizadores.Any(x => x.AtuacaoNivelAlto); nudBicosQtd.Value = Disp.Dados.QuantidadeBicos; txtDensidade.Text = Disp.Dados.DensidadeHerbicida.ToString("0.00"); nudCapMax.Value = Convert.ToInt32(Variaveis.OperacaoEmAndamento.CapacidadeReservatorio); @@ -46,7 +39,7 @@ namespace AgroBase.Forms.Atuador private void btnSalvar_Click(object sender, EventArgs e) { - Disp.Dados.AtuacaoNivelAlto = chbBicosAtuacao.Checked; + Disp.Dados.BicosPulverizadores.ForEach(x => x.AtuacaoNivelAlto = chbBicosAtuacao.Checked); Disp.Dados.QuantidadeBicos = Convert.ToInt32(nudBicosQtd.Value); Disp.Dados.DensidadeHerbicida = Convert.ToDouble(txtDensidade.Text.Replace(".", ",")); Variaveis.OperacaoEmAndamento.CapacidadeReservatorio = Convert.ToDouble(nudCapMax.Value); diff --git a/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs b/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs index ff8122b8e..e54e43905 100644 --- a/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs +++ b/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs @@ -814,7 +814,7 @@ namespace AgroBase.Forms.IHM foreach (var Modulo in Dispositivo.Dados.Modulos) { - var Leitura = MKS057DService.DadosLeitura.FirstOrDefault(x => x.Endereco == Convert.ToByte(Modulo.DirMotor.Endereco, 16)); + var Leitura = Modulo.DirMotor.Leitura; bool Conectado = SerialService.DispositivosMapeados.Any(x => x.Dispositivo == Enums.T_Code.Mks && x.Mod_ID == Modulo.Modulo_ID); idx = PreencheDadosLinha(grid, Testes, idx, Conectado ? 1 : 0); @@ -857,7 +857,7 @@ namespace AgroBase.Forms.IHM private async Task EnviarComandoDir(ModuloMvdModel Modulo, Enums.Direcao Sentido, ColunasDiagnosticoModel Teste, int Timeout) { - await Modulo.DirMotor.EnviarComandoControle(Sentido); + Modulo.DirMotor.EnviarComandoControle(Sentido); DateTime Inicio = DateTime.Now; bool Sucesso = false; @@ -1476,7 +1476,7 @@ namespace AgroBase.Forms.IHM await EnviarComandoSinaleiro(Dispositivo, Sinaleiro, true, 1000); } - StatusLED Status = (((FirmwareSinaleiro)Sinaleiro.Leitura)?.Leitura ?? StatusLED.Apagado); + StatusLED Status = Sinaleiro.LeituraStatus; idx = PreencheDadosLinha(grid, Testes, idx, Iniciado && Status == StatusLED.Aceso ? 1 : 0); if (Iniciado) @@ -1484,7 +1484,7 @@ namespace AgroBase.Forms.IHM await EnviarComandoSinaleiro(Dispositivo, Sinaleiro, false, 1000); } - Status = (((FirmwareSinaleiro)Sinaleiro.Leitura)?.Leitura ?? StatusLED.Apagado); + Status = Sinaleiro.LeituraStatus; idx = PreencheDadosLinha(grid, Testes, idx, Iniciado && Status == StatusLED.Apagado ? 0 : 1); } diff --git a/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.Designer.cs b/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.Designer.cs index 3888a6a9a..9aa1874cb 100644 --- a/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.Designer.cs +++ b/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.Designer.cs @@ -28,9 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); this.pnlCamerasSolo = new System.Windows.Forms.Panel(); this.pnlCameraSoloE = new System.Windows.Forms.Panel(); this.pnlCameraSoloD = new System.Windows.Forms.Panel(); @@ -77,6 +77,7 @@ this.lblKmh = new System.Windows.Forms.Label(); this.cmbTipoMovimento = new System.Windows.Forms.ComboBox(); this.lblTipoMovimento = new System.Windows.Forms.Label(); + this.chbPulverizador = new System.Windows.Forms.CheckBox(); this.pnlCamerasSolo.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.chartGraficos)).BeginInit(); this.tabControl1.SuspendLayout(); @@ -149,17 +150,17 @@ // this.chartGraficos.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - chartArea1.Name = "ChartArea1"; - this.chartGraficos.ChartAreas.Add(chartArea1); - legend1.Name = "Legend1"; - this.chartGraficos.Legends.Add(legend1); + chartArea3.Name = "ChartArea1"; + this.chartGraficos.ChartAreas.Add(chartArea3); + legend3.Name = "Legend1"; + this.chartGraficos.Legends.Add(legend3); this.chartGraficos.Location = new System.Drawing.Point(640, 7); this.chartGraficos.Margin = new System.Windows.Forms.Padding(2); this.chartGraficos.Name = "chartGraficos"; - series1.ChartArea = "ChartArea1"; - series1.Legend = "Legend1"; - series1.Name = "Series1"; - this.chartGraficos.Series.Add(series1); + series3.ChartArea = "ChartArea1"; + series3.Legend = "Legend1"; + series3.Name = "Series1"; + this.chartGraficos.Series.Add(series3); this.chartGraficos.Size = new System.Drawing.Size(591, 318); this.chartGraficos.TabIndex = 2; this.chartGraficos.Text = "chart1"; @@ -522,7 +523,7 @@ // chbSonar // this.chbSonar.AutoSize = true; - this.chbSonar.Location = new System.Drawing.Point(227, 311); + this.chbSonar.Location = new System.Drawing.Point(157, 310); this.chbSonar.Margin = new System.Windows.Forms.Padding(2); this.chbSonar.Name = "chbSonar"; this.chbSonar.Size = new System.Drawing.Size(183, 17); @@ -610,12 +611,25 @@ this.lblTipoMovimento.TabIndex = 34; this.lblTipoMovimento.Text = "Tipo de Movimento"; // + // chbPulverizador + // + this.chbPulverizador.AutoSize = true; + this.chbPulverizador.Location = new System.Drawing.Point(342, 310); + this.chbPulverizador.Margin = new System.Windows.Forms.Padding(2); + this.chbPulverizador.Name = "chbPulverizador"; + this.chbPulverizador.Size = new System.Drawing.Size(139, 17); + this.chbPulverizador.TabIndex = 35; + this.chbPulverizador.Text = "Pulverizador automático"; + this.chbPulverizador.UseVisualStyleBackColor = true; + this.chbPulverizador.CheckedChanged += new System.EventHandler(this.chbPulverizador_CheckedChanged); + // // frmOperacaoManual // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(1243, 649); + this.Controls.Add(this.chbPulverizador); this.Controls.Add(this.lblTipoMovimento); this.Controls.Add(this.cmbTipoMovimento); this.Controls.Add(this.lblKmh); @@ -716,5 +730,6 @@ private System.Windows.Forms.Label lblKmh; private System.Windows.Forms.ComboBox cmbTipoMovimento; private System.Windows.Forms.Label lblTipoMovimento; + private System.Windows.Forms.CheckBox chbPulverizador; } } \ No newline at end of file diff --git a/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs b/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs index bc27b445a..48fe33802 100644 --- a/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs +++ b/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs @@ -187,8 +187,10 @@ namespace AgroBase.Forms.Operacoes string ID = pnl.Name.Replace("pnlDir_", ""); var Modulo = Variaveis.OperacaoEmAndamento.DispMvd.Dados.Modulos.FirstOrDefault(m => m.Modulo_ID == ID); + double Angulo = Modulo.DirMotor.Angulo; + Label lblAngulo = pnl.Controls.OfType