ajustes nas firmwares Atu e Sen e criacao do botao para reiniciar o modulo
This commit is contained in:
parent
e7433eab9d
commit
0499f998d1
|
|
@ -56,6 +56,8 @@
|
||||||
this.tabDeteccoes = new System.Windows.Forms.TabPage();
|
this.tabDeteccoes = new System.Windows.Forms.TabPage();
|
||||||
this.pnlDeteccoesRua = new System.Windows.Forms.Panel();
|
this.pnlDeteccoesRua = new System.Windows.Forms.Panel();
|
||||||
this.tabPulverizador = new System.Windows.Forms.TabPage();
|
this.tabPulverizador = new System.Windows.Forms.TabPage();
|
||||||
|
this.lblPotenciaSP = new System.Windows.Forms.Label();
|
||||||
|
this.nudPotenciaSP = new System.Windows.Forms.NumericUpDown();
|
||||||
this.btnDeslsigarAgitador = new System.Windows.Forms.Button();
|
this.btnDeslsigarAgitador = new System.Windows.Forms.Button();
|
||||||
this.btnLigarAgitador = new System.Windows.Forms.Button();
|
this.btnLigarAgitador = new System.Windows.Forms.Button();
|
||||||
this.lblPressaoSP = new System.Windows.Forms.Label();
|
this.lblPressaoSP = new System.Windows.Forms.Label();
|
||||||
|
|
@ -83,8 +85,7 @@
|
||||||
this.chbPulverizador = new System.Windows.Forms.CheckBox();
|
this.chbPulverizador = new System.Windows.Forms.CheckBox();
|
||||||
this.flwCamerasSolo = new System.Windows.Forms.FlowLayoutPanel();
|
this.flwCamerasSolo = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
this.chbSonarAtivado = new System.Windows.Forms.CheckBox();
|
this.chbSonarAtivado = new System.Windows.Forms.CheckBox();
|
||||||
this.lblPotenciaSP = new System.Windows.Forms.Label();
|
this.lblPressao = new System.Windows.Forms.Label();
|
||||||
this.nudPotenciaSP = new System.Windows.Forms.NumericUpDown();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.chartGraficos)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.chartGraficos)).BeginInit();
|
||||||
this.tabControl1.SuspendLayout();
|
this.tabControl1.SuspendLayout();
|
||||||
this.tabMapa.SuspendLayout();
|
this.tabMapa.SuspendLayout();
|
||||||
|
|
@ -92,12 +93,12 @@
|
||||||
((System.ComponentModel.ISupportInitialize)(this.gridDados)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.gridDados)).BeginInit();
|
||||||
this.tabDeteccoes.SuspendLayout();
|
this.tabDeteccoes.SuspendLayout();
|
||||||
this.tabPulverizador.SuspendLayout();
|
this.tabPulverizador.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudPotenciaSP)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).BeginInit();
|
||||||
this.pnlDir_EF.SuspendLayout();
|
this.pnlDir_EF.SuspendLayout();
|
||||||
this.pnlDir_ET.SuspendLayout();
|
this.pnlDir_ET.SuspendLayout();
|
||||||
this.pnlDir_DT.SuspendLayout();
|
this.pnlDir_DT.SuspendLayout();
|
||||||
this.pnlDir_DF.SuspendLayout();
|
this.pnlDir_DF.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudPotenciaSP)).BeginInit();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// pnlAtuadores
|
// pnlAtuadores
|
||||||
|
|
@ -272,6 +273,9 @@
|
||||||
//
|
//
|
||||||
// pnlMapa
|
// pnlMapa
|
||||||
//
|
//
|
||||||
|
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.Location = new System.Drawing.Point(104, 2);
|
this.pnlMapa.Location = new System.Drawing.Point(104, 2);
|
||||||
this.pnlMapa.Margin = new System.Windows.Forms.Padding(2);
|
this.pnlMapa.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.pnlMapa.Name = "pnlMapa";
|
this.pnlMapa.Name = "pnlMapa";
|
||||||
|
|
@ -386,6 +390,28 @@
|
||||||
this.tabPulverizador.Text = "Pulverizador";
|
this.tabPulverizador.Text = "Pulverizador";
|
||||||
this.tabPulverizador.UseVisualStyleBackColor = true;
|
this.tabPulverizador.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// lblPotenciaSP
|
||||||
|
//
|
||||||
|
this.lblPotenciaSP.AutoSize = true;
|
||||||
|
this.lblPotenciaSP.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.lblPotenciaSP.Location = new System.Drawing.Point(21, 57);
|
||||||
|
this.lblPotenciaSP.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.lblPotenciaSP.Name = "lblPotenciaSP";
|
||||||
|
this.lblPotenciaSP.Size = new System.Drawing.Size(77, 13);
|
||||||
|
this.lblPotenciaSP.TabIndex = 33;
|
||||||
|
this.lblPotenciaSP.Text = "Potencia SP";
|
||||||
|
//
|
||||||
|
// nudPotenciaSP
|
||||||
|
//
|
||||||
|
this.nudPotenciaSP.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.nudPotenciaSP.Location = new System.Drawing.Point(21, 73);
|
||||||
|
this.nudPotenciaSP.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.nudPotenciaSP.Name = "nudPotenciaSP";
|
||||||
|
this.nudPotenciaSP.Size = new System.Drawing.Size(79, 19);
|
||||||
|
this.nudPotenciaSP.TabIndex = 32;
|
||||||
|
this.nudPotenciaSP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
this.nudPotenciaSP.ValueChanged += new System.EventHandler(this.nudPotenciaSP_ValueChanged);
|
||||||
|
//
|
||||||
// btnDeslsigarAgitador
|
// btnDeslsigarAgitador
|
||||||
//
|
//
|
||||||
this.btnDeslsigarAgitador.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btnDeslsigarAgitador.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
|
@ -683,27 +709,17 @@
|
||||||
this.chbSonarAtivado.UseVisualStyleBackColor = true;
|
this.chbSonarAtivado.UseVisualStyleBackColor = true;
|
||||||
this.chbSonarAtivado.CheckedChanged += new System.EventHandler(this.chbSonarAtivado_CheckedChanged);
|
this.chbSonarAtivado.CheckedChanged += new System.EventHandler(this.chbSonarAtivado_CheckedChanged);
|
||||||
//
|
//
|
||||||
// lblPotenciaSP
|
// lblPressao
|
||||||
//
|
//
|
||||||
this.lblPotenciaSP.AutoSize = true;
|
this.lblPressao.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.lblPotenciaSP.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.lblPressao.AutoSize = true;
|
||||||
this.lblPotenciaSP.Location = new System.Drawing.Point(21, 57);
|
this.lblPressao.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.lblPotenciaSP.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
this.lblPressao.Location = new System.Drawing.Point(1111, 500);
|
||||||
this.lblPotenciaSP.Name = "lblPotenciaSP";
|
this.lblPressao.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
this.lblPotenciaSP.Size = new System.Drawing.Size(77, 13);
|
this.lblPressao.Name = "lblPressao";
|
||||||
this.lblPotenciaSP.TabIndex = 33;
|
this.lblPressao.Size = new System.Drawing.Size(109, 37);
|
||||||
this.lblPotenciaSP.Text = "Potencia SP";
|
this.lblPressao.TabIndex = 38;
|
||||||
//
|
this.lblPressao.Text = "80 psi";
|
||||||
// nudPotenciaSP
|
|
||||||
//
|
|
||||||
this.nudPotenciaSP.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
||||||
this.nudPotenciaSP.Location = new System.Drawing.Point(21, 73);
|
|
||||||
this.nudPotenciaSP.Margin = new System.Windows.Forms.Padding(2);
|
|
||||||
this.nudPotenciaSP.Name = "nudPotenciaSP";
|
|
||||||
this.nudPotenciaSP.Size = new System.Drawing.Size(79, 19);
|
|
||||||
this.nudPotenciaSP.TabIndex = 32;
|
|
||||||
this.nudPotenciaSP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
|
||||||
this.nudPotenciaSP.ValueChanged += new System.EventHandler(this.nudPotenciaSP_ValueChanged);
|
|
||||||
//
|
//
|
||||||
// frmOperacaoManual
|
// frmOperacaoManual
|
||||||
//
|
//
|
||||||
|
|
@ -711,6 +727,7 @@
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.White;
|
this.BackColor = System.Drawing.Color.White;
|
||||||
this.ClientSize = new System.Drawing.Size(1243, 649);
|
this.ClientSize = new System.Drawing.Size(1243, 649);
|
||||||
|
this.Controls.Add(this.lblPressao);
|
||||||
this.Controls.Add(this.chbSonarAtivado);
|
this.Controls.Add(this.chbSonarAtivado);
|
||||||
this.Controls.Add(this.flwCamerasSolo);
|
this.Controls.Add(this.flwCamerasSolo);
|
||||||
this.Controls.Add(this.chbPulverizador);
|
this.Controls.Add(this.chbPulverizador);
|
||||||
|
|
@ -748,6 +765,7 @@
|
||||||
this.tabDeteccoes.ResumeLayout(false);
|
this.tabDeteccoes.ResumeLayout(false);
|
||||||
this.tabPulverizador.ResumeLayout(false);
|
this.tabPulverizador.ResumeLayout(false);
|
||||||
this.tabPulverizador.PerformLayout();
|
this.tabPulverizador.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudPotenciaSP)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).EndInit();
|
||||||
this.pnlDir_EF.ResumeLayout(false);
|
this.pnlDir_EF.ResumeLayout(false);
|
||||||
this.pnlDir_EF.PerformLayout();
|
this.pnlDir_EF.PerformLayout();
|
||||||
|
|
@ -757,7 +775,6 @@
|
||||||
this.pnlDir_DT.PerformLayout();
|
this.pnlDir_DT.PerformLayout();
|
||||||
this.pnlDir_DF.ResumeLayout(false);
|
this.pnlDir_DF.ResumeLayout(false);
|
||||||
this.pnlDir_DF.PerformLayout();
|
this.pnlDir_DF.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudPotenciaSP)).EndInit();
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
|
@ -817,5 +834,6 @@
|
||||||
private System.Windows.Forms.Button btnLigarAgitador;
|
private System.Windows.Forms.Button btnLigarAgitador;
|
||||||
private System.Windows.Forms.Label lblPotenciaSP;
|
private System.Windows.Forms.Label lblPotenciaSP;
|
||||||
private System.Windows.Forms.NumericUpDown nudPotenciaSP;
|
private System.Windows.Forms.NumericUpDown nudPotenciaSP;
|
||||||
|
private System.Windows.Forms.Label lblPressao;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,7 +7,6 @@ using static AgroBase.Models.Enums;
|
||||||
using AgroBase.Services;
|
using AgroBase.Services;
|
||||||
using AgroBase.Models.Modules;
|
using AgroBase.Models.Modules;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AgroBase.Models.Operadores;
|
|
||||||
using AgroBase.Services.Operadores;
|
using AgroBase.Services.Operadores;
|
||||||
|
|
||||||
namespace AgroBase.Forms.Operacoes
|
namespace AgroBase.Forms.Operacoes
|
||||||
|
|
@ -166,6 +165,7 @@ namespace AgroBase.Forms.Operacoes
|
||||||
lblCorrente.Text = _Sensoriamento.Bateria.CorrenteInstantanea.ToString("0.00") + " A";
|
lblCorrente.Text = _Sensoriamento.Bateria.CorrenteInstantanea.ToString("0.00") + " A";
|
||||||
lblRPM.Text = _Sensoriamento.Movimentacao.RPMMedio.ToString("0") + " rpm";
|
lblRPM.Text = _Sensoriamento.Movimentacao.RPMMedio.ToString("0") + " rpm";
|
||||||
lblVelocidade.Text = (_Sensoriamento.Movimentacao.VelocidadeMedia * 3.6).ToString("0.00");
|
lblVelocidade.Text = (_Sensoriamento.Movimentacao.VelocidadeMedia * 3.6).ToString("0.00");
|
||||||
|
lblPressao.Text = $"{(_Sensoriamento.Atuador.PressaoLinha):F0} psi";
|
||||||
|
|
||||||
bool atuadorAtivado = Variaveis.OperacaoEmAndamento.DispAtu.Dados.Conectado;
|
bool atuadorAtivado = Variaveis.OperacaoEmAndamento.DispAtu.Dados.Conectado;
|
||||||
chbPulverizador.Enabled = atuadorAtivado;
|
chbPulverizador.Enabled = atuadorAtivado;
|
||||||
|
|
@ -481,6 +481,7 @@ namespace AgroBase.Forms.Operacoes
|
||||||
gridDados.Rows.Add("Barramento 19V", "", "mA");
|
gridDados.Rows.Add("Barramento 19V", "", "mA");
|
||||||
gridDados.Rows.Add("Barramento 24V", "", "V");
|
gridDados.Rows.Add("Barramento 24V", "", "V");
|
||||||
gridDados.Rows.Add("Barramento 24V", "", "mA");
|
gridDados.Rows.Add("Barramento 24V", "", "mA");
|
||||||
|
gridDados.Rows.Add("", "", "");
|
||||||
gridDados.Rows.Add("Nível do Reservatório", "", "%");
|
gridDados.Rows.Add("Nível do Reservatório", "", "%");
|
||||||
gridDados.Rows.Add("Massa do Reservatório", "", "Kg");
|
gridDados.Rows.Add("Massa do Reservatório", "", "Kg");
|
||||||
gridDados.Rows.Add("Volume do Reservatório", "", "L");
|
gridDados.Rows.Add("Volume do Reservatório", "", "L");
|
||||||
|
|
@ -490,6 +491,7 @@ namespace AgroBase.Forms.Operacoes
|
||||||
gridDados.Rows.Add("Distancia Estimada Restante", "", "m");
|
gridDados.Rows.Add("Distancia Estimada Restante", "", "m");
|
||||||
gridDados.Rows.Add("Pressão da Linha", "", "psi");
|
gridDados.Rows.Add("Pressão da Linha", "", "psi");
|
||||||
gridDados.Rows.Add("Potência na Bomba", "", "%");
|
gridDados.Rows.Add("Potência na Bomba", "", "%");
|
||||||
|
gridDados.Rows.Add("Bomba Cavitada", "", "");
|
||||||
gridDados.Rows.Add("Vazão Instantanea", "", "mL/s");
|
gridDados.Rows.Add("Vazão Instantanea", "", "mL/s");
|
||||||
gridDados.Rows.Add("Vazão Media", "", "mL/s");
|
gridDados.Rows.Add("Vazão Media", "", "mL/s");
|
||||||
gridDados.Rows.Add("Volume Vazado", "", "mL");
|
gridDados.Rows.Add("Volume Vazado", "", "mL");
|
||||||
|
|
@ -541,25 +543,27 @@ namespace AgroBase.Forms.Operacoes
|
||||||
gridDados.Rows[18].Cells[1].Value = (_Barramentos.FirstOrDefault(x => x.ID == "AB19V")?.Corrente ?? 0).ToString("0.00");
|
gridDados.Rows[18].Cells[1].Value = (_Barramentos.FirstOrDefault(x => x.ID == "AB19V")?.Corrente ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[19].Cells[1].Value = (_Barramentos.FirstOrDefault(x => x.ID == "AB24V")?.Tensao ?? 0).ToString("0.00");
|
gridDados.Rows[19].Cells[1].Value = (_Barramentos.FirstOrDefault(x => x.ID == "AB24V")?.Tensao ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[20].Cells[1].Value = (_Barramentos.FirstOrDefault(x => x.ID == "AB24V")?.Corrente ?? 0).ToString("0.00");
|
gridDados.Rows[20].Cells[1].Value = (_Barramentos.FirstOrDefault(x => x.ID == "AB24V")?.Corrente ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[21].Cells[1].Value = (_Atuador?.PercentualReservatorio ?? 0).ToString("0.00");
|
gridDados.Rows[21].Cells[1].Value = "";
|
||||||
gridDados.Rows[22].Cells[1].Value = $"{_Atuador?.MassaReservatorio ?? 0:0.000} ({Variaveis.OperacaoEmAndamento.DispAtu?.Dados?.ContadorCarga?.MassaAtual_Kg_Calc ?? 0:0.000})";
|
gridDados.Rows[22].Cells[1].Value = (_Atuador?.PercentualReservatorio ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[23].Cells[1].Value = $"{_Atuador?.VolumeReservatorio ?? 0:0.000}";
|
gridDados.Rows[23].Cells[1].Value = $"{_Atuador?.MassaReservatorio ?? 0:0.000} ({Variaveis.OperacaoEmAndamento.DispAtu?.Dados?.ContadorCarga?.MassaAtual_Kg_Calc ?? 0:0.000})";
|
||||||
gridDados.Rows[24].Cells[1].Value = (_Atuador?.LPorMetro ?? 0).ToString("0.000");
|
gridDados.Rows[24].Cells[1].Value = $"{_Atuador?.VolumeReservatorio ?? 0:0.000}";
|
||||||
gridDados.Rows[25].Cells[1].Value = (_Atuador?.LPorMinuto ?? 0).ToString("0.000");
|
gridDados.Rows[25].Cells[1].Value = (_Atuador?.LPorMetro ?? 0).ToString("0.000");
|
||||||
gridDados.Rows[26].Cells[1].Value = TimeSpan.FromMinutes(_Atuador?.TempoEstimadoRestanteMinutos ?? 0).ToString(@"hh\:mm\:ss");
|
gridDados.Rows[26].Cells[1].Value = (_Atuador?.LPorMinuto ?? 0).ToString("0.000");
|
||||||
gridDados.Rows[27].Cells[1].Value = (_Atuador?.DistanciaEstimadaRestanteMetros ?? 0).ToString("0.00");
|
gridDados.Rows[27].Cells[1].Value = TimeSpan.FromMinutes(_Atuador?.TempoEstimadoRestanteMinutos ?? 0).ToString(@"hh\:mm\:ss");
|
||||||
gridDados.Rows[28].Cells[1].Value = (_Atuador?.PressaoLinha ?? 0).ToString("0.00");
|
gridDados.Rows[28].Cells[1].Value = (_Atuador?.DistanciaEstimadaRestanteMetros ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[29].Cells[1].Value = (_Atuador?.LeituraPotenciaBomba ?? 0).ToString("0.00");
|
gridDados.Rows[29].Cells[1].Value = (_Atuador?.PressaoLinha ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[30].Cells[1].Value = $"{_Atuador?.VazaoInstantanea ?? 0:0.000} ({Variaveis.OperacaoEmAndamento.DispAtu?.Dados?.VazaoFluxoMLpSInstantaneaCalc:0.000})";
|
gridDados.Rows[30].Cells[1].Value = (_Atuador?.LeituraPotenciaBomba ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[31].Cells[1].Value = $"{_Atuador?.VazaoMedia ?? 0:0.000}";
|
gridDados.Rows[31].Cells[1].Value = (_Atuador?.BombaCavitada ?? false) ? "Sim" : "Não";
|
||||||
gridDados.Rows[32].Cells[1].Value = (_Atuador?.VolumeVazaoMl ?? 0).ToString("0.00");
|
gridDados.Rows[32].Cells[1].Value = $"{_Atuador?.VazaoInstantanea ?? 0:0.000} ({Variaveis.OperacaoEmAndamento.DispAtu?.Dados?.VazaoFluxoMLpSInstantaneaCalc:0.000})";
|
||||||
gridDados.Rows[33].Cells[1].Value = (_Atuador?.AnguloBarraEsquerda ?? 0).ToString("0.00");
|
gridDados.Rows[33].Cells[1].Value = $"{_Atuador?.VazaoMedia ?? 0:0.000}";
|
||||||
gridDados.Rows[34].Cells[1].Value = (_Atuador?.AnguloBarraDireita ?? 0).ToString("0.00");
|
gridDados.Rows[34].Cells[1].Value = (_Atuador?.VolumeVazaoMl ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[35].Cells[1].Value = (Variaveis.OperacaoEmAndamento.DispAtu?.Dados?.ContadorCarga?.AgitadorCalda?._Potencia ?? 0).ToString("0.00");
|
gridDados.Rows[35].Cells[1].Value = (_Atuador?.AnguloBarraEsquerda ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[36].Cells[1].Value = "";
|
gridDados.Rows[36].Cells[1].Value = (_Atuador?.AnguloBarraDireita ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[37].Cells[1].Value = (_IMU?.InclinacaoLateral ?? 0).ToString("0.00");
|
gridDados.Rows[37].Cells[1].Value = (Variaveis.OperacaoEmAndamento.DispAtu?.Dados?.ContadorCarga?.AgitadorCalda?._Potencia ?? 0).ToString("0.00");
|
||||||
gridDados.Rows[38].Cells[1].Value = (_IMU?.InclinacaoFrontal ?? 0).ToString("0.00");
|
gridDados.Rows[38].Cells[1].Value = "";
|
||||||
gridDados.Rows[39].Cells[1].Value = (_IMU?.Rotacao ?? 0).ToString("0.00");
|
gridDados.Rows[39].Cells[1].Value = (_IMU?.InclinacaoLateral ?? 0).ToString("0.00");
|
||||||
|
gridDados.Rows[40].Cells[1].Value = (_IMU?.InclinacaoFrontal ?? 0).ToString("0.00");
|
||||||
|
gridDados.Rows[41].Cells[1].Value = (_IMU?.Rotacao ?? 0).ToString("0.00");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -583,7 +587,7 @@ namespace AgroBase.Forms.Operacoes
|
||||||
{
|
{
|
||||||
var Atuador = Variaveis.OperacaoEmAndamento.DispAtu;
|
var Atuador = Variaveis.OperacaoEmAndamento.DispAtu;
|
||||||
nudPressaoSP.Value = Convert.ToInt32(Variaveis.OperacaoEmAndamento.Parametros.Controle.AtuPressaoLinha);
|
nudPressaoSP.Value = Convert.ToInt32(Variaveis.OperacaoEmAndamento.Parametros.Controle.AtuPressaoLinha);
|
||||||
nudPotenciaSP.Value = (decimal)(Atuador.Dados?.ContadorCarga?.AgitadorCalda?.PotenciaSP ?? 0);
|
nudPotenciaSP.Value = 100;
|
||||||
|
|
||||||
int panelWidth = pnlAtuadores.Width;
|
int panelWidth = pnlAtuadores.Width;
|
||||||
int circleDiameter = 40; // Diâmetro dos círculos grandes
|
int circleDiameter = 40; // Diâmetro dos círculos grandes
|
||||||
|
|
|
||||||
|
|
@ -828,16 +828,16 @@ namespace AgroBase.Models.Modules
|
||||||
bool configurarTodos = !DadosLeitura.Conectado && Conectar;
|
bool configurarTodos = !DadosLeitura.Conectado && Conectar;
|
||||||
|
|
||||||
// Adicionar configurações dos Sensores que devem ser aferidos
|
// Adicionar configurações dos Sensores que devem ser aferidos
|
||||||
var sensoresConfig = SensoresConfig(Conectar, configurarTodos);
|
//var sensoresConfig = SensoresConfig(Conectar, configurarTodos);
|
||||||
config.AddRange(sensoresConfig);
|
//config.AddRange(sensoresConfig);
|
||||||
|
|
||||||
// Adicionar configurações dos Bicos
|
// Adicionar configurações dos Bicos
|
||||||
var bicosConfig = BicosConfig(Conectar, configurarTodos);
|
//var bicosConfig = BicosConfig(Conectar, configurarTodos);
|
||||||
config.AddRange(bicosConfig);
|
//config.AddRange(bicosConfig);
|
||||||
|
|
||||||
// Adicionar configurações das Bombas
|
// Adicionar configurações das Bombas
|
||||||
var bombasConfig = BombasConfig(Conectar, configurarTodos);
|
//var bombasConfig = BombasConfig(Conectar, configurarTodos);
|
||||||
config.AddRange(bombasConfig);
|
//config.AddRange(bombasConfig);
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2168,20 +2168,20 @@ namespace AgroBase.Models.Modules
|
||||||
bool configurarTodos = !DadosLeitura.Conectado && Conectar;
|
bool configurarTodos = !DadosLeitura.Conectado && Conectar;
|
||||||
|
|
||||||
// Adicionar configurações dos Sinaleiros
|
// Adicionar configurações dos Sinaleiros
|
||||||
var sinaleirosConfig = SinaleirosConfig(Conectar, configurarTodos);
|
//var sinaleirosConfig = SinaleirosConfig(Conectar, configurarTodos);
|
||||||
config.AddRange(sinaleirosConfig);
|
//config.AddRange(sinaleirosConfig);
|
||||||
|
|
||||||
// Adicionar configurações dos Servos
|
// Adicionar configurações dos Servos
|
||||||
var servosConfig = ServosConfig(Conectar, configurarTodos);
|
//var servosConfig = ServosConfig(Conectar, configurarTodos);
|
||||||
config.AddRange(servosConfig);
|
//config.AddRange(servosConfig);
|
||||||
|
|
||||||
// Adicionar configurações dos Reles
|
// Adicionar configurações dos Reles
|
||||||
var relesConfig = RelesConfig(Conectar, configurarTodos);
|
//var relesConfig = RelesConfig(Conectar, configurarTodos);
|
||||||
config.AddRange(relesConfig);
|
//config.AddRange(relesConfig);
|
||||||
|
|
||||||
// Adicionar configurações dos Sensores que devem ser aferidos
|
// Adicionar configurações dos Sensores que devem ser aferidos
|
||||||
var sensoresConfig = SensoresConfig(Conectar, configurarTodos);
|
//var sensoresConfig = SensoresConfig(Conectar, configurarTodos);
|
||||||
config.AddRange(sensoresConfig);
|
//config.AddRange(sensoresConfig);
|
||||||
|
|
||||||
// Adicionar configurações do LoRa
|
// Adicionar configurações do LoRa
|
||||||
if (Variaveis.OperacaoEmAndamento.Parametros.ModulosMandatorios.Any(x => x.Dispositivo == T_Code.Lra && x.Mandatorio && x.Utilizar) && (!loRaService.Conectado || !loRaService.Configurado || configurarTodos))
|
if (Variaveis.OperacaoEmAndamento.Parametros.ModulosMandatorios.Any(x => x.Dispositivo == T_Code.Lra && x.Mandatorio && x.Utilizar) && (!loRaService.Conectado || !loRaService.Configurado || configurarTodos))
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,15 @@ namespace AgroBase.Comum
|
||||||
Location = new System.Drawing.Point() { X = 28, Y = 27 },
|
Location = new System.Drawing.Point() { X = 28, Y = 27 },
|
||||||
Size = new System.Drawing.Size() { Height = 17, Width = 42 }
|
Size = new System.Drawing.Size() { Height = 17, Width = 42 }
|
||||||
};
|
};
|
||||||
|
Button btnReiniciar = new Button()
|
||||||
|
{
|
||||||
|
Name = $"btn{_Nome}Reiniciar",
|
||||||
|
Text = "Reiniciar",
|
||||||
|
Location = new System.Drawing.Point() { X = 28, Y = 27 },
|
||||||
|
Size = new System.Drawing.Size() { Height = 24, Width = 89 }
|
||||||
|
};
|
||||||
|
btnReiniciar.Click -= btnReiniciar_Click;
|
||||||
|
btnReiniciar.Click += btnReiniciar_Click;
|
||||||
Label lblBaudRate = new Label()
|
Label lblBaudRate = new Label()
|
||||||
{
|
{
|
||||||
Name = "lbl" + _Nome + "Bau",
|
Name = "lbl" + _Nome + "Bau",
|
||||||
|
|
@ -266,8 +275,9 @@ namespace AgroBase.Comum
|
||||||
//tmrLogsDispositivo = new AsyncTaskTimerModel("tmrLogsDispositivo_" + Dispositivo.ToString(), tmrLogsDispositivo_Tick, 1000);
|
//tmrLogsDispositivo = new AsyncTaskTimerModel("tmrLogsDispositivo_" + Dispositivo.ToString(), tmrLogsDispositivo_Tick, 1000);
|
||||||
//tmrLogsDispositivo.Start();
|
//tmrLogsDispositivo.Start();
|
||||||
|
|
||||||
gpbItem.Controls.Add(lblPorta);
|
//gpbItem.Controls.Add(lblPorta);
|
||||||
gpbItem.Controls.Add(lblBaudRate);
|
//gpbItem.Controls.Add(lblBaudRate);
|
||||||
|
gpbItem.Controls.Add(btnReiniciar);
|
||||||
gpbItem.Controls.Add(lblAmostragem);
|
gpbItem.Controls.Add(lblAmostragem);
|
||||||
gpbItem.Controls.Add(nudAmostragem);
|
gpbItem.Controls.Add(nudAmostragem);
|
||||||
gpbItem.Controls.Add(lblDispositivos);
|
gpbItem.Controls.Add(lblDispositivos);
|
||||||
|
|
@ -283,6 +293,14 @@ namespace AgroBase.Comum
|
||||||
return gpbItem;
|
return gpbItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnReiniciar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Dispositivo == T_Code.Sen)
|
||||||
|
GeneralJoystick.EnviarComandoSensoriamento(S_Code.sMOD, "", Status: true);
|
||||||
|
else if (Dispositivo == T_Code.Atu)
|
||||||
|
GeneralJoystick.EnviarComandoAtuador(S_Code.sMOD, "", Status: true);
|
||||||
|
}
|
||||||
|
|
||||||
private void btnPinout_Click(object sender, EventArgs e)
|
private void btnPinout_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (frmPin != null)
|
if (frmPin != null)
|
||||||
|
|
|
||||||
|
|
@ -289,11 +289,11 @@ void ProcessarCfg(std::vector<uint8_t> data) {
|
||||||
_TaxaAmostragem = taxa;
|
_TaxaAmostragem = taxa;
|
||||||
RequisitarDados = requisitar;
|
RequisitarDados = requisitar;
|
||||||
|
|
||||||
if (pinoSDA != PINO_INVALIDO && pinoSCL != PINO_INVALIDO) {
|
//if (pinoSDA != PINO_INVALIDO && pinoSCL != PINO_INVALIDO) {
|
||||||
if (I2CService::DefinirPinos(pinoSDA, pinoSCL) || !I2CService::I2CIniciado) {
|
// if (I2CService::DefinirPinos(pinoSDA, pinoSCL) || !I2CService::I2CIniciado) {
|
||||||
inicializarDependenciasI2C();
|
// inicializarDependenciasI2C();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
vTaskDelay(pdMS_TO_TICKS(100));
|
vTaskDelay(pdMS_TO_TICKS(100));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class Rele_v2 : public ComponenteCAN {
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool DebugMode = true;
|
bool DebugMode = false;
|
||||||
|
|
||||||
bool AtuacaoNivelAlto = true;
|
bool AtuacaoNivelAlto = true;
|
||||||
Estado _Status = Desligado;
|
Estado _Status = Desligado;
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ class SensorMagnetico_v2 : public ComponenteCAN {
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool DebugMode = true;
|
bool DebugMode = false;
|
||||||
static const uint8_t REG_RAW_ANGLE = 0x0C;
|
static const uint8_t REG_RAW_ANGLE = 0x0C;
|
||||||
|
|
||||||
void MostrarLog(String mensagem) {
|
void MostrarLog(String mensagem) {
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ class ServoAgro_v2 : public ComponenteCAN {
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool DebugMode = true;
|
bool DebugMode = false;
|
||||||
|
|
||||||
Servo _Servo;
|
Servo _Servo;
|
||||||
int _Angulo = 0;
|
int _Angulo = 0;
|
||||||
|
|
|
||||||
|
|
@ -334,11 +334,11 @@ void ProcessarCfg(std::vector<uint8_t> data) {
|
||||||
_TaxaAmostragem = taxa;
|
_TaxaAmostragem = taxa;
|
||||||
RequisitarDados = requisitar;
|
RequisitarDados = requisitar;
|
||||||
|
|
||||||
if (pinoSDA != PINO_INVALIDO && pinoSCL != PINO_INVALIDO) {
|
//if (pinoSDA != PINO_INVALIDO && pinoSCL != PINO_INVALIDO) {
|
||||||
if (I2CService::DefinirPinos(pinoSDA, pinoSCL) || !I2CService::I2CIniciado) {
|
// if (I2CService::DefinirPinos(pinoSDA, pinoSCL) || !I2CService::I2CIniciado) {
|
||||||
inicializarDependenciasI2C();
|
// inicializarDependenciasI2C();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
vTaskDelay(pdMS_TO_TICKS(100));
|
vTaskDelay(pdMS_TO_TICKS(100));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue