implementado sensor magnetico rotativo
This commit is contained in:
parent
9fe42b1f3e
commit
88d3794ff1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -71,6 +71,14 @@ namespace AgroBase.Forms.Direcional
|
|||
this.cmbETEsquerda = new System.Windows.Forms.ComboBox();
|
||||
this.lblETEsquerda = new System.Windows.Forms.Label();
|
||||
this.lblETDireita = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtDFOffsetAngulo = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtEFOffsetAngulo = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.txtETOffsetAngulo = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtDTOffsetAngulo = new System.Windows.Forms.TextBox();
|
||||
this.gpbSentido.SuspendLayout();
|
||||
this.gpbDF.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudDFOffset)).BeginInit();
|
||||
|
|
@ -97,7 +105,7 @@ namespace AgroBase.Forms.Direcional
|
|||
this.gpbSentido.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpbSentido.Name = "gpbSentido";
|
||||
this.gpbSentido.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gpbSentido.Size = new System.Drawing.Size(376, 373);
|
||||
this.gpbSentido.Size = new System.Drawing.Size(376, 427);
|
||||
this.gpbSentido.TabIndex = 80;
|
||||
this.gpbSentido.TabStop = false;
|
||||
this.gpbSentido.Text = "Sentido de giro";
|
||||
|
|
@ -105,7 +113,7 @@ namespace AgroBase.Forms.Direcional
|
|||
// lblIP
|
||||
//
|
||||
this.lblIP.AutoSize = true;
|
||||
this.lblIP.Location = new System.Drawing.Point(10, 326);
|
||||
this.lblIP.Location = new System.Drawing.Point(9, 378);
|
||||
this.lblIP.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblIP.Name = "lblIP";
|
||||
this.lblIP.Size = new System.Drawing.Size(17, 13);
|
||||
|
|
@ -114,7 +122,7 @@ namespace AgroBase.Forms.Direcional
|
|||
//
|
||||
// txtIP
|
||||
//
|
||||
this.txtIP.Location = new System.Drawing.Point(13, 343);
|
||||
this.txtIP.Location = new System.Drawing.Point(12, 395);
|
||||
this.txtIP.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtIP.Name = "txtIP";
|
||||
this.txtIP.Size = new System.Drawing.Size(85, 20);
|
||||
|
|
@ -142,7 +150,7 @@ namespace AgroBase.Forms.Direcional
|
|||
//
|
||||
// btnSalvarSentido
|
||||
//
|
||||
this.btnSalvarSentido.Location = new System.Drawing.Point(276, 339);
|
||||
this.btnSalvarSentido.Location = new System.Drawing.Point(275, 391);
|
||||
this.btnSalvarSentido.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnSalvarSentido.Name = "btnSalvarSentido";
|
||||
this.btnSalvarSentido.Size = new System.Drawing.Size(88, 24);
|
||||
|
|
@ -153,6 +161,8 @@ namespace AgroBase.Forms.Direcional
|
|||
//
|
||||
// gpbDF
|
||||
//
|
||||
this.gpbDF.Controls.Add(this.label5);
|
||||
this.gpbDF.Controls.Add(this.txtDFOffsetAngulo);
|
||||
this.gpbDF.Controls.Add(this.label2);
|
||||
this.gpbDF.Controls.Add(this.txtDFEndereco);
|
||||
this.gpbDF.Controls.Add(this.nudDFOffset);
|
||||
|
|
@ -165,7 +175,7 @@ namespace AgroBase.Forms.Direcional
|
|||
this.gpbDF.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpbDF.Name = "gpbDF";
|
||||
this.gpbDF.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gpbDF.Size = new System.Drawing.Size(168, 129);
|
||||
this.gpbDF.Size = new System.Drawing.Size(168, 152);
|
||||
this.gpbDF.TabIndex = 9;
|
||||
this.gpbDF.TabStop = false;
|
||||
this.gpbDF.Text = "M4 - Direito Frente (DF)";
|
||||
|
|
@ -260,6 +270,8 @@ namespace AgroBase.Forms.Direcional
|
|||
//
|
||||
// gpbEF
|
||||
//
|
||||
this.gpbEF.Controls.Add(this.label6);
|
||||
this.gpbEF.Controls.Add(this.txtEFOffsetAngulo);
|
||||
this.gpbEF.Controls.Add(this.label4);
|
||||
this.gpbEF.Controls.Add(this.txtEFEndereco);
|
||||
this.gpbEF.Controls.Add(this.nudEFOffset);
|
||||
|
|
@ -272,7 +284,7 @@ namespace AgroBase.Forms.Direcional
|
|||
this.gpbEF.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpbEF.Name = "gpbEF";
|
||||
this.gpbEF.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gpbEF.Size = new System.Drawing.Size(168, 129);
|
||||
this.gpbEF.Size = new System.Drawing.Size(168, 152);
|
||||
this.gpbEF.TabIndex = 9;
|
||||
this.gpbEF.TabStop = false;
|
||||
this.gpbEF.Text = "M2 - Esquerdo Frente (EF)";
|
||||
|
|
@ -367,6 +379,8 @@ namespace AgroBase.Forms.Direcional
|
|||
//
|
||||
// gpbDT
|
||||
//
|
||||
this.gpbDT.Controls.Add(this.label8);
|
||||
this.gpbDT.Controls.Add(this.txtDTOffsetAngulo);
|
||||
this.gpbDT.Controls.Add(this.label3);
|
||||
this.gpbDT.Controls.Add(this.txtDTEndereco);
|
||||
this.gpbDT.Controls.Add(this.nudDTOffset);
|
||||
|
|
@ -375,11 +389,11 @@ namespace AgroBase.Forms.Direcional
|
|||
this.gpbDT.Controls.Add(this.cmbDTEsquerda);
|
||||
this.gpbDT.Controls.Add(this.lblDTEsquerda);
|
||||
this.gpbDT.Controls.Add(this.lblDTDireita);
|
||||
this.gpbDT.Location = new System.Drawing.Point(195, 193);
|
||||
this.gpbDT.Location = new System.Drawing.Point(195, 216);
|
||||
this.gpbDT.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpbDT.Name = "gpbDT";
|
||||
this.gpbDT.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gpbDT.Size = new System.Drawing.Size(168, 129);
|
||||
this.gpbDT.Size = new System.Drawing.Size(168, 152);
|
||||
this.gpbDT.TabIndex = 9;
|
||||
this.gpbDT.TabStop = false;
|
||||
this.gpbDT.Text = "M3 - Direito Trás (DT)";
|
||||
|
|
@ -474,6 +488,8 @@ namespace AgroBase.Forms.Direcional
|
|||
//
|
||||
// gpbET
|
||||
//
|
||||
this.gpbET.Controls.Add(this.label7);
|
||||
this.gpbET.Controls.Add(this.txtETOffsetAngulo);
|
||||
this.gpbET.Controls.Add(this.label1);
|
||||
this.gpbET.Controls.Add(this.txtETEndereco);
|
||||
this.gpbET.Controls.Add(this.nudETOffset);
|
||||
|
|
@ -482,11 +498,11 @@ namespace AgroBase.Forms.Direcional
|
|||
this.gpbET.Controls.Add(this.cmbETEsquerda);
|
||||
this.gpbET.Controls.Add(this.lblETEsquerda);
|
||||
this.gpbET.Controls.Add(this.lblETDireita);
|
||||
this.gpbET.Location = new System.Drawing.Point(13, 193);
|
||||
this.gpbET.Location = new System.Drawing.Point(13, 216);
|
||||
this.gpbET.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpbET.Name = "gpbET";
|
||||
this.gpbET.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gpbET.Size = new System.Drawing.Size(168, 129);
|
||||
this.gpbET.Size = new System.Drawing.Size(168, 152);
|
||||
this.gpbET.TabIndex = 0;
|
||||
this.gpbET.TabStop = false;
|
||||
this.gpbET.Text = "M1 - Esquerdo Trás (ET)";
|
||||
|
|
@ -579,12 +595,88 @@ namespace AgroBase.Forms.Direcional
|
|||
this.lblETDireita.TabIndex = 2;
|
||||
this.lblETDireita.Text = "Direita";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(10, 125);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(51, 13);
|
||||
this.label5.TabIndex = 18;
|
||||
this.label5.Text = "Offset Ag";
|
||||
//
|
||||
// txtDFOffsetAngulo
|
||||
//
|
||||
this.txtDFOffsetAngulo.Location = new System.Drawing.Point(66, 122);
|
||||
this.txtDFOffsetAngulo.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtDFOffsetAngulo.Name = "txtDFOffsetAngulo";
|
||||
this.txtDFOffsetAngulo.Size = new System.Drawing.Size(92, 20);
|
||||
this.txtDFOffsetAngulo.TabIndex = 17;
|
||||
this.txtDFOffsetAngulo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(10, 125);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(51, 13);
|
||||
this.label6.TabIndex = 20;
|
||||
this.label6.Text = "Offset Ag";
|
||||
//
|
||||
// txtEFOffsetAngulo
|
||||
//
|
||||
this.txtEFOffsetAngulo.Location = new System.Drawing.Point(66, 122);
|
||||
this.txtEFOffsetAngulo.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtEFOffsetAngulo.Name = "txtEFOffsetAngulo";
|
||||
this.txtEFOffsetAngulo.Size = new System.Drawing.Size(92, 20);
|
||||
this.txtEFOffsetAngulo.TabIndex = 19;
|
||||
this.txtEFOffsetAngulo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(9, 125);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(51, 13);
|
||||
this.label7.TabIndex = 22;
|
||||
this.label7.Text = "Offset Ag";
|
||||
//
|
||||
// txtETOffsetAngulo
|
||||
//
|
||||
this.txtETOffsetAngulo.Location = new System.Drawing.Point(65, 122);
|
||||
this.txtETOffsetAngulo.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtETOffsetAngulo.Name = "txtETOffsetAngulo";
|
||||
this.txtETOffsetAngulo.Size = new System.Drawing.Size(92, 20);
|
||||
this.txtETOffsetAngulo.TabIndex = 21;
|
||||
this.txtETOffsetAngulo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(9, 125);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(51, 13);
|
||||
this.label8.TabIndex = 22;
|
||||
this.label8.Text = "Offset Ag";
|
||||
//
|
||||
// txtDTOffsetAngulo
|
||||
//
|
||||
this.txtDTOffsetAngulo.Location = new System.Drawing.Point(65, 122);
|
||||
this.txtDTOffsetAngulo.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtDTOffsetAngulo.Name = "txtDTOffsetAngulo";
|
||||
this.txtDTOffsetAngulo.Size = new System.Drawing.Size(92, 20);
|
||||
this.txtDTOffsetAngulo.TabIndex = 21;
|
||||
this.txtDTOffsetAngulo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// frmDirConfig
|
||||
//
|
||||
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(398, 393);
|
||||
this.ClientSize = new System.Drawing.Size(398, 447);
|
||||
this.Controls.Add(this.gpbSentido);
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Name = "frmDirConfig";
|
||||
|
|
@ -653,5 +745,13 @@ namespace AgroBase.Forms.Direcional
|
|||
private System.Windows.Forms.Label lblTipoMovimento;
|
||||
private System.Windows.Forms.Label lblIP;
|
||||
private System.Windows.Forms.TextBox txtIP;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox txtDFOffsetAngulo;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txtEFOffsetAngulo;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.TextBox txtDTOffsetAngulo;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox txtETOffsetAngulo;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,8 @@
|
|||
using AgroBase.Comum;
|
||||
using AgroBase.Models;
|
||||
using AgroBase.Models.Modules;
|
||||
using OpenTK.Graphics.ES11;
|
||||
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;
|
||||
|
||||
|
|
@ -75,6 +68,9 @@ namespace AgroBase.Forms.Direcional
|
|||
|
||||
NumericUpDown nudOffset = FuncoesGlobais.FindControlRecursive<NumericUpDown>(gpbSentido, "nud" + Modulo.Modulo_ID + "Offset");
|
||||
nudOffset.Value = Convert.ToInt32(Modulo.DirMotor.FolgaMecanica);
|
||||
|
||||
TextBox txtOffsetAngulo = FuncoesGlobais.FindControlRecursive<TextBox>(gpbSentido, "txt" + Modulo.Modulo_ID + "OffsetAngulo");
|
||||
txtOffsetAngulo.Text = Modulo.DirMotor.OffsetAnguloReal.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -118,6 +114,9 @@ namespace AgroBase.Forms.Direcional
|
|||
|
||||
NumericUpDown nudOffset = FuncoesGlobais.FindControlRecursive<NumericUpDown>(gpbSentido, "nud" + Modulo.Modulo_ID + "Offset");
|
||||
Modulo.DirMotor.FolgaMecanica = Convert.ToDouble(nudOffset.Value);
|
||||
|
||||
TextBox txtOffsetAngulo = FuncoesGlobais.FindControlRecursive<TextBox>(gpbSentido, "txt" + Modulo.Modulo_ID + "OffsetAngulo");
|
||||
Modulo.DirMotor.OffsetAnguloReal = Convert.ToDouble(txtOffsetAngulo.Text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1021,14 +1021,14 @@ namespace AgroBase.Forms.IHM
|
|||
Enums.Sentido.Parado);*/
|
||||
|
||||
bool anguloCorreto =
|
||||
Teste.ComplementoValorPadrao == "<" ? Modulo.DirMotor.Angulo < Teste.ValorPadrao :
|
||||
Teste.ComplementoValorPadrao == ">" ? Modulo.DirMotor.Angulo > Teste.ValorPadrao :
|
||||
Modulo.DirMotor.Angulo == Teste.ValorPadrao;
|
||||
Teste.ComplementoValorPadrao == "<" ? Modulo.DirMotor.AnguloLeitura < Teste.ValorPadrao :
|
||||
Teste.ComplementoValorPadrao == ">" ? Modulo.DirMotor.AnguloLeitura > Teste.ValorPadrao :
|
||||
Modulo.DirMotor.AnguloLeitura == Teste.ValorPadrao;
|
||||
|
||||
Sucesso = anguloCorreto;
|
||||
}
|
||||
|
||||
Teste.ValorAferido = Modulo.DirMotor.Angulo;
|
||||
Teste.ValorAferido = Modulo.DirMotor.AnguloLeitura;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -264,10 +264,11 @@ 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;
|
||||
double Angulo = Modulo.DirMotor.AnguloDriver;
|
||||
double AnguloReal = Modulo.DirMotor.AnguloReal;
|
||||
|
||||
Label lblAngulo = pnl.Controls.OfType<Label>().FirstOrDefault(ctrl => ctrl.Name == "lblDir_" + ID);
|
||||
lblAngulo.Text = ID + " " + Angulo.ToString("000") + "º (" + Modulo.DirMotor.SentidoReal.ToString() + ")";
|
||||
lblAngulo.Text = $"{ID} {Angulo:0.0}º ({AnguloReal:0.0}º) {Modulo.DirMotor.SentidoReal}";
|
||||
lblAngulo.ForeColor = Modulo.DirMotor.Inicializado ? Color.Green : Color.Red;
|
||||
|
||||
Label lblMov = pnl.Controls.OfType<Label>().FirstOrDefault(ctrl => ctrl.Name == "lblMov_" + ID);
|
||||
|
|
@ -485,6 +486,9 @@ namespace AgroBase.Forms.Operacoes
|
|||
gridDados.Rows.Add("Vazão Instantanea", "", "mL/s");
|
||||
gridDados.Rows.Add("Vazão Media", "", "mL/s");
|
||||
gridDados.Rows.Add("Volume Vazado", "", "mL");
|
||||
gridDados.Rows.Add("Angulo Barra Esquerda", "", "°");
|
||||
gridDados.Rows.Add("Angulo Barra Direita", "", "°");
|
||||
gridDados.Rows.Add("Angulo Barra Altura", "", "°");
|
||||
gridDados.Rows.Add("", "", "");
|
||||
gridDados.Rows.Add("Roll", "", "");
|
||||
gridDados.Rows.Add("Pitch", "", "");
|
||||
|
|
@ -541,13 +545,16 @@ namespace AgroBase.Forms.Operacoes
|
|||
gridDados.Rows[24].Cells[1].Value = _Sensoriamento.Atuador.VazaoInstantanea.ToString("0.00");
|
||||
gridDados.Rows[25].Cells[1].Value = _Sensoriamento.Atuador.VazaoMedia.ToString("0.00");
|
||||
gridDados.Rows[26].Cells[1].Value = _Sensoriamento.Atuador.VolumeVazaoMl.ToString("0.00");
|
||||
gridDados.Rows[27].Cells[1].Value = "";
|
||||
gridDados.Rows[28].Cells[1].Value = (_Sensoriamento.IMU.InclinacaoLateral).ToString("0.00");
|
||||
gridDados.Rows[29].Cells[1].Value = (_Sensoriamento.IMU.InclinacaoFrontal).ToString("0.00");
|
||||
gridDados.Rows[30].Cells[1].Value = (_Sensoriamento.IMU.Rotacao).ToString("0.00");
|
||||
gridDados.Rows[31].Cells[1].Value = (_Sensoriamento.IMU.Temperatura).ToString("0.00");
|
||||
gridDados.Rows[32].Cells[1].Value = (_Sensoriamento.IMU.Pressao).ToString("0.00");
|
||||
gridDados.Rows[33].Cells[1].Value = (_Sensoriamento.IMU.Altitude).ToString("0.00");
|
||||
gridDados.Rows[27].Cells[1].Value = _Sensoriamento.Atuador.AnguloBarraEsquerda.ToString("0.00");
|
||||
gridDados.Rows[28].Cells[1].Value = _Sensoriamento.Atuador.AnguloBarraDireita.ToString("0.00");
|
||||
gridDados.Rows[29].Cells[1].Value = _Sensoriamento.Atuador.AnguloBarraAltura.ToString("0.00");
|
||||
gridDados.Rows[30].Cells[1].Value = "";
|
||||
gridDados.Rows[31].Cells[1].Value = (_Sensoriamento.IMU.InclinacaoLateral).ToString("0.00");
|
||||
gridDados.Rows[32].Cells[1].Value = (_Sensoriamento.IMU.InclinacaoFrontal).ToString("0.00");
|
||||
gridDados.Rows[33].Cells[1].Value = (_Sensoriamento.IMU.Rotacao).ToString("0.00");
|
||||
gridDados.Rows[34].Cells[1].Value = (_Sensoriamento.IMU.Temperatura).ToString("0.00");
|
||||
gridDados.Rows[35].Cells[1].Value = (_Sensoriamento.IMU.Pressao).ToString("0.00");
|
||||
gridDados.Rows[36].Cells[1].Value = (_Sensoriamento.IMU.Altitude).ToString("0.00");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -247,13 +247,13 @@ namespace AgroBase.Forms
|
|||
|
||||
var Modulo = Variaveis.OperacaoEmAndamento.DispMvd.Dados.Modulos.FirstOrDefault(m => m.Modulo_ID == ID);
|
||||
Label lblA_SP = pnlFundo.Controls.OfType<Label>().FirstOrDefault(ctrl => ctrl.Name == "lbl" + ID + "A_SP");
|
||||
lblA_SP.Text = "Angulo SP: " + (Modulo.DirMotor.Angulo_SP).ToString("000") + "º";
|
||||
lblA_SP.Text = $"Angulo SP: {Modulo.DirMotor.Angulo_SP:0.0}º ({-Modulo.DirMotor.AnguloFolgaCompensar:0.0}º)";
|
||||
Label lblA = pnlFundo.Controls.OfType<Label>().FirstOrDefault(ctrl => ctrl.Name == "lbl" + ID + "A");
|
||||
lblA.Text = "Angulo: " + Modulo.DirMotor.Angulo.ToString("000") + "º";
|
||||
lblA.Text = $"Angulo: {Modulo.DirMotor.AnguloDriver:0.0}º ({Modulo.DirMotor.AnguloReal}º)";
|
||||
Label lblA_SentidoSP = pnlFundo.Controls.OfType<Label>().FirstOrDefault(ctrl => ctrl.Name == "lbl" + ID + "A_SentidoSP");
|
||||
lblA_SentidoSP.Text = "Sentido SP: " + Enum.GetName(typeof(Sentido), Modulo.DirMotor.Sentido_SP);
|
||||
lblA_SentidoSP.Text = $"Sentido SP: {Modulo.DirMotor.Sentido_SP}";
|
||||
Label lblA_Sentido = pnlFundo.Controls.OfType<Label>().FirstOrDefault(ctrl => ctrl.Name == "lbl" + ID + "A_Sentido");
|
||||
lblA_Sentido.Text = "Sentido: " + Enum.GetName(typeof(Sentido), Modulo.DirMotor.Sentido) + " (" + Modulo.DirMotor.SentidoReal.ToString() + ")";
|
||||
lblA_Sentido.Text = $"Sentido: {Modulo.DirMotor.Sentido} ({Modulo.DirMotor.SentidoReal})";
|
||||
|
||||
// Use o objeto Graphics para desenhar a representação do motor
|
||||
Graphics g = e.Graphics;
|
||||
|
|
@ -306,7 +306,7 @@ namespace AgroBase.Forms
|
|||
|
||||
|
||||
// Desenhe uma linha para representar a posição do eixo do motor
|
||||
double angleInRadians = (Modulo.DirMotor.Angulo * Math.PI) / 180;
|
||||
double angleInRadians = (Modulo.DirMotor.AnguloDriver * Math.PI) / 180;
|
||||
int x = centerX + (int)(radius * Math.Sin(angleInRadians));
|
||||
int y = centerY - (int)(radius * Math.Cos(angleInRadians));
|
||||
g.DrawLine(Pens.Red, centerX, centerY, x, y);
|
||||
|
|
|
|||
|
|
@ -419,6 +419,175 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
new SensorModel()
|
||||
{
|
||||
ID = "MAGESQ",
|
||||
Descricao = "Angulo Barra Esquerda",
|
||||
ID_Num = 64,
|
||||
Componente = S_Code.sMAG,
|
||||
Aferir = true,
|
||||
Mandatorio = true,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.I2C,
|
||||
},
|
||||
Parametros = new List<SensorParametroModel>()
|
||||
{
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Endereço I2C",
|
||||
Valor = "0x36",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Canal MUX",
|
||||
Valor = "0",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
},
|
||||
ValoresLeituras = new List<SensorValoresLeituraModel>()
|
||||
{
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.Iniciado,
|
||||
posicao = CanMessagePosicaoDados.Status,
|
||||
indice = 0,
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraBruta,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 0,
|
||||
unidade_medida = ""
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraAngulo,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 1,
|
||||
unidade_medida = "°"
|
||||
},
|
||||
}
|
||||
},
|
||||
new SensorModel()
|
||||
{
|
||||
ID = "MAGDIR",
|
||||
Descricao = "Angulo Barra Direita",
|
||||
ID_Num = 65,
|
||||
Componente = S_Code.sMAG,
|
||||
Aferir = true,
|
||||
Mandatorio = true,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.I2C,
|
||||
},
|
||||
Parametros = new List<SensorParametroModel>()
|
||||
{
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Endereço I2C",
|
||||
Valor = "0x36",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Canal MUX",
|
||||
Valor = "1",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
},
|
||||
ValoresLeituras = new List<SensorValoresLeituraModel>()
|
||||
{
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.Iniciado,
|
||||
posicao = CanMessagePosicaoDados.Status,
|
||||
indice = 0,
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraBruta,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 0,
|
||||
unidade_medida = ""
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraAngulo,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 1,
|
||||
unidade_medida = "°"
|
||||
},
|
||||
}
|
||||
},
|
||||
new SensorModel()
|
||||
{
|
||||
ID = "MAGALT",
|
||||
Descricao = "Angulo Barra Altura",
|
||||
ID_Num = 66,
|
||||
Componente = S_Code.sMAG,
|
||||
Aferir = true,
|
||||
Mandatorio = true,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.I2C,
|
||||
},
|
||||
Parametros = new List<SensorParametroModel>()
|
||||
{
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Endereço I2C",
|
||||
Valor = "0x36",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Canal MUX",
|
||||
Valor = "2",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
},
|
||||
ValoresLeituras = new List<SensorValoresLeituraModel>()
|
||||
{
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.Iniciado,
|
||||
posicao = CanMessagePosicaoDados.Status,
|
||||
indice = 0,
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraBruta,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 0,
|
||||
unidade_medida = ""
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraAngulo,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 1,
|
||||
unidade_medida = "°"
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
for (int i = 0; i < Variaveis.OperacaoEmAndamento.Parametros.QtdBicos; i++)
|
||||
|
|
@ -1348,6 +1517,17 @@ namespace AgroBase.Models.Modules
|
|||
return _value;
|
||||
}
|
||||
|
||||
private ushort Converter2BytesU16(byte[] data, int idx)
|
||||
{
|
||||
return (ushort)((data[idx] << 8) | data[idx + 1]);
|
||||
}
|
||||
|
||||
private double ConverterAngle100(byte[] data, int idx)
|
||||
{
|
||||
ushort v = (ushort)((data[idx] << 8) | data[idx + 1]);
|
||||
return v / 100.0;
|
||||
}
|
||||
|
||||
private S_Code DetectarComponenteDoID_Num(int ID_Num)
|
||||
{
|
||||
if (ID_Num == Variaveis.ID_Num_sMOD) return S_Code.sMOD;
|
||||
|
|
@ -1557,6 +1737,28 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
break;
|
||||
}
|
||||
case S_Code.sMAG:
|
||||
{
|
||||
switch (posicao)
|
||||
{
|
||||
case CanMessagePosicaoDados.Status:
|
||||
{
|
||||
bool Iniciado = data[2] == 1;
|
||||
AtualizarDados(ID_Num, posicao, componente, new List<dynamic>() { Iniciado });
|
||||
break;
|
||||
}
|
||||
case CanMessagePosicaoDados.Dados1:
|
||||
{
|
||||
ushort raw = Converter2BytesU16(data, 2);
|
||||
double angle = ConverterAngle100(data, 4);
|
||||
AtualizarDados(ID_Num, posicao, componente, new List<dynamic>() { raw, angle });
|
||||
//Console.WriteLine($"[sMAG] {ID_Num}, Raw: {raw}, Angulo: {angle}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Dados.DadosLeitura.UltimoComandoRespondido = DateTime.Now;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ namespace AgroBase.Models.Modules
|
|||
get
|
||||
{
|
||||
return
|
||||
Angulo > 0 ? Sentido.Horario :
|
||||
Angulo < 0 ? Sentido.Antihorario :
|
||||
AnguloLeitura > 0 ? Sentido.Horario :
|
||||
AnguloLeitura < 0 ? Sentido.Antihorario :
|
||||
Sentido.Parado;
|
||||
}
|
||||
}
|
||||
|
|
@ -58,13 +58,41 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
}
|
||||
}
|
||||
public double Angulo
|
||||
public double AnguloDriver
|
||||
{
|
||||
get
|
||||
{
|
||||
return Leitura?.AnguloPulsos ?? 0;
|
||||
}
|
||||
}
|
||||
public double AnguloReal { get; set; } = double.NaN;
|
||||
public double AnguloLeitura
|
||||
{
|
||||
get
|
||||
{
|
||||
if (double.IsNaN(AnguloReal)) return AnguloDriver;
|
||||
var sMAG = Variaveis.OperacaoEmAndamento.DispSen?.Dados?.Sensores?.FirstOrDefault(x => x.Componente == S_Code.sMAG && x.ID.Contains(Mod_ID));
|
||||
if ((sMAG?.Inicializado ?? false) && (sMAG?.Aferir ?? false)) return AnguloReal;
|
||||
return AnguloDriver;
|
||||
}
|
||||
}
|
||||
public double AnguloFolgaCompensar
|
||||
{
|
||||
get
|
||||
{
|
||||
double ErroAngular(double alvo, double medido)
|
||||
{
|
||||
// erro = alvo - medido, normalizado em [-180, 180]
|
||||
double e = alvo - medido;
|
||||
e = (e + 540.0) % 360.0; // traz pra [0, 360]
|
||||
if (e > 180.0) e -= 360.0; // traz pra [-180, 180]
|
||||
return e;
|
||||
}
|
||||
|
||||
return ErroAngular(AnguloDriver, AnguloLeitura);
|
||||
}
|
||||
}
|
||||
public double OffsetAnguloReal { get; set; }
|
||||
public double RPM
|
||||
{
|
||||
get
|
||||
|
|
@ -118,7 +146,7 @@ namespace AgroBase.Models.Modules
|
|||
{
|
||||
get
|
||||
{
|
||||
bool foraZero = !FuncoesMatematicas.ValorEstaEntre(Angulo, 0, 1);
|
||||
bool foraZero = !FuncoesMatematicas.ValorEstaEntre(AnguloLeitura, 0, 1);
|
||||
bool parar = UltimaDirecao == Direcao.Parado;
|
||||
return foraZero && parar;
|
||||
}
|
||||
|
|
@ -135,7 +163,7 @@ namespace AgroBase.Models.Modules
|
|||
get
|
||||
{
|
||||
double anguloSp = Comandar ? Angulo_SP : 0;
|
||||
return FuncoesMatematicas.ValorEstaEntre(Angulo, anguloSp, 1);
|
||||
return FuncoesMatematicas.ValorEstaEntre(AnguloLeitura, anguloSp, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -147,21 +175,21 @@ namespace AgroBase.Models.Modules
|
|||
case TipoMovimentoDirecional.RotacionarNoEixo:
|
||||
case TipoMovimentoDirecional.MovimentoLateral:
|
||||
int agSP = DirecaoAtual != Direcao.Parado ? VariaveisEquipamento.AnguloMovimento[TipoMovimento] : 0;
|
||||
bool anguloCorreto = agSP == Angulo;
|
||||
bool anguloCorreto = agSP == Convert.ToInt32(AnguloLeitura);
|
||||
if (!anguloCorreto && agSP != 0)
|
||||
{
|
||||
if (agSP > 0)
|
||||
{
|
||||
anguloCorreto = Angulo >= agSP;
|
||||
anguloCorreto = AnguloLeitura >= agSP;
|
||||
}
|
||||
else
|
||||
{
|
||||
anguloCorreto = Angulo <= agSP;
|
||||
anguloCorreto = AnguloLeitura <= agSP;
|
||||
}
|
||||
}
|
||||
return !Comandar || anguloCorreto;
|
||||
default:
|
||||
return !Comandar || Angulo_SP == Angulo;
|
||||
return !Comandar || Convert.ToInt32(Angulo_SP) == Convert.ToInt32(AnguloLeitura);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +328,7 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
else
|
||||
{
|
||||
Angulo_SP = _Controle.Angulo; // + (FolgaMecanica / 2.0);
|
||||
Angulo_SP = _Controle.Angulo;
|
||||
}
|
||||
|
||||
if (Comandar)
|
||||
|
|
@ -309,6 +337,7 @@ namespace AgroBase.Models.Modules
|
|||
//Console.WriteLine($"[{Mod_ID}] Angulo Atualizado para {Variaveis.OperacaoEmAndamento.SimulacaoAnguloControle}");
|
||||
}
|
||||
|
||||
Angulo_SP += AnguloFolgaCompensar;
|
||||
Angulo_SP = Math.Abs(Angulo_SP) * mx;
|
||||
|
||||
if (_Simulando)
|
||||
|
|
@ -350,7 +379,7 @@ namespace AgroBase.Models.Modules
|
|||
{
|
||||
int VelocidadeGiro = DefineVelocidadeReferenciamento();
|
||||
|
||||
if (_anguloSP != _anguloSpAnterior || (verificacoesAngulo > 5 && Angulo == anguloAnterior))
|
||||
if (_anguloSP != _anguloSpAnterior || (verificacoesAngulo > 5 && AnguloLeitura == anguloAnterior))
|
||||
{
|
||||
MKS057DCanService.Movimento(_EnderecoCAN_Tx, _EnderecoCAN_Rx, _anguloSP, VelocidadeGiro, _sentido);
|
||||
_anguloSpAnterior = _anguloSP;
|
||||
|
|
@ -360,7 +389,7 @@ namespace AgroBase.Models.Modules
|
|||
if (IN1_Atuado != EstadoInicial && AnguloEntrada == 9999)
|
||||
{
|
||||
AnguloEntrada = Leitura.AnguloEstimado();
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Angulo de Entrada Definido: {AnguloEntrada} (Leitura: {Angulo})");
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Angulo de Entrada Definido: {AnguloEntrada} (Leitura: {AnguloLeitura})");
|
||||
|
||||
_sentido = _sentido == Sentido.Horario ? Sentido.Antihorario : Sentido.Horario;
|
||||
_anguloSP *= -1;
|
||||
|
|
@ -369,7 +398,7 @@ namespace AgroBase.Models.Modules
|
|||
if (IN1_Atuado == EstadoInicial && AnguloEntrada != 9999 && AnguloSaida == 9999)
|
||||
{
|
||||
AnguloSaida = Leitura.AnguloEstimado();
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Angulo de Saída Definido: {AnguloSaida} (Leitura: {Angulo})");
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Angulo de Saída Definido: {AnguloSaida} (Leitura: {AnguloLeitura})");
|
||||
|
||||
_sentido = _sentido == Sentido.Horario ? Sentido.Antihorario : Sentido.Horario;
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Invertendo Sentido de Giro para {_sentido.ToString()}");
|
||||
|
|
@ -378,7 +407,7 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
|
||||
verificacoesAngulo++;
|
||||
anguloAnterior = Angulo;
|
||||
anguloAnterior = AnguloLeitura;
|
||||
|
||||
Sucesso = AnguloEntrada != 9999 && AnguloSaida != 9999 && (FuncoesMatematicas.ValorEstaEntre(Leitura.AnguloEstimado(), _anguloSP, 0.5));
|
||||
if (Sucesso)
|
||||
|
|
@ -433,7 +462,7 @@ namespace AgroBase.Models.Modules
|
|||
bool NovoDado() => MKS057DCanService.DadosLeitura.Any(x => x.EnderecoRx == _EnderecoCAN_Rx && x.UltimoComandoRecebido > Inicio);
|
||||
await FuncoesGlobais.AguardarCondicaoAsync(NovoDado, 500, 100);
|
||||
|
||||
if (FuncoesMatematicas.ValorEstaEntre(Angulo, -1, 1))
|
||||
if (FuncoesMatematicas.ValorEstaEntre(AnguloLeitura, -1, 1))
|
||||
{
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Set Zero");
|
||||
break;
|
||||
|
|
@ -445,7 +474,7 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
|
||||
MKS057DCanService.Movimento(_EnderecoCAN_Tx, _EnderecoCAN_Rx, 0, 10, Sentido.Parado);
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Comando Angulo Zero: {Angulo}");
|
||||
Console.WriteLine($"[DIR {Mod_ID}] - Comando Angulo Zero: {AnguloLeitura}");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,30 +248,33 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
|
||||
|
||||
foreach (var Modulo in Modulos.Where(x => x.MovMotor.Inicializado).OrderBy(x => x.MovMotor._EnderecoCAN_Tx))
|
||||
foreach (var Modulo in Modulos)
|
||||
{
|
||||
byte addrTx = Modulo.MovMotor._EnderecoCAN_Tx;
|
||||
byte addrRx = Modulo.MovMotor._EnderecoCAN_Rx;
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.VelocidadeAtual);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.Potencia);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.Temperatura);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CicloTrabalho);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CodErro);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CorrenteBarramento);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CorrenteMotor);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.Tensao);
|
||||
|
||||
var Controle = Variaveis.OperacaoEmAndamento.Controle.TiposControle?.FirstOrDefault(x => x.Tipo == T_Code.Mov);
|
||||
if (Controle != null)
|
||||
if (Modulo.MovMotor.Inicializado)
|
||||
{
|
||||
Modulo.MovMotor.EnviarComandoControle(Controle.UltimaDirecao);
|
||||
byte addrTx = Modulo.MovMotor._EnderecoCAN_Tx;
|
||||
byte addrRx = Modulo.MovMotor._EnderecoCAN_Rx;
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.VelocidadeAtual);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.Potencia);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.Temperatura);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CicloTrabalho);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CodErro);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CorrenteBarramento);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.CorrenteMotor);
|
||||
OIDCanService.RequisitarDado(addrTx, addrRx, OIDCanService.OidHandler.OidParametros.Tensao);
|
||||
|
||||
var Controle = Variaveis.OperacaoEmAndamento.Controle.TiposControle?.FirstOrDefault(x => x.Tipo == T_Code.Mov);
|
||||
if (Controle != null)
|
||||
{
|
||||
Modulo.MovMotor.EnviarComandoControle(Controle.UltimaDirecao);
|
||||
}
|
||||
|
||||
Modulo.MovMotor.ConfigFreio.Leitura = Modulo.MovMotor.Leitura?.Freado ?? false;
|
||||
|
||||
Variaveis.OperacaoEmAndamento.DispMvd.Dados.RegistrarLogMov(Modulo);
|
||||
}
|
||||
|
||||
Modulo.MovMotor.ConfigFreio.Leitura = Modulo.MovMotor.Leitura?.Freado ?? false;
|
||||
|
||||
Variaveis.OperacaoEmAndamento.DispMvd.Dados.RegistrarLogMov(Modulo);
|
||||
|
||||
var sTMP = Variaveis.OperacaoEmAndamento.DispSen?.Dados?.Sensores?.FirstOrDefault(x => x.ID.Contains(Modulo.Modulo_ID));
|
||||
|
||||
var sTMP = Variaveis.OperacaoEmAndamento.DispSen?.Dados?.Sensores?.FirstOrDefault(x => x.Componente == S_Code.sNTC && x.ID.Contains(Modulo.Modulo_ID));
|
||||
if (sTMP != null)
|
||||
{
|
||||
Modulo.MovMotor.Temperatura = sTMP.ValoresLeituras.FirstOrDefault(x => x.funcao == FuncoesPinout.Temperatura)?.atual?.valor ?? -1;
|
||||
|
|
@ -299,20 +302,43 @@ namespace AgroBase.Models.Modules
|
|||
return;
|
||||
}
|
||||
|
||||
foreach (var Modulo in Modulos.Where(x => x.DirMotor.Inicializado))
|
||||
foreach (var Modulo in Modulos)
|
||||
{
|
||||
byte addrTx = Modulo.DirMotor._EnderecoCAN_Tx;
|
||||
byte addrRx = Modulo.DirMotor._EnderecoCAN_Rx;
|
||||
MKS057DCanService.RequisitarDado(addrTx, addrRx, MKS057DCanService.MksHandler.MksFuncCode.PulsosRecebidos);
|
||||
MKS057DCanService.RequisitarDado(addrTx, addrRx, MKS057DCanService.MksHandler.MksFuncCode.IO);
|
||||
|
||||
// Verifica se o angulo de set point do motor em questao e diferente do angulo atual, e se for, reenvia o comando para garantir que o motor esteja coerente com o set point
|
||||
if (!MKS057DCanService.Referenciando && (Modulo.DirMotor.UltimoComandoEnviado.AddMilliseconds(MKS057DCanService.TaxaAmostragem) < DateTime.Now) && !Modulo.DirMotor.AtingiuAnguloSP)
|
||||
if (Modulo.DirMotor.Inicializado)
|
||||
{
|
||||
var Controle = Variaveis.OperacaoEmAndamento.Controle.TiposControle?.FirstOrDefault(x => x.Tipo == T_Code.Dir);
|
||||
if (Controle != null)
|
||||
byte addrTx = Modulo.DirMotor._EnderecoCAN_Tx;
|
||||
byte addrRx = Modulo.DirMotor._EnderecoCAN_Rx;
|
||||
MKS057DCanService.RequisitarDado(addrTx, addrRx, MKS057DCanService.MksHandler.MksFuncCode.PulsosRecebidos);
|
||||
MKS057DCanService.RequisitarDado(addrTx, addrRx, MKS057DCanService.MksHandler.MksFuncCode.IO);
|
||||
|
||||
// Verifica se o angulo de set point do motor em questao e diferente do angulo atual, e se for, reenvia o comando para garantir que o motor esteja coerente com o set point
|
||||
if (!MKS057DCanService.Referenciando && (Modulo.DirMotor.UltimoComandoEnviado.AddMilliseconds(MKS057DCanService.TaxaAmostragem) < DateTime.Now) && !Modulo.DirMotor.AtingiuAnguloSP)
|
||||
{
|
||||
Modulo.DirMotor.EnviarComandoControle(Controle.UltimaDirecao);
|
||||
var Controle = Variaveis.OperacaoEmAndamento.Controle.TiposControle?.FirstOrDefault(x => x.Tipo == T_Code.Dir);
|
||||
if (Controle != null)
|
||||
{
|
||||
Modulo.DirMotor.EnviarComandoControle(Controle.UltimaDirecao);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var sMAG = Variaveis.OperacaoEmAndamento.DispSen?.Dados?.Sensores?.FirstOrDefault(x => x.Componente == S_Code.sMAG && x.ID.Contains(Modulo.Modulo_ID));
|
||||
if (sMAG != null)
|
||||
{
|
||||
double angulo = sMAG.ValoresLeituras.FirstOrDefault(x => x.funcao == FuncoesPinout.LeituraAngulo)?.atual?.valor ?? -1;
|
||||
if (angulo >= 0)
|
||||
{
|
||||
double bruto = -angulo + Modulo.DirMotor.OffsetAnguloReal;
|
||||
// normaliza pra faixa [-180, 180]
|
||||
double norm = bruto % 360.0;
|
||||
if (norm > 180.0) norm -= 360.0;
|
||||
if (norm < -180.0) norm += 360.0;
|
||||
|
||||
Modulo.DirMotor.AnguloReal = Math.Round(norm, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
Modulo.DirMotor.AnguloReal = double.NaN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -429,7 +429,9 @@ namespace AgroBase.Models.Modules
|
|||
EstadoLeitura,
|
||||
EstadoComando,
|
||||
PressaoSP,
|
||||
CodAlarme
|
||||
CodAlarme,
|
||||
LeituraBruta,
|
||||
LeituraAngulo
|
||||
}
|
||||
|
||||
public static class PinoutUtils
|
||||
|
|
|
|||
|
|
@ -1523,6 +1523,227 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
},
|
||||
|
||||
new SensorModel()
|
||||
{
|
||||
ID = "MAGET",
|
||||
Descricao = "Angulo Direcional ET",
|
||||
ID_Num = 91,
|
||||
Componente = S_Code.sMAG,
|
||||
Aferir = true,
|
||||
Mandatorio = true,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.I2C,
|
||||
},
|
||||
Parametros = new List<SensorParametroModel>()
|
||||
{
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Endereço I2C",
|
||||
Valor = "0x36",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Canal MUX",
|
||||
Valor = "1",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
},
|
||||
ValoresLeituras = new List<SensorValoresLeituraModel>()
|
||||
{
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.Iniciado,
|
||||
posicao = CanMessagePosicaoDados.Status,
|
||||
indice = 0,
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraBruta,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 0,
|
||||
unidade_medida = ""
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraAngulo,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 1,
|
||||
unidade_medida = "°"
|
||||
},
|
||||
}
|
||||
},
|
||||
new SensorModel()
|
||||
{
|
||||
ID = "MAGDT",
|
||||
Descricao = "Angulo Direcional DT",
|
||||
ID_Num = 92,
|
||||
Componente = S_Code.sMAG,
|
||||
Aferir = true,
|
||||
Mandatorio = true,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.I2C,
|
||||
},
|
||||
Parametros = new List<SensorParametroModel>()
|
||||
{
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Endereço I2C",
|
||||
Valor = "0x36",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Canal MUX",
|
||||
Valor = "2",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
},
|
||||
ValoresLeituras = new List<SensorValoresLeituraModel>()
|
||||
{
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.Iniciado,
|
||||
posicao = CanMessagePosicaoDados.Status,
|
||||
indice = 0,
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraBruta,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 0,
|
||||
unidade_medida = ""
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraAngulo,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 1,
|
||||
unidade_medida = "°"
|
||||
},
|
||||
}
|
||||
},
|
||||
new SensorModel()
|
||||
{
|
||||
ID = "MAGEF",
|
||||
Descricao = "Angulo Direcional EF",
|
||||
ID_Num = 93,
|
||||
Componente = S_Code.sMAG,
|
||||
Aferir = true,
|
||||
Mandatorio = true,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.I2C,
|
||||
},
|
||||
Parametros = new List<SensorParametroModel>()
|
||||
{
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Endereço I2C",
|
||||
Valor = "0x36",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Canal MUX",
|
||||
Valor = "3",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
},
|
||||
ValoresLeituras = new List<SensorValoresLeituraModel>()
|
||||
{
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.Iniciado,
|
||||
posicao = CanMessagePosicaoDados.Status,
|
||||
indice = 0,
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraBruta,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 0,
|
||||
unidade_medida = ""
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraAngulo,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 1,
|
||||
unidade_medida = "°"
|
||||
},
|
||||
}
|
||||
},
|
||||
new SensorModel()
|
||||
{
|
||||
ID = "MAGDF",
|
||||
Descricao = "Angulo Direcional DF",
|
||||
ID_Num = 94,
|
||||
Componente = S_Code.sMAG,
|
||||
Aferir = true,
|
||||
Mandatorio = true,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.I2C,
|
||||
},
|
||||
Parametros = new List<SensorParametroModel>()
|
||||
{
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Endereço I2C",
|
||||
Valor = "0x36",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
new SensorParametroModel()
|
||||
{
|
||||
Descricao = "Canal MUX",
|
||||
Valor = "4",
|
||||
QtdBytes = 1,
|
||||
Escalar = false,
|
||||
Enviar = true
|
||||
},
|
||||
},
|
||||
ValoresLeituras = new List<SensorValoresLeituraModel>()
|
||||
{
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.Iniciado,
|
||||
posicao = CanMessagePosicaoDados.Status,
|
||||
indice = 0,
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraBruta,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 0,
|
||||
unidade_medida = ""
|
||||
},
|
||||
new SensorValoresLeituraModel()
|
||||
{
|
||||
funcao = FuncoesPinout.LeituraAngulo,
|
||||
posicao = CanMessagePosicaoDados.Dados1,
|
||||
indice = 1,
|
||||
unidade_medida = "°"
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
Servos = new List<SensorServoModel>()
|
||||
{
|
||||
|
|
@ -1681,7 +1902,7 @@ namespace AgroBase.Models.Modules
|
|||
channelRssi = 0,
|
||||
lbt = 0,
|
||||
packetRssi = 0,
|
||||
channel = 23,
|
||||
channel = 65,
|
||||
key = 0
|
||||
},
|
||||
ParametrosGet = new LoRaParametrosModel()
|
||||
|
|
@ -1825,7 +2046,7 @@ namespace AgroBase.Models.Modules
|
|||
config.AddRange(sensoresConfig);
|
||||
|
||||
// Adicionar configurações do LoRa
|
||||
if (!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))
|
||||
{
|
||||
var loraConfig = loRaService.ProtocoloConfiguracao(Pinout, Conectar);
|
||||
config.AddRange(loraConfig);
|
||||
|
|
@ -2780,6 +3001,17 @@ namespace AgroBase.Models.Modules
|
|||
return raw * escala;
|
||||
}
|
||||
|
||||
private ushort Converter2BytesU16(byte[] data, int idx)
|
||||
{
|
||||
return (ushort)((data[idx] << 8) | data[idx + 1]);
|
||||
}
|
||||
|
||||
private double ConverterAngle100(byte[] data, int idx)
|
||||
{
|
||||
ushort v = (ushort)((data[idx] << 8) | data[idx + 1]);
|
||||
return v / 100.0;
|
||||
}
|
||||
|
||||
private S_Code DetectarComponenteDoID_Num(int ID_Num)
|
||||
{
|
||||
if (ID_Num == Variaveis.ID_Num_sMOD) return S_Code.sMOD;
|
||||
|
|
@ -3314,6 +3546,27 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
break;
|
||||
}
|
||||
case S_Code.sMAG:
|
||||
{
|
||||
switch (posicao)
|
||||
{
|
||||
case CanMessagePosicaoDados.Status:
|
||||
{
|
||||
bool Iniciado = data[2] == 1;
|
||||
AtualizarDados(ID_Num, posicao, componente, new List<dynamic>() { Iniciado });
|
||||
break;
|
||||
}
|
||||
case CanMessagePosicaoDados.Dados1:
|
||||
{
|
||||
ushort raw = Converter2BytesU16(data, 2);
|
||||
double angle = ConverterAngle100(data, 4);
|
||||
AtualizarDados(ID_Num, posicao, componente, new List<dynamic>() { raw, angle });
|
||||
//Console.WriteLine($"[sMAG] {ID_Num}, Raw: {raw}, Angulo: {angle}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -399,6 +399,8 @@ namespace AgroBase.Models
|
|||
Direcao = Direcao.Parado,
|
||||
EmFreio = false,
|
||||
PercentualVelocidadeSP = 20,
|
||||
AlturaBarra = 50,
|
||||
BombaAtuada = false,
|
||||
TiposControle = new List<OperacaoControleTipoModel>()
|
||||
{
|
||||
new OperacaoControleTipoModel()
|
||||
|
|
@ -550,6 +552,8 @@ namespace AgroBase.Models
|
|||
Direcao = Direcao.Parado,
|
||||
EmFreio = false,
|
||||
PercentualVelocidadeSP = 0,
|
||||
AlturaBarra = 50,
|
||||
BombaAtuada = true,
|
||||
TiposControle = new List<OperacaoControleTipoModel>()
|
||||
{
|
||||
new OperacaoControleTipoModel()
|
||||
|
|
@ -804,6 +808,7 @@ namespace AgroBase.Models
|
|||
break;
|
||||
}
|
||||
|
||||
Variaveis.OperacaoEmAndamento.Parametros.RoverId = VariaveisEquipamento.Parametros.serial_number;
|
||||
Variaveis.OperacaoEmAndamento.Parametros.ModulosMandatorios.Add(new OperacaoModulosMandatoriosModel() { Dispositivo = T_Code.Npc, Mandatorio = true, Utilizar = true });
|
||||
Variaveis.OperacaoEmAndamento.Parametros.ModulosMandatorios.Add(new OperacaoModulosMandatoriosModel() { Dispositivo = T_Code.Bat, Mandatorio = true, Utilizar = true });
|
||||
Variaveis.OperacaoEmAndamento.Parametros.ModulosMandatorios.Add(new OperacaoModulosMandatoriosModel() { Dispositivo = T_Code.Ipb, Mandatorio = true, Utilizar = true });
|
||||
|
|
@ -955,6 +960,7 @@ namespace AgroBase.Models
|
|||
CarregarParametrosOperacaoPadrao((ModoOperacao)Parametros.Modo);
|
||||
|
||||
Variaveis.OperacaoEmAndamento.Parametros = Parametros;
|
||||
Variaveis.OperacaoEmAndamento.Parametros.RoverId = VariaveisEquipamento.Parametros.serial_number;
|
||||
Variaveis.OperacaoEmAndamento.Parametros.DadosLeitura = new OperacaoSensoriamentoLogModel();
|
||||
Variaveis.OperacaoEmAndamento.Parametros.DadosLeitura.AtualizarDados();
|
||||
Variaveis.OperacaoEmAndamento.DefinirComponentesEmUso();
|
||||
|
|
@ -1730,7 +1736,7 @@ namespace AgroBase.Models
|
|||
Momento = Agora,
|
||||
Modulo_ID = Modulo.Modulo_ID,
|
||||
Inicializado = Modulo.DirMotor.Inicializado,
|
||||
Angulo = Modulo.DirMotor.Angulo,
|
||||
AnguloDriver = Modulo.DirMotor.AnguloDriver,
|
||||
Angulo_SP = Modulo.DirMotor.Angulo_SP,
|
||||
Controlar = Modulo.DirMotor.Comandar,
|
||||
Sentido_SP = Modulo.DirMotor.Sentido_SP,
|
||||
|
|
@ -1739,6 +1745,9 @@ namespace AgroBase.Models
|
|||
Velocidade = (Modulo.DirMotor.Velocidade / Modulo.DirMotor.Velocidade_Max) * 100.0,
|
||||
FolgaMecanica = Modulo.DirMotor.FolgaMecanica,
|
||||
UltimoComandoRespondido = Modulo.DirMotor.Leitura?.UltimoComandoRecebido ?? DateTime.MinValue,
|
||||
AnguloLeitura = Modulo.DirMotor.AnguloLeitura,
|
||||
AnguloFolgaCompensar = Modulo.DirMotor.AnguloFolgaCompensar,
|
||||
AnguloReal = Modulo.DirMotor.AnguloReal
|
||||
};
|
||||
SalvarLog(T_Code.Dir.ToString(), logDir, false);
|
||||
});
|
||||
|
|
@ -2299,7 +2308,10 @@ namespace AgroBase.Models
|
|||
LeituraComandoBomba = (_DispAtu.Dados.BombasPressurizadoras.FirstOrDefault().ValoresLeituras.FirstOrDefault(x => x.funcao == FuncoesPinout.EstadoLeitura)?.atual?.valor ?? Estado.Desligado) == Estado.Ligado,
|
||||
LeituraPotenciaBomba = FuncoesMatematicas.Clamp(_DispAtu.Dados.BombasPressurizadoras.FirstOrDefault().ValoresLeituras.FirstOrDefault(x => x.funcao == FuncoesPinout.Potencia)?.atual?.valor ?? 0, 0, 100),
|
||||
VolumeVazaoMl = _DispAtu.Dados.VolumeVazaoML,
|
||||
Iniciados = _DispAtu.Dados.Sensores.Select(s => new { s.ID, s.Inicializado }).Union(_DispAtu.Dados.BicosPulverizadores.Select(b => new { b.ID, b.Inicializado })).Union(_DispAtu.Dados.BombasPressurizadoras.Select(b => new { b.ID, b.Inicializado })).ToDictionary(x => x.ID, x => x.Inicializado)
|
||||
Iniciados = _DispAtu.Dados.Sensores.Select(s => new { s.ID, s.Inicializado }).Union(_DispAtu.Dados.BicosPulverizadores.Select(b => new { b.ID, b.Inicializado })).Union(_DispAtu.Dados.BombasPressurizadoras.Select(b => new { b.ID, b.Inicializado })).ToDictionary(x => x.ID, x => x.Inicializado),
|
||||
AnguloBarraEsquerda = _DispAtu.Dados.Sensores.FirstOrDefault(x => x.Componente == S_Code.sMAG && x.ID.Contains("ESQ"))?.ValoresLeituras?.FirstOrDefault(x => x.funcao == FuncoesPinout.LeituraAngulo)?.atual?.valor ?? -1,
|
||||
AnguloBarraDireita = _DispAtu.Dados.Sensores.FirstOrDefault(x => x.Componente == S_Code.sMAG && x.ID.Contains("DIR"))?.ValoresLeituras?.FirstOrDefault(x => x.funcao == FuncoesPinout.LeituraAngulo)?.atual?.valor ?? -1,
|
||||
AnguloBarraAltura = _DispAtu.Dados.Sensores.FirstOrDefault(x => x.Componente == S_Code.sMAG && x.ID.Contains("ALT"))?.ValoresLeituras?.FirstOrDefault(x => x.funcao == FuncoesPinout.LeituraAngulo)?.atual?.valor ?? -1,
|
||||
} : new OperacaoSensoriamentoLogAtuModel();
|
||||
|
||||
var dadosMovimentacao = _DispMvd != null ? new OperacaoSensoriamentoLogMovModel()
|
||||
|
|
@ -2330,18 +2342,24 @@ namespace AgroBase.Models
|
|||
|
||||
var dadosDirecional = _DispMvd != null ? new OperacaoSensoriamentoLogDirModel()
|
||||
{
|
||||
AnguloMedio = _DispMvd.Dados.Modulos.Where(x => x.DirMotor.Inicializado && x.DirMotor.Comandar).DefaultIfEmpty().Average(x => Math.Abs(x?.DirMotor?.Angulo ?? 0)),
|
||||
AnguloMedio = _DispMvd.Dados.Modulos.Where(x => x.DirMotor.Inicializado && x.DirMotor.Comandar).DefaultIfEmpty().Average(x => Math.Abs(x?.DirMotor?.AnguloLeitura ?? 0)),
|
||||
Status = _DispMvd.Dados.StatusModulosDIR(_Controle.TipoMovimento),
|
||||
Dados = _DispMvd.Dados.Modulos.Select(x => new OperacaoSensoriamentoLogDirDadosModel()
|
||||
Dados = _DispMvd.Dados.Modulos.Select(x => new DirSensoriamentoLogModel()
|
||||
{
|
||||
ID = x.DirMotor.Mod_ID,
|
||||
Iniciado = x.DirMotor.Inicializado,
|
||||
Angulo = x.DirMotor.Angulo,
|
||||
Modulo_ID = x.DirMotor.Mod_ID,
|
||||
Inicializado = x.DirMotor.Inicializado,
|
||||
AnguloDriver = x.DirMotor.AnguloDriver,
|
||||
AnguloReal = x.DirMotor.AnguloReal,
|
||||
Angulo_SP = x.DirMotor.Angulo_SP,
|
||||
Sentido = x.DirMotor.Sentido,
|
||||
SentidoSP = x.DirMotor.Sentido_SP,
|
||||
Sentido_SP = x.DirMotor.Sentido_SP,
|
||||
SentidoReal = x.DirMotor.SentidoReal,
|
||||
FolgaMecanica = x.DirMotor.FolgaMecanica
|
||||
FolgaMecanica = x.DirMotor.FolgaMecanica,
|
||||
AnguloFolgaCompensar = x.DirMotor.AnguloFolgaCompensar,
|
||||
AnguloLeitura = x.DirMotor.AnguloLeitura,
|
||||
Controlar = x.DirMotor.Comandar,
|
||||
UltimoComandoRespondido = x.DirMotor.UltimoComandoEnviado,
|
||||
Velocidade = x.DirMotor.Velocidade,
|
||||
}).ToList()
|
||||
} : new OperacaoSensoriamentoLogDirModel();
|
||||
|
||||
|
|
@ -2559,6 +2577,9 @@ namespace AgroBase.Models
|
|||
public bool LeituraComandoBomba { get; set; }
|
||||
public double LeituraPotenciaBomba { get; set; }
|
||||
public double VolumeVazaoMl { get; set; }
|
||||
public double AnguloBarraEsquerda { get; set; }
|
||||
public double AnguloBarraDireita { get; set; }
|
||||
public double AnguloBarraAltura { get; set; }
|
||||
public Dictionary<string, bool> Iniciados { get; set; }
|
||||
|
||||
public OperacaoSensoriamentoLogAtuModel Clone()
|
||||
|
|
@ -2582,6 +2603,9 @@ namespace AgroBase.Models
|
|||
LeituraComandoBomba = LeituraComandoBomba,
|
||||
LeituraPotenciaBomba = LeituraPotenciaBomba,
|
||||
VolumeVazaoMl = VolumeVazaoMl,
|
||||
AnguloBarraEsquerda = AnguloBarraEsquerda,
|
||||
AnguloBarraDireita = AnguloBarraDireita,
|
||||
AnguloBarraAltura = AnguloBarraAltura,
|
||||
Iniciados = new Dictionary<string, bool>(Iniciados ?? new Dictionary<string, bool>())
|
||||
};
|
||||
}
|
||||
|
|
@ -2642,7 +2666,7 @@ namespace AgroBase.Models
|
|||
{
|
||||
public double AnguloMedio { get; set; }
|
||||
public (bool, List<string>) Status { get; set; }
|
||||
public List<OperacaoSensoriamentoLogDirDadosModel> Dados { get; set; }
|
||||
public List<DirSensoriamentoLogModel> Dados { get; set; }
|
||||
|
||||
public OperacaoSensoriamentoLogDirModel Clone()
|
||||
{
|
||||
|
|
@ -2650,23 +2674,11 @@ namespace AgroBase.Models
|
|||
{
|
||||
AnguloMedio = AnguloMedio,
|
||||
Status = Status,
|
||||
Dados = new List<OperacaoSensoriamentoLogDirDadosModel>(Dados ?? new List<OperacaoSensoriamentoLogDirDadosModel>())
|
||||
Dados = new List<DirSensoriamentoLogModel>(Dados ?? new List<DirSensoriamentoLogModel>())
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class OperacaoSensoriamentoLogDirDadosModel
|
||||
{
|
||||
public string ID { get; set; }
|
||||
public bool Iniciado { get; set; }
|
||||
public double Angulo { get; set; }
|
||||
public double Angulo_SP { get; set; }
|
||||
public Sentido Sentido { get; set; }
|
||||
public Sentido SentidoReal { get; set; }
|
||||
public Sentido SentidoSP { get; set; }
|
||||
public double FolgaMecanica { get; set; }
|
||||
}
|
||||
|
||||
public class OperacaoSensoriamentoLogBateriaModel
|
||||
{
|
||||
public bool Iniciado { get; set; }
|
||||
|
|
@ -2790,7 +2802,10 @@ namespace AgroBase.Models
|
|||
public bool Inicializado { get; set; }
|
||||
public bool Controlar { get; set; }
|
||||
public double Angulo_SP { get; set; }
|
||||
public double Angulo { get; set; }
|
||||
public double AnguloDriver { get; set; }
|
||||
public double AnguloReal { get; set; }
|
||||
public double AnguloLeitura { get; set; }
|
||||
public double AnguloFolgaCompensar { get; set; }
|
||||
public Sentido Sentido_SP { get; set; }
|
||||
public Sentido Sentido { get; set; }
|
||||
public Sentido SentidoReal { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using static AgroBase.Models.Enums;
|
||||
|
||||
namespace AgroBase.Models.Operacoes
|
||||
|
|
@ -7,6 +8,7 @@ namespace AgroBase.Models.Operacoes
|
|||
{
|
||||
public string RoverId { get; set; }
|
||||
public bool Alive { get; set; }
|
||||
public DateTime UltimoContato { get; set; }
|
||||
public bool Configurado { get; set; }
|
||||
public ModoOperacao? Modo { get; set; }
|
||||
public string Descricao { get; set; }
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ namespace AgroBase.Services.Operadores
|
|||
($"{endereco_dir}.freq_base", Variaveis.OperacaoEmAndamento.DispMvd.Dados.tmrRegistradorDIR.IntervalHz),
|
||||
($"{endereco_dir}.endereco", mod.DirMotor._EnderecoCAN_Tx),
|
||||
($"{endereco_dir}.mod_id", mod.Modulo_ID),
|
||||
($"{endereco_dir}.angulo", mod.DirMotor.Angulo),
|
||||
($"{endereco_dir}.angulo", mod.DirMotor.AnguloLeitura),
|
||||
($"{endereco_dir}.angulo_sp", mod.DirMotor.Angulo_SP),
|
||||
($"{endereco_dir}.comandar", mod.DirMotor.Comandar),
|
||||
($"{endereco_dir}.referenciado", mod.DirMotor.Referenciado),
|
||||
|
|
|
|||
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
|
|
@ -1 +1 @@
|
|||
{"ExpansorGPIO":false,"EnderecoGPIO":"","ExpansorADS":false,"EnderecoADS":"","Pinos":[{"Controlador":0,"Barramento":0,"Pino":99,"Descricao":"1","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":98,"Descricao":"2","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":97,"Descricao":"3","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":4,"Descricao":"4","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":5,"Descricao":"5","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":6,"Descricao":"6","Funcao":24,"Habilitado":true,"ComponenteID":"PRSLN"},{"Controlador":0,"Barramento":0,"Pino":7,"Descricao":"7","Funcao":25,"Habilitado":true,"ComponenteID":"FLXLN"},{"Controlador":0,"Barramento":0,"Pino":15,"Descricao":"8","Funcao":22,"Habilitado":true,"ComponenteID":"MASRS"},{"Controlador":0,"Barramento":0,"Pino":16,"Descricao":"9","Funcao":23,"Habilitado":true,"ComponenteID":"MASRS"},{"Controlador":0,"Barramento":0,"Pino":17,"Descricao":"10","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":18,"Descricao":"11","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":8,"Descricao":"12","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":3,"Descricao":"13","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":46,"Descricao":"14","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":9,"Descricao":"15","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":10,"Descricao":"16","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":11,"Descricao":"17","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":12,"Descricao":"18","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":13,"Descricao":"19","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":14,"Descricao":"20","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":96,"Descricao":"21","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":95,"Descricao":"22","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":94,"Descricao":"23","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":93,"Descricao":"24","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":19,"Descricao":"25","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":20,"Descricao":"26","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":21,"Descricao":"27","Funcao":21,"Habilitado":true,"ComponenteID":"B01"},{"Controlador":0,"Barramento":0,"Pino":47,"Descricao":"28","Funcao":21,"Habilitado":true,"ComponenteID":"B02"},{"Controlador":0,"Barramento":0,"Pino":48,"Descricao":"29","Funcao":21,"Habilitado":true,"ComponenteID":"B03"},{"Controlador":0,"Barramento":0,"Pino":45,"Descricao":"30","Funcao":21,"Habilitado":true,"ComponenteID":"B04"},{"Controlador":0,"Barramento":0,"Pino":0,"Descricao":"31","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":35,"Descricao":"32","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":36,"Descricao":"33","Funcao":37,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":37,"Descricao":"34","Funcao":36,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":38,"Descricao":"35","Funcao":35,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":39,"Descricao":"36","Funcao":5,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":40,"Descricao":"37","Funcao":14,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":41,"Descricao":"38","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":42,"Descricao":"39","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":2,"Descricao":"40","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":1,"Descricao":"41","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":44,"Descricao":"42","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":43,"Descricao":"43","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":92,"Descricao":"44","Funcao":0,"Habilitado":false,"ComponenteID":""}]}
|
||||
{"ExpansorGPIO":false,"EnderecoGPIO":"","ExpansorADS":false,"EnderecoADS":"","Pinos":[{"Controlador":0,"Barramento":0,"Pino":99,"Descricao":"1","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":98,"Descricao":"2","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":97,"Descricao":"3","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":4,"Descricao":"4","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":5,"Descricao":"5","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":6,"Descricao":"6","Funcao":24,"Habilitado":true,"ComponenteID":"PRSLN"},{"Controlador":0,"Barramento":0,"Pino":7,"Descricao":"7","Funcao":25,"Habilitado":true,"ComponenteID":"FLXLN"},{"Controlador":0,"Barramento":0,"Pino":15,"Descricao":"8","Funcao":22,"Habilitado":true,"ComponenteID":"MASRS"},{"Controlador":0,"Barramento":0,"Pino":16,"Descricao":"9","Funcao":23,"Habilitado":true,"ComponenteID":"MASRS"},{"Controlador":0,"Barramento":0,"Pino":17,"Descricao":"10","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":18,"Descricao":"11","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":8,"Descricao":"12","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":3,"Descricao":"13","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":46,"Descricao":"14","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":9,"Descricao":"15","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":10,"Descricao":"16","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":11,"Descricao":"17","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":12,"Descricao":"18","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":13,"Descricao":"19","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":14,"Descricao":"20","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":96,"Descricao":"21","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":95,"Descricao":"22","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":94,"Descricao":"23","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":93,"Descricao":"24","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":19,"Descricao":"25","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":20,"Descricao":"26","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":21,"Descricao":"27","Funcao":21,"Habilitado":true,"ComponenteID":"B01"},{"Controlador":0,"Barramento":0,"Pino":47,"Descricao":"28","Funcao":21,"Habilitado":true,"ComponenteID":"B02"},{"Controlador":0,"Barramento":0,"Pino":48,"Descricao":"29","Funcao":21,"Habilitado":true,"ComponenteID":"B03"},{"Controlador":0,"Barramento":0,"Pino":45,"Descricao":"30","Funcao":21,"Habilitado":true,"ComponenteID":"B04"},{"Controlador":0,"Barramento":0,"Pino":0,"Descricao":"31","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":35,"Descricao":"32","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":36,"Descricao":"33","Funcao":37,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":37,"Descricao":"34","Funcao":36,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":38,"Descricao":"35","Funcao":35,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":39,"Descricao":"36","Funcao":5,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":40,"Descricao":"37","Funcao":14,"Habilitado":true,"ComponenteID":"BOMBA"},{"Controlador":0,"Barramento":0,"Pino":41,"Descricao":"38","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":42,"Descricao":"39","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":2,"Descricao":"40","Funcao":34,"Habilitado":true,"ComponenteID":"Atu"},{"Controlador":0,"Barramento":0,"Pino":1,"Descricao":"41","Funcao":33,"Habilitado":true,"ComponenteID":"Atu"},{"Controlador":0,"Barramento":0,"Pino":44,"Descricao":"42","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":43,"Descricao":"43","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Controlador":0,"Barramento":0,"Pino":92,"Descricao":"44","Funcao":0,"Habilitado":false,"ComponenteID":""}]}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_6f60bf078ab13a11b4301162d42964ca {
|
||||
#map_e96ec2bc0d29f93b5eb9a092cd8db254 {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -54,14 +54,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_6f60bf078ab13a11b4301162d42964ca" ></div>
|
||||
<div class="folium-map" id="map_e96ec2bc0d29f93b5eb9a092cd8db254" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_6f60bf078ab13a11b4301162d42964ca = L.map(
|
||||
"map_6f60bf078ab13a11b4301162d42964ca",
|
||||
var map_e96ec2bc0d29f93b5eb9a092cd8db254 = L.map(
|
||||
"map_e96ec2bc0d29f93b5eb9a092cd8db254",
|
||||
{
|
||||
center: [0.0, 0.0],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_fd5ef27e56749c547e5f3e66fbda0894 = L.tileLayer(
|
||||
var tile_layer_2073fabf3e3fe0f56ca3d565a07db8af = L.tileLayer(
|
||||
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
{
|
||||
"minZoom": 0,
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
);
|
||||
|
||||
|
||||
tile_layer_fd5ef27e56749c547e5f3e66fbda0894.addTo(map_6f60bf078ab13a11b4301162d42964ca);
|
||||
tile_layer_2073fabf3e3fe0f56ca3d565a07db8af.addTo(map_e96ec2bc0d29f93b5eb9a092cd8db254);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_6f60bf078ab13a11b4301162d42964ca);
|
||||
trajeto_json.addTo(map_e96ec2bc0d29f93b5eb9a092cd8db254);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -179,9 +179,9 @@
|
|||
|
||||
var marcadorEquipamento = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_6f60bf078ab13a11b4301162d42964ca);
|
||||
}).addTo(map_e96ec2bc0d29f93b5eb9a092cd8db254);
|
||||
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_6f60bf078ab13a11b4301162d42964ca);
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_e96ec2bc0d29f93b5eb9a092cd8db254);
|
||||
var icon = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
|
|
@ -246,7 +246,7 @@
|
|||
}
|
||||
|
||||
if (foco) {
|
||||
map_6f60bf078ab13a11b4301162d42964ca.setView(novaPosicao, map_6f60bf078ab13a11b4301162d42964ca.getZoom());
|
||||
map_e96ec2bc0d29f93b5eb9a092cd8db254.setView(novaPosicao, map_e96ec2bc0d29f93b5eb9a092cd8db254.getZoom());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@
|
|||
marcadorDinamico.setRotationAngle(angulo);
|
||||
|
||||
adicionarCoordenada("Tj", [novaLongitude, novaLatitude]);
|
||||
map_6f60bf078ab13a11b4301162d42964ca.setView(novaPosicao, map_6f60bf078ab13a11b4301162d42964ca.getZoom());*/
|
||||
map_e96ec2bc0d29f93b5eb9a092cd8db254.setView(novaPosicao, map_e96ec2bc0d29f93b5eb9a092cd8db254.getZoom());*/
|
||||
});
|
||||
|
||||
function calcularOrientacao(P1latitude, P1longitude, P2latitude, P2longitude) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:local="clr-namespace:OperationControl.Controls"
|
||||
x:Name="Root" Focusable="True" MinWidth="382">
|
||||
|
||||
<Border CornerRadius="8" Background="#111" BorderBrush="Black" BorderThickness="1" Width="382" MinHeight="66">
|
||||
<Border CornerRadius="8" Background="#FF1C2530" BorderThickness="1" Width="382" MinHeight="66">
|
||||
<Canvas x:Name="cnvFundo">
|
||||
<Label Content="Controle" Foreground="White" Canvas.Left="0" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Top="-5"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -93,9 +93,10 @@ namespace OperationControl.Controls
|
|||
StreetMapClicked?.Invoke(this, new StreetMapClickedEventArgs(streetId, RuasMapaCarregado.Where(x => x.Selected).Select(x => x.Id).ToList()));
|
||||
}
|
||||
|
||||
private void HighlightRoad(MIFeature feature)
|
||||
private void HighlightRoad(MIFeature? feature = null, string? id = null)
|
||||
{
|
||||
var id = GetAttr(feature, "Id");
|
||||
if (string.IsNullOrEmpty(id))
|
||||
id = GetAttr(feature, "Id");
|
||||
var rua = RuasMapaCarregado.FirstOrDefault(x => x.Id == id);
|
||||
if (rua == null) return;
|
||||
|
||||
|
|
@ -110,6 +111,18 @@ namespace OperationControl.Controls
|
|||
OnStreetMapClicked(id);
|
||||
}
|
||||
|
||||
private void AtualizarStylesRuas()
|
||||
{
|
||||
foreach (var rua in RuasMapaCarregado)
|
||||
{
|
||||
rua.Status = (rua.Selected) ? StreetMapStyle.Selected : StreetMapStyle.Normal;
|
||||
rua.Feature.Styles.Clear();
|
||||
rua.Feature.Styles.Add(CreateStreetStyle(rua.Status));
|
||||
}
|
||||
|
||||
Mapa.Refresh();
|
||||
}
|
||||
|
||||
public enum StreetMapStyle
|
||||
{
|
||||
Normal,
|
||||
|
|
@ -474,7 +487,8 @@ namespace OperationControl.Controls
|
|||
}
|
||||
else if (info?.Layer == MapaPlantacao_Layer && feat is MIFeature roadFeature)
|
||||
{
|
||||
HighlightRoad(roadFeature);
|
||||
if (!(VariaveisControleOperacao.RoverEmFoco?.DadosLeitura?.OperacaoIniciada ?? false))
|
||||
HighlightRoad(roadFeature);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -826,6 +840,21 @@ namespace OperationControl.Controls
|
|||
return _mapa;
|
||||
}
|
||||
|
||||
public void CarregarDadosMapa(AgroBase.Models.MapaFeatureCollectionModel Mapa, List<string> RuasSelecionadas)
|
||||
{
|
||||
if (RuasMapaCarregado.Any())
|
||||
{
|
||||
foreach (var rua in RuasMapaCarregado)
|
||||
{
|
||||
var dado = Mapa.features.FirstOrDefault(x => x.properties.Id == rua.Id);
|
||||
if (dado == null) continue;
|
||||
rua.Selected = RuasSelecionadas.Contains(dado.properties.Id);
|
||||
}
|
||||
|
||||
AtualizarStylesRuas();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class MapMarkerManager
|
||||
|
|
|
|||
|
|
@ -101,4 +101,68 @@ namespace OperationControl.Controls.Pulverizador
|
|||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
=> throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public class RuaWidthFisicaConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (values.Length < 3) return 0.0;
|
||||
|
||||
if (values[0] is not double totalWidth ||
|
||||
values[1] is not double larguraRuaCm ||
|
||||
values[2] is not double comprimentoBarraCm ||
|
||||
totalWidth <= 0 || comprimentoBarraCm <= 0 || larguraRuaCm <= 0)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// px por cm na faixa do solo (usando comprimento da barra como referência física)
|
||||
double pxPorCm = totalWidth / comprimentoBarraCm;
|
||||
double widthPx = larguraRuaCm * pxPorCm;
|
||||
|
||||
// não deixa a rua ficar maior que a área disponível
|
||||
if (widthPx > totalWidth) widthPx = totalWidth;
|
||||
|
||||
return widthPx;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
=> throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public class RuaOffsetFisicaConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (values.Length < 4) return new Thickness(0);
|
||||
|
||||
if (values[0] is not double totalWidth ||
|
||||
values[1] is not double erroLateralCm ||
|
||||
values[2] is not double larguraRuaCm ||
|
||||
values[3] is not double comprimentoBarraCm ||
|
||||
totalWidth <= 0 || comprimentoBarraCm <= 0)
|
||||
{
|
||||
return new Thickness(0);
|
||||
}
|
||||
|
||||
double pxPorCm = totalWidth / comprimentoBarraCm;
|
||||
double widthPx = Math.Min(totalWidth, Math.Max(0, larguraRuaCm * pxPorCm));
|
||||
|
||||
double center = totalWidth / 2.0;
|
||||
|
||||
// erro > 0 = robô desviado pra direita → rua aparece indo pra esquerda
|
||||
double roadCenter = center - erroLateralCm * pxPorCm;
|
||||
|
||||
double left = roadCenter - widthPx / 2.0;
|
||||
|
||||
// SEM travas aqui: pode ser negativo ou maior que totalWidth
|
||||
// o Grid com ClipToBounds cuida de cortar o desenho
|
||||
|
||||
return new Thickness(left, 0, 0, 0);
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
=> throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
<UserControl.Resources>
|
||||
<local:BicoPositionFisicaConverter x:Key="BicoPositionFisicaConverter" />
|
||||
<local:AlturaBarraToMarginFisicaConverter x:Key="AlturaBarraToMarginFisicaConverter" GroundTop="80" Top80Px="7" AlturaMaxCm="80" />
|
||||
<local:RuaWidthFisicaConverter x:Key="RuaWidthFisicaConverter" />
|
||||
<local:RuaOffsetFisicaConverter x:Key="RuaOffsetFisicaConverter" />
|
||||
|
||||
<SolidColorBrush x:Key="BgBrush" Color="#FF101820"/>
|
||||
<SolidColorBrush x:Key="CardBrush" Color="#FF1C2530"/>
|
||||
|
|
@ -53,9 +55,9 @@
|
|||
|
||||
<Grid Grid.Row="1" Margin="10,0,10,-8">
|
||||
<!-- Cota de altura à esquerda -->
|
||||
<Canvas Width="50" HorizontalAlignment="Left" Margin="-15,0,0,0">
|
||||
<TextBlock Foreground="{StaticResource TextSecondary}" FontSize="10" Canvas.Top="-23" Canvas.Left="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding AlturaBarra, RelativeSource={RelativeSource AncestorType=UserControl}, StringFormat={}{0:F0} cm}" />
|
||||
<Slider Minimum="50" Maximum="80" Value="{Binding AlturaBarra, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}" Orientation="Vertical" Height="58" VerticalAlignment="Top" IsDirectionReversed="False" HorizontalAlignment="Center" Canvas.Top="-8" />
|
||||
<Canvas Width="50" HorizontalAlignment="Left">
|
||||
<TextBlock Foreground="{StaticResource TextSecondary}" FontSize="10" Canvas.Top="-15" Canvas.Left="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding AlturaBarra, RelativeSource={RelativeSource AncestorType=UserControl}, StringFormat={}{0:F0} cm}" />
|
||||
<Slider Minimum="50" Maximum="80" Value="{Binding AlturaBarra, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}" Orientation="Vertical" Height="58" VerticalAlignment="Top" IsDirectionReversed="False" HorizontalAlignment="Center" Canvas.Left="5" />
|
||||
</Canvas>
|
||||
|
||||
<!-- Bicos e leques (traseira) -->
|
||||
|
|
@ -131,7 +133,7 @@
|
|||
</TextBlock>
|
||||
|
||||
<!-- Dados da bomba (pressão e tempo) -->
|
||||
<StackPanel Orientation="Vertical" Canvas.Left="10" Canvas.Top="-15" TextBlock.TextAlignment="Right">
|
||||
<StackPanel Orientation="Vertical" Canvas.Left="10" Canvas.Top="-18" TextBlock.TextAlignment="Right">
|
||||
<!-- Linha 1: pressão -->
|
||||
<TextBlock Text="Pressão" Foreground="{StaticResource TextSecondary}" FontSize="10"/>
|
||||
<TextBlock Text="{Binding PressaoLinha, RelativeSource={RelativeSource AncestorType=UserControl}, StringFormat={}{0:F2} psi}" Foreground="{StaticResource TextPrimary}" FontSize="12" FontWeight="SemiBold" Margin="0,0,0,4"/>
|
||||
|
|
@ -146,8 +148,42 @@
|
|||
</StackPanel>
|
||||
</Canvas>
|
||||
|
||||
<!-- Solo -->
|
||||
<Border Height="13" VerticalAlignment="Top" Margin="-18,80,-18,0" Background="#5F6A36" CornerRadius="0,0,8,8" />
|
||||
<!-- Solo + Rua -->
|
||||
<Grid Height="13" VerticalAlignment="Top" Margin="-18,80,-18,0" ClipToBounds="True">
|
||||
|
||||
<!-- Cana (fundo) -->
|
||||
<Border Background="#5F6A36" CornerRadius="0,0,8,8"/>
|
||||
|
||||
<!-- Rua (faixa vermelha que desliza) -->
|
||||
<Border Height="13" HorizontalAlignment="Left" Background="#AA8B0000" CornerRadius="0,0,8,8">
|
||||
|
||||
<!-- Largura da rua em px -->
|
||||
<Border.Width>
|
||||
<MultiBinding Converter="{StaticResource RuaWidthFisicaConverter}">
|
||||
<!-- largura em px da faixa do solo -->
|
||||
<Binding RelativeSource="{RelativeSource AncestorType=Grid}" Path="ActualWidth"/>
|
||||
<!-- largura da rua em cm -->
|
||||
<Binding Path="LarguraRuaCm"/>
|
||||
<!-- comprimento físico representado (cm) -->
|
||||
<Binding Path="ComprimentoBarraCm"/>
|
||||
</MultiBinding>
|
||||
</Border.Width>
|
||||
|
||||
<!-- Deslocamento lateral da rua -->
|
||||
<Border.Margin>
|
||||
<MultiBinding Converter="{StaticResource RuaOffsetFisicaConverter}">
|
||||
<!-- largura em px -->
|
||||
<Binding RelativeSource="{RelativeSource AncestorType=Grid}" Path="ActualWidth"/>
|
||||
<!-- erro lateral em cm (0 centro, - esquerda, + direita) -->
|
||||
<Binding Path="ErroLateralCm"/>
|
||||
<!-- largura rua cm -->
|
||||
<Binding Path="LarguraRuaCm"/>
|
||||
<!-- comprimento barra cm (escala px/cm) -->
|
||||
<Binding Path="ComprimentoBarraCm"/>
|
||||
</MultiBinding>
|
||||
</Border.Margin>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,7 @@
|
|||
using AgroBase.Models;
|
||||
using OperationControl.Controls.Pulverizador;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
using UserControl = System.Windows.Controls.UserControl;
|
||||
|
||||
|
|
@ -101,6 +87,24 @@ namespace OperationControl.Controls
|
|||
|
||||
public static readonly DependencyProperty QtdBicosProperty = DependencyProperty.Register(nameof(QtdBicos), typeof(int), typeof(PulverizadorIndicator), new PropertyMetadata(VariaveisEquipamento.QuantidadeBicosPulverizadores, OnQtdBicosChanged));
|
||||
|
||||
public double LarguraRuaCm
|
||||
{
|
||||
get => (double)GetValue(LarguraRuaCmProperty);
|
||||
set => SetValue(LarguraRuaCmProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty LarguraRuaCmProperty = DependencyProperty.Register(nameof(LarguraRuaCm), typeof(double), typeof(PulverizadorIndicator), new PropertyMetadata(150.0));
|
||||
|
||||
|
||||
public double ErroLateralCm
|
||||
{
|
||||
get => (double)GetValue(ErroLateralCmProperty);
|
||||
set => SetValue(ErroLateralCmProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ErroLateralCmProperty = DependencyProperty.Register(nameof(ErroLateralCm), typeof(double), typeof(PulverizadorIndicator), new PropertyMetadata(0.0));
|
||||
|
||||
|
||||
public ObservableCollection<BicoModel> Bicos { get; } = new();
|
||||
|
||||
private static void OnQtdBicosChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace OperationControl.Converters
|
||||
{
|
||||
public class NullToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
=> value == null ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible;
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
=> throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
using static AgroBase.Models.Enums;
|
||||
|
||||
namespace OperationControl.Models
|
||||
{
|
||||
public enum SeveridadeAlerta
|
||||
{
|
||||
Info,
|
||||
Warning,
|
||||
Error,
|
||||
Critical
|
||||
}
|
||||
|
||||
public class AlertaModel
|
||||
{
|
||||
public string Rover_ID { get; set; }
|
||||
public SeveridadeAlerta Severidade { get; set; }
|
||||
public T_Code Modulo { get; set; } // ex: "DIR", "SEN", "MOV"
|
||||
public string? Mod_ID { get; set; } // ID
|
||||
public string Mensagem { get; set; } // texto principal
|
||||
public DateTime Timestamp { get; set; } // opcional: hora do evento
|
||||
|
||||
|
||||
// Campo calculado para título (ex: "DIR — Falha no encoder")
|
||||
public string Titulo
|
||||
{
|
||||
get
|
||||
{
|
||||
string mod = Mod_ID != null && Mod_ID != S_Code.sMOD.ToString()
|
||||
? $"{Modulo} ({Mod_ID})"
|
||||
: Modulo.ToString();
|
||||
|
||||
return $"[{Rover_ID}] {mod} — {ResumoSeveridade}";
|
||||
}
|
||||
}
|
||||
|
||||
// Ícone simples só pra dar cara
|
||||
public string Icone => Severidade switch
|
||||
{
|
||||
SeveridadeAlerta.Warning => "⚠️",
|
||||
SeveridadeAlerta.Error => "🛑",
|
||||
SeveridadeAlerta.Critical => "🚨",
|
||||
_ => "ℹ️"
|
||||
};
|
||||
|
||||
public string ResumoSeveridade => Severidade switch
|
||||
{
|
||||
SeveridadeAlerta.Warning => "Alerta",
|
||||
SeveridadeAlerta.Error => "Falha",
|
||||
SeveridadeAlerta.Critical => "Crítico",
|
||||
_ => "Info"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
using ScottPlot;
|
||||
using ScottPlot.WPF;
|
||||
|
||||
namespace OperationControl.Models
|
||||
{
|
||||
public class GraficoModel
|
||||
{
|
||||
public GraficoModel(WpfPlot grafico)
|
||||
{
|
||||
Grafico = grafico;
|
||||
}
|
||||
|
||||
private WpfPlot Grafico { get; set; }
|
||||
private bool EmUso { get; set; }
|
||||
private DateTime Tempo_Atual { get; set; }
|
||||
private DateTime? Tempo_Inicial { get; set; }
|
||||
private List<double> Eixo_X { get; set; }
|
||||
private List<List<double>> Eixo_Y { get; set; }
|
||||
private double Limite { get; set; }
|
||||
private List<GraficoParametrosModel> Parametros { get; set; }
|
||||
|
||||
private void InicializarGrafico(List<GraficoParametrosModel> parametros)
|
||||
{
|
||||
Parametros = parametros;
|
||||
|
||||
Grafico.Plot.ShowLegend(Alignment.UpperLeft);
|
||||
Eixo_X = new List<double>();
|
||||
Eixo_Y = new List<List<double>>();
|
||||
Parametros.ForEach(p =>
|
||||
{
|
||||
Eixo_Y.Add(new List<double>());
|
||||
p.Cor = GetNextColor();
|
||||
});
|
||||
Tempo_Inicial = Tempo_Atual;
|
||||
_colorIndex = 0;
|
||||
EmUso = true;
|
||||
}
|
||||
|
||||
public void Atualizar(bool inicial, DateTime? t_atual, List<GraficoParametrosModel> parametros, double limite = 60)
|
||||
{
|
||||
Tempo_Atual = t_atual ?? DateTime.Now;
|
||||
Limite = limite;
|
||||
if (inicial)
|
||||
InicializarGrafico(parametros);
|
||||
Parametros.ForEach(p => p.Atualizar(parametros[Parametros.IndexOf(p)]));
|
||||
AtualizaDadosGrafico();
|
||||
}
|
||||
|
||||
private void AtualizaDadosGrafico()
|
||||
{
|
||||
double tSegundos = (Tempo_Atual - Tempo_Inicial!.Value).TotalSeconds;
|
||||
|
||||
Grafico.Plot.Clear();
|
||||
|
||||
Eixo_X.Add(tSegundos);
|
||||
|
||||
for (int i = 0; i < Parametros.Count; i++)
|
||||
{
|
||||
Eixo_Y[i].Add(Parametros[i].Valor ?? 0);
|
||||
var sc = Grafico.Plot.Add.Scatter(Eixo_X.ToArray(), Eixo_Y[i].ToArray());
|
||||
sc.Label = $"{Parametros[i].Label} {(Parametros[i].Valor ?? 0):0.00} {Parametros[i].Unidade}";
|
||||
sc.Color = Parametros[i].Cor;
|
||||
sc.LineWidth = 2;
|
||||
}
|
||||
|
||||
while (Eixo_X.Count > Limite)
|
||||
{
|
||||
Eixo_X.RemoveAt(0);
|
||||
Eixo_Y.ForEach(x => x.RemoveAt(0));
|
||||
}
|
||||
|
||||
double xEnd = Eixo_X[^1];
|
||||
double xStart = Math.Max(0, xEnd - Limite);
|
||||
Grafico.Plot.Axes.SetLimitsX(xStart, xEnd);
|
||||
|
||||
Grafico.Plot.Axes.AutoScaleY();
|
||||
Grafico.Refresh();
|
||||
}
|
||||
|
||||
public void Limpar(DateTime? t_atual)
|
||||
{
|
||||
if ((t_atual ?? DateTime.Now) > Tempo_Atual && EmUso)
|
||||
{
|
||||
Grafico.Plot.Clear();
|
||||
Grafico.Refresh();
|
||||
EmUso = false;
|
||||
}
|
||||
}
|
||||
|
||||
private int _colorIndex = 0;
|
||||
private ScottPlot.Color GetNextColor()
|
||||
{
|
||||
var palette = ScottPlot.Palette.GetPalettes()[3];
|
||||
var colors = palette.Colors;
|
||||
|
||||
var color = colors[_colorIndex % colors.Length];
|
||||
_colorIndex++;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
public class GraficoParametrosModel
|
||||
{
|
||||
public string Label { get; set; }
|
||||
public string Unidade { get; set; }
|
||||
public double? Valor { get; set; }
|
||||
public ScottPlot.Color Cor { get; set; }
|
||||
|
||||
public void Atualizar(GraficoParametrosModel p)
|
||||
{
|
||||
Label = p.Label;
|
||||
Unidade = p.Unidade;
|
||||
Valor = p.Valor;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -132,6 +132,7 @@ namespace OperationControl.Models
|
|||
{
|
||||
obj.Momento = DateTime.Now;
|
||||
rover.DadosLeitura = obj;
|
||||
rover.UltimoContato = DateTime.Now;
|
||||
}
|
||||
}
|
||||
((App)Application.Current).Shell.Main?.AtualizarDadosTela_Telemetria(device_id);
|
||||
|
|
@ -155,11 +156,13 @@ namespace OperationControl.Models
|
|||
var rover = RoversNaRede.FirstOrDefault(x => x.RoverId == device_id);
|
||||
if (rover != null)
|
||||
{
|
||||
obj.UltimoContato = DateTime.Now;
|
||||
RoversNaRede.Remove(rover);
|
||||
RoversNaRede.Add(obj);
|
||||
}
|
||||
}
|
||||
((App)Application.Current).Shell.Main?.AtualizarDadosTela_ParametrosOperacao(obj.Controle);
|
||||
((App)Application.Current).Shell.Main?.MAP?.CarregarDadosMapa(obj.Mapa, obj.RuasPercorrer);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -198,7 +201,7 @@ namespace OperationControl.Models
|
|||
}
|
||||
foreach (var rover in rovers_atual)
|
||||
{
|
||||
rover.Alive = (DateTime.Now - rover.DadosLeitura.Momento).TotalSeconds < TempoRoverVivo;
|
||||
rover.Alive = (DateTime.Now - rover.UltimoContato).TotalSeconds < TempoRoverVivo;
|
||||
if (!rover.Alive)
|
||||
{
|
||||
//((App)Application.Current).Shell.Main?.MAP?.markers?.UpdateMarkerInfo(rover.RoverId, status: AgroBase.Models.Enums.StatusOperacao.Erro);
|
||||
|
|
@ -206,6 +209,11 @@ namespace OperationControl.Models
|
|||
rover.DadosLeitura.Momento = DateTime.Now;
|
||||
rover.DadosLeitura.StatusOperacao = AgroBase.Models.Enums.StatusOperacao.Erro;
|
||||
((App)Application.Current).Shell.Main?.AtualizarDadosTela_Telemetria(rover.RoverId);
|
||||
((App)Application.Current).Shell.Main?.AdicionarAlerta(rover.RoverId, AgroBase.Models.Enums.T_Code.Ipb, SeveridadeAlerta.Critical, "Perda de comunicação com o equipamento!");
|
||||
}
|
||||
else
|
||||
{
|
||||
((App)Application.Current).Shell.Main?.RemoverAlerta(rover.RoverId, AgroBase.Models.Enums.T_Code.Ipb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,14 @@
|
|||
xmlns:scott="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:vlc="clr-namespace:LibVLCSharp.WPF;assembly=LibVLCSharp.WPF"
|
||||
xmlns:controls="clr-namespace:OperationControl.Controls"
|
||||
xmlns:models="clr-namespace:OperationControl.Models"
|
||||
xmlns:conv="clr-namespace:OperationControl.Converters"
|
||||
mc:Ignorable="d"
|
||||
Title="Controle da Opearação Agrobot" Height="1025" Width="1920" WindowStartupLocation="CenterScreen" WindowState="Maximized">
|
||||
|
||||
<Window.Resources>
|
||||
<conv:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
|
||||
|
||||
<Style x:Key="RoundedLabel" TargetType="Label">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Background" Value="Gray"/>
|
||||
|
|
@ -32,6 +36,34 @@
|
|||
|
||||
<EventSetter Event="MouseLeftButtonDown" Handler="DiagnosticoModulo_Click" />
|
||||
</Style>
|
||||
|
||||
<!-- SCROLLBAR FININHA GENÉRICA -->
|
||||
<Style x:Key="ThinScrollBar" TargetType="ScrollBar">
|
||||
<Setter Property="Height" Value="6"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ScrollBar">
|
||||
<Grid Background="Transparent">
|
||||
<Track x:Name="PART_Track"
|
||||
Height="6">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.LineLeftCommand" Visibility="Collapsed" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.LineRightCommand" Visibility="Collapsed" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Height="6" Background="#4B5563" Margin="0" BorderThickness="0"/>
|
||||
<!--CornerRadius="3"-->
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</Window.Resources>
|
||||
|
||||
<Grid>
|
||||
|
|
@ -132,7 +164,7 @@
|
|||
</Canvas>
|
||||
</Border>
|
||||
|
||||
<Border x:Name="brdStatusModulo" BorderBrush="Black" BorderThickness="1" CornerRadius="8" Margin="10,641,1460,32">
|
||||
<Border x:Name="brdStatusModulo" BorderBrush="Black" BorderThickness="1" CornerRadius="8" Margin="10,641,1460,85">
|
||||
<Canvas>
|
||||
<Label Content="Saúde" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="10" Canvas.Top="-5" FontWeight="Bold"/>
|
||||
<Label x:Name="lblSaude_Descricao" Content="Módulo" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="9" Canvas.Left="35" Canvas.Top="4"/>
|
||||
|
|
@ -142,16 +174,16 @@
|
|||
<Label x:Name="lblSaude_Latencia" Content="Latência 0 ms" HorizontalAlignment="Left" VerticalAlignment="Center" Canvas.Left="372" FontSize="9" Canvas.Top="4"/>
|
||||
<TextBlock x:Name="lblSaude_Impedimento" Text="Impedimento: Nenhum" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="9" Canvas.Top="24" TextWrapping="Wrap" Width="428" Canvas.Left="10"/>
|
||||
|
||||
<CheckBox x:Name="chbSaude_Mandatorio" Content="Mandatório" Canvas.Left="5" Canvas.Top="75" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top" ToolTip="Define se o módulo é obrigatório para que a operação em andamento seja liberada"/>
|
||||
<CheckBox x:Name="chbSaude_EmUso" Content="Em Uso" Canvas.Left="82" Canvas.Top="75" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="10" ToolTip="Define se o módulo deve ser usado durante a operação em andamento"/>
|
||||
<Button x:Name="btnSaude_Salvar" Content="Salvar" Canvas.Left="155" Canvas.Top="74" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top" Width="38" ToolTip="Salva os ajustes realizados nos parametros do módulo" Click="btnSaude_Salvar_Click"/>
|
||||
<CheckBox x:Name="chbSaude_Mandatorio" Content="Mandatório" Canvas.Left="5" Canvas.Top="55" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top" ToolTip="Define se o módulo é obrigatório para que a operação em andamento seja liberada"/>
|
||||
<CheckBox x:Name="chbSaude_EmUso" Content="Em Uso" Canvas.Left="82" Canvas.Top="55" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="10" ToolTip="Define se o módulo deve ser usado durante a operação em andamento"/>
|
||||
<Button x:Name="btnSaude_Salvar" Content="Salvar" Canvas.Left="155" Canvas.Top="54" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top" Width="38" ToolTip="Salva os ajustes realizados nos parametros do módulo" Click="btnSaude_Salvar_Click"/>
|
||||
|
||||
<Border HorizontalAlignment="Center" BorderBrush="Black" BorderThickness="1" Height="230" Width="438" VerticalAlignment="Top" Canvas.Left="5" Canvas.Top="94">
|
||||
<Border HorizontalAlignment="Center" BorderBrush="Black" BorderThickness="1" Height="204" Width="438" VerticalAlignment="Top" Canvas.Left="5" Canvas.Top="75">
|
||||
<TabControl x:Name="tab_Saude">
|
||||
|
||||
<TabItem x:Name="tabSaude_CondicoesOperacionais" Header="Condições Operacionais">
|
||||
<Canvas>
|
||||
<ListBox x:Name="lstSaude_CondicoesOperacionais" Height="200" Width="430" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="9"/>
|
||||
<ListBox x:Name="lstSaude_CondicoesOperacionais" Height="174" Width="430" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="9"/>
|
||||
</Canvas>
|
||||
</TabItem>
|
||||
|
||||
|
|
@ -179,7 +211,7 @@
|
|||
|
||||
<Label Content="Altura" Height="30"/>
|
||||
|
||||
<Slider x:Name="sldBarra_Altura" Margin="5,0,5,0" Minimum="0" Maximum="90" Orientation="Vertical" ValueChanged="sldBarra_Altura_ValueChanged" Height="83"/>
|
||||
<Slider x:Name="sldBarra_Altura" Margin="5,0,5,0" Minimum="50" Maximum="80" Orientation="Vertical" ValueChanged="sldBarra_Altura_ValueChanged" Height="83"/>
|
||||
|
||||
<Label x:Name="lblBarra_Altura" Content="0,00 cm" Height="30"/>
|
||||
|
||||
|
|
@ -195,7 +227,7 @@
|
|||
<!-- Título / identificação -->
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="Controle"/>
|
||||
|
||||
|
||||
<Button x:Name="btnBico_Ligar" Content="Ligar" Width="80" Margin="0,0,5,0" Click="btnBico_Ligar_Click"/>
|
||||
|
||||
<Button x:Name="btnBico_Desligar" Content="Desligar" Width="80" Margin="0,0,5,0" Click="btnBico_Desligar_Click"/>
|
||||
|
|
@ -538,11 +570,11 @@
|
|||
</Canvas>
|
||||
</Border>
|
||||
|
||||
<Border x:Name="brdMapa" BorderBrush="Black" BorderThickness="1" Margin="465,71,475,63">
|
||||
<Border x:Name="brdMapa" BorderBrush="Black" BorderThickness="1" Margin="465,71,475,116">
|
||||
<Canvas>
|
||||
<controls:MapViewControl x:Name="MAP" MarkerClicked="MAP_MarkerClicked" StreetMapClicked="MAP_StreetMapClicked" MbTilesPath="Data/basemap.mbtiles" Latitude="-22.1726572492617" Longitude="-47.3952163870556" Scale="5000" Height="873" Width="978" />
|
||||
<controls:MapViewControl x:Name="MAP" MarkerClicked="MAP_MarkerClicked" StreetMapClicked="MAP_StreetMapClicked" MbTilesPath="Data/basemap.mbtiles" Latitude="-22.1726572492617" Longitude="-47.3952163870556" Scale="5000" Height="842" Width="978" HorizontalAlignment="Center" VerticalAlignment="Top" />
|
||||
<controls:HeadingIndicator x:Name="HDG" Width="130" Height="130" Canvas.Left="10" Canvas.Top="10" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<controls:AttitudeIndicator x:Name="IMU" Width="160" Height="180" Canvas.Left="10" Canvas.Top="683" CriticalLimit="20" WarningLimit="10" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<controls:AttitudeIndicator x:Name="IMU" Width="160" Height="180" Canvas.Left="10" Canvas.Bottom="10" CriticalLimit="20" WarningLimit="10" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
</Canvas>
|
||||
</Border>
|
||||
|
||||
|
|
@ -552,7 +584,7 @@
|
|||
</Canvas>
|
||||
</Border>
|
||||
|
||||
<Border Name="brdMapaInfo" BorderBrush="Black" BorderThickness="1" Height="26" Width="980" Canvas.Top="878" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="465,951,0,0">
|
||||
<Border Name="brdMapaInfo" BorderBrush="Black" BorderThickness="1" Height="26" Width="980" Canvas.Top="878" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="465,898,0,0">
|
||||
<Canvas>
|
||||
<Label x:Name="lblMapaInfo_Debug" Content="Próximo Ponto: 0 | Parado | Distância próximo ponto: 0,00 m | Distância ponto anterior: 0,00 m | Corredor: Fora | Margem: Não | Disância Esquerda: 0 cm | Distância Direita: 0 cm | Status: Parado" FontSize="9" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Top="1"/>
|
||||
</Canvas>
|
||||
|
|
@ -578,17 +610,146 @@
|
|||
</Canvas>
|
||||
</Border>
|
||||
|
||||
<Border x:Name="brdLidar" BorderBrush="Black" BorderThickness="1" CornerRadius="8" Margin="1453,665,7,32" Background="Black">
|
||||
<Border x:Name="brdLidar" BorderBrush="Black" BorderThickness="1" CornerRadius="8" Margin="1453,654,7,85" Background="Black">
|
||||
<Canvas>
|
||||
<controls:Bbox3DViewer x:Name="BBoxes3D" Height="305" Width="453" HorizontalAlignment="Left" VerticalAlignment="Center" Canvas.Top="2" Canvas.Left="2"/>
|
||||
<controls:Bbox3DViewer x:Name="BBoxes3D" Height="263" Width="453" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Top="2" Canvas.Left="2"/>
|
||||
</Canvas>
|
||||
</Border>
|
||||
|
||||
|
||||
|
||||
<Border x:Name="brdBottom" BorderBrush="Black" BorderThickness="1" Margin="0,982,0,0">
|
||||
<Canvas>
|
||||
</Canvas>
|
||||
<Border x:Name="brdBottom" Height="80" VerticalAlignment="Top" BorderBrush="#222" BorderThickness="1" Background="#11161C" Margin="0,929,0,0">
|
||||
<!-- ajusta conforme teu layout -->
|
||||
<Grid>
|
||||
<!-- Lista de alertas ativos -->
|
||||
<ScrollViewer x:Name="svAlertas" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" CanContentScroll="False" Margin="6,0,6,0">
|
||||
<!-- PreviewMouseLeftButtonDown="svAlertas_PreviewMouseLeftButtonDown" PreviewMouseMove="svAlertas_PreviewMouseMove" PreviewMouseLeftButtonUp="svAlertas_PreviewMouseLeftButtonUp" -->
|
||||
<ScrollViewer.Resources>
|
||||
<Style TargetType="ScrollBar" BasedOn="{StaticResource ThinScrollBar}" />
|
||||
</ScrollViewer.Resources>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding AlertasAtivos}">
|
||||
<!-- painél horizontal -->
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
<!-- template de cada cartão de alerta -->
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:AlertaModel}">
|
||||
<Border Margin="6,4,0,4" Padding="8,4" CornerRadius="6" Cursor="Hand" MouseLeftButtonUp="Alerta_MouseLeftButtonUp">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Background" Value="#1C1F23"/>
|
||||
<Setter Property="BorderBrush" Value="#3A424F"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
|
||||
<!-- Muda a cor conforme severidade -->
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Severidade}" Value="Warning">
|
||||
<Setter Property="BorderBrush" Value="#EFBF2F"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Severidade}" Value="Error">
|
||||
<Setter Property="BorderBrush" Value="#FF5656"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Severidade}" Value="Critical">
|
||||
<Setter Property="BorderBrush" Value="#FF5656"/>
|
||||
<Setter Property="Background" Value="#3A171C"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!-- Ícone / emoji simples -->
|
||||
<TextBlock Text="{Binding Icone}" FontSize="14" Margin="0,0,6,0"/>
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Titulo}" FontWeight="Bold" Foreground="#F5F7FA" FontSize="11"/>
|
||||
|
||||
<TextBlock Text="{Binding Mensagem}" Foreground="#B7C0CC" FontSize="10" TextTrimming="CharacterEllipsis" MaxWidth="260"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- Mensagem quando não tiver alerta nenhum -->
|
||||
<TextBlock Text="Nenhum alerta ativo" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#636C7A" FontSize="11">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding AlertasAtivos.Count}" Value="0">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- TOAST DE ALERTA -->
|
||||
<Border x:Name="brdToastAlerta" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,70,20,0" Padding="10,8" CornerRadius="8" Background="#1C1F23" BorderBrush="#3A424F" BorderThickness="1" Cursor="Hand" Visibility="{Binding ToastAlerta, Converter={StaticResource NullToVisibilityConverter}}" MouseLeftButtonUp="ToastAlerta_MouseLeftButtonUp">
|
||||
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Opacity" Value="0.95"/>
|
||||
|
||||
<!-- muda cor pela severidade -->
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ToastAlerta.Severidade}" Value="Warning">
|
||||
<Setter Property="BorderBrush" Value="#EFBF2F"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ToastAlerta.Severidade}" Value="Error">
|
||||
<Setter Property="BorderBrush" Value="#FF5656"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ToastAlerta.Severidade}" Value="Critical">
|
||||
<Setter Property="BorderBrush" Value="#FF5656"/>
|
||||
<Setter Property="Background" Value="#3A171C"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
<!-- Conteúdo do toast -->
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding ToastAlerta.Icone}"
|
||||
FontSize="16"
|
||||
Margin="0,0,6,0"/>
|
||||
|
||||
<StackPanel>
|
||||
<!-- linha com Rover e título -->
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Background="#2F3B4A"
|
||||
CornerRadius="4"
|
||||
Padding="4,1"
|
||||
Margin="0,0,6,0">
|
||||
<TextBlock Text="{Binding ToastAlerta.Rover_ID}"
|
||||
Foreground="White"
|
||||
FontSize="10"
|
||||
FontWeight="Bold"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Text="{Binding ToastAlerta.Titulo}"
|
||||
FontWeight="Bold"
|
||||
Foreground="#F5F7FA"
|
||||
FontSize="11"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- mensagem -->
|
||||
<TextBlock Text="{Binding ToastAlerta.Mensagem}"
|
||||
Foreground="#B7C0CC"
|
||||
FontSize="10"
|
||||
TextWrapping="Wrap"
|
||||
MaxWidth="320"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System.Windows;
|
||||
|
||||
using ScottPlot;
|
||||
using OperationControl.Controls;
|
||||
using OperationControl.Models;
|
||||
using System.Windows.Controls;
|
||||
|
|
@ -15,28 +14,25 @@ using MessageBox = System.Windows.MessageBox;
|
|||
using Brush = System.Windows.Media.Brush;
|
||||
using Brushes = System.Windows.Media.Brushes;
|
||||
using Label = System.Windows.Controls.Label;
|
||||
using ScottPlot.WPF;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using AgroBase.Models.Operadores;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace OperationControl.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
public partial class MainWindow : Window, INotifyPropertyChanged
|
||||
{
|
||||
// buffers (X = tempo em segundos)
|
||||
private GraficoModel graficoAcompanhamento;
|
||||
|
||||
private LibVLC _libVLC;
|
||||
private MediaPlayer _playerFront;
|
||||
private MediaPlayer _playerWeed;
|
||||
private Media _mediaFront;
|
||||
private Media _mediaWeed;
|
||||
|
||||
private Label _labelModuloSelecionado;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
|
@ -57,6 +53,8 @@ namespace OperationControl.Windows
|
|||
|
||||
graficoAcompanhamento = new GraficoModel(pltSaude_Acompanhamento);
|
||||
|
||||
DataContext = this;
|
||||
|
||||
|
||||
//DataContext = this;
|
||||
|
||||
|
|
@ -85,6 +83,16 @@ namespace OperationControl.Windows
|
|||
Loaded += MainWindow_Loaded;
|
||||
Closed += MainWindow_Closed;
|
||||
|
||||
|
||||
_toastTimer = new DispatcherTimer
|
||||
{
|
||||
Interval = TimeSpan.FromSeconds(6) // tempo do toast na tela
|
||||
};
|
||||
_toastTimer.Tick += (s, e) =>
|
||||
{
|
||||
_toastTimer.Stop();
|
||||
ToastAlerta = null;
|
||||
};
|
||||
}
|
||||
|
||||
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
|
|
@ -217,6 +225,57 @@ namespace OperationControl.Windows
|
|||
MAP.markers.UpdateMarkerInfo(rover_id, status: dados_leitura.StatusOperacao);
|
||||
}
|
||||
|
||||
if (rover != null && dados_leitura?.ModulosSaude != null)
|
||||
{
|
||||
SeveridadeAlerta DeParaStatus(AgroBase.Models.Enums.StatusModulo status, bool mandatorio)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case AgroBase.Models.Enums.StatusModulo.Operante:
|
||||
return SeveridadeAlerta.Info;
|
||||
case AgroBase.Models.Enums.StatusModulo.Alerta:
|
||||
return SeveridadeAlerta.Warning;
|
||||
case AgroBase.Models.Enums.StatusModulo.Falha:
|
||||
return (mandatorio) ? SeveridadeAlerta.Critical : SeveridadeAlerta.Error;
|
||||
case AgroBase.Models.Enums.StatusModulo.Conectado:
|
||||
return (mandatorio) ? SeveridadeAlerta.Warning : SeveridadeAlerta.Info;
|
||||
case AgroBase.Models.Enums.StatusModulo.Desconectado:
|
||||
return (mandatorio) ? SeveridadeAlerta.Critical : SeveridadeAlerta.Error;
|
||||
default:
|
||||
return SeveridadeAlerta.Info;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var mod in dados_leitura.ModulosSaude)
|
||||
{
|
||||
if (mod.saude_individual.Any())
|
||||
{
|
||||
foreach (var ind in mod.saude_individual)
|
||||
{
|
||||
if (ind.status != AgroBase.Models.Enums.StatusModulo.Operante)
|
||||
{
|
||||
AdicionarAlerta(rover.RoverId, mod.modulo, DeParaStatus(ind.status, ind.em_uso), string.Join(", ", ind.motivos), Mod_ID: ind.label);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoverAlerta(rover.RoverId, mod.modulo, Mod_ID: ind.label);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mod.status != AgroBase.Models.Enums.StatusModulo.Operante)
|
||||
{
|
||||
AdicionarAlerta(rover.RoverId, mod.modulo, DeParaStatus(mod.status, rover.ModulosMandatorios?.Any(x => x.Dispositivo == mod.modulo && x.Mandatorio) ?? false), string.Join(", ", mod.motivos));
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoverAlerta(rover.RoverId, mod.modulo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rover_id != VariaveisControleOperacao.SelectedRoverId) return;
|
||||
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
|
|
@ -330,6 +389,9 @@ namespace OperationControl.Windows
|
|||
|
||||
#region DIAGNOSTICOS
|
||||
|
||||
private Label _labelModuloSelecionado;
|
||||
private GraficoModel graficoAcompanhamento;
|
||||
|
||||
private void AtualizarDadosTela_Diagnosticos(AgroBase.Models.Operacoes.OperacaoParametrosModel dados)
|
||||
{
|
||||
lblDiagnosticos_Impedimento.Text = "Impedimento: " + (string.IsNullOrEmpty(dados.DadosLeitura.ErroOperacaoLiberada) ? "Nenhum" : dados.DadosLeitura.ErroOperacaoLiberada.Replace("\n\n", "; "));
|
||||
|
|
@ -950,7 +1012,7 @@ namespace OperationControl.Windows
|
|||
AgroBase.Models.Enums.Sentido sentido_sp = mod?.SentidoSP ?? AgroBase.Models.Enums.Sentido.Parado;
|
||||
AgroBase.Models.Enums.Sentido sentido = mod?.SentidoReal ?? AgroBase.Models.Enums.Sentido.Parado;
|
||||
double angulo_sp = mod?.Angulo_SP ?? 0;
|
||||
double angulo = mod?.Angulo ?? 0;
|
||||
double angulo = mod?.AnguloDriver ?? 0;
|
||||
txtDir_Titulo.Text = $"Direcional {label} - Testes";
|
||||
txtDir_SentidoSP.Text = sentido_sp.ToString();
|
||||
txtDir_Sentido.Text = sentido.ToString();
|
||||
|
|
@ -992,7 +1054,8 @@ namespace OperationControl.Windows
|
|||
|
||||
private void sldBarra_Altura_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
{
|
||||
lblBarra_Altura.Content = $"{Convert.ToInt32(sldBarra_Altura.Value):00} cm";
|
||||
if (lblBarra_Altura != null)
|
||||
lblBarra_Altura.Content = $"{Convert.ToInt32(sldBarra_Altura.Value):00} cm";
|
||||
}
|
||||
|
||||
private void btnBarra_Mover_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -1001,7 +1064,7 @@ namespace OperationControl.Windows
|
|||
if (modulo != AgroBase.Models.Enums.T_Code.Atu && s_code != AgroBase.Models.Enums.S_Code.sMOD)
|
||||
return;
|
||||
|
||||
VariaveisControleOperacao.EnviarComandoAtuador(label, angulo_controle: Convert.ToInt32(sldBarra_Altura.Value));
|
||||
VariaveisControleOperacao.EnviarComandoAtuador(label, altura: Convert.ToInt32(sldBarra_Altura.Value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
@ -1538,19 +1601,23 @@ namespace OperationControl.Windows
|
|||
ATU.ComprimentoBarraCm = AgroBase.Models.VariaveisEquipamento.ComprimentoBarraPulverizadoraCm;
|
||||
ATU.DistanciaEntreBicosCm = AgroBase.Models.VariaveisEquipamento.DistanciaEntreBicosCm;
|
||||
ATU.AlturaBarra = dados?.Controle?.AlturaBarra ?? AgroBase.Models.VariaveisEquipamento.AlturaBarraPulverizadoraCm;
|
||||
ATU.IsBombaOn = dados.Atuador?.LeituraComandoBomba ?? false;
|
||||
ATU.PressaoLinha = dados.Atuador?.PressaoLinha ?? 0;
|
||||
ATU.VazaoInstantanea = dados.Atuador?.VazaoInstantanea ?? 0;
|
||||
ATU.TempoAtuado = (dados.Atuador?.TempoBombaAtuada ?? 0) / 1000.0;
|
||||
ATU.IsBombaOn = dados?.Atuador?.LeituraComandoBomba ?? false;
|
||||
ATU.PressaoLinha = dados?.Atuador?.PressaoLinha ?? 0;
|
||||
ATU.VazaoInstantanea = dados?.Atuador?.VazaoInstantanea ?? 0;
|
||||
ATU.TempoAtuado = (dados?.Atuador?.TempoBombaAtuada ?? 0) / 1000.0;
|
||||
|
||||
if (ATU.QtdBicos != dados.Controle?.BicosAtuados?.Count)
|
||||
double erroLateral = ((dados?.Trajetoria?.DistanciaEsquerda ?? 0) - (dados?.Trajetoria?.DistanciaDireita ?? 0)) / 2.0 * 100.0;
|
||||
ATU.LarguraRuaCm = 100.0;
|
||||
ATU.ErroLateralCm = erroLateral;
|
||||
|
||||
if (ATU.QtdBicos != dados?.Controle?.BicosAtuados?.Count)
|
||||
{
|
||||
ATU.QtdBicos = dados.Controle?.BicosAtuados?.Count ?? AgroBase.Models.VariaveisEquipamento.QuantidadeBicosPulverizadores;
|
||||
ATU.QtdBicos = dados?.Controle?.BicosAtuados?.Count ?? AgroBase.Models.VariaveisEquipamento.QuantidadeBicosPulverizadores;
|
||||
}
|
||||
|
||||
foreach (var bico in ATU.Bicos)
|
||||
{
|
||||
var _bc = dados.Controle?.BicosAtuados?.FirstOrDefault(x => (x.Posicao - 1) == bico.Index);
|
||||
var _bc = dados?.Controle?.BicosAtuados?.FirstOrDefault(x => (x.Posicao - 1) == bico.Index);
|
||||
if (_bc == null) continue;
|
||||
|
||||
bico.OpeningAngle = _bc.AnguloAbertura;
|
||||
|
|
@ -1588,125 +1655,177 @@ namespace OperationControl.Windows
|
|||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region ALERTAS
|
||||
|
||||
public ObservableCollection<AlertaModel> AlertasAtivos { get; } = new();
|
||||
|
||||
private AlertaModel _toastAlerta;
|
||||
public AlertaModel ToastAlerta
|
||||
{
|
||||
get => _toastAlerta;
|
||||
set
|
||||
{
|
||||
if (_toastAlerta == value) return;
|
||||
_toastAlerta = value;
|
||||
OnPropertyChanged(nameof(ToastAlerta));
|
||||
}
|
||||
}
|
||||
|
||||
private readonly DispatcherTimer _toastTimer;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected void OnPropertyChanged(string name) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
||||
|
||||
private System.Windows.Point _scrollDragStartPoint;
|
||||
private double _scrollDragStartOffset;
|
||||
private bool _isDraggingScroll;
|
||||
|
||||
private void svAlertas_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is ScrollViewer sv)
|
||||
{
|
||||
_isDraggingScroll = true;
|
||||
_scrollDragStartPoint = e.GetPosition(sv);
|
||||
_scrollDragStartOffset = sv.HorizontalOffset;
|
||||
sv.CaptureMouse();
|
||||
}
|
||||
}
|
||||
|
||||
private void svAlertas_PreviewMouseMove(object sender, System.Windows.Input.MouseEventArgs e)
|
||||
{
|
||||
if (_isDraggingScroll && sender is ScrollViewer sv && e.LeftButton == MouseButtonState.Pressed)
|
||||
{
|
||||
var currentPoint = e.GetPosition(sv);
|
||||
var deltaX = currentPoint.X - _scrollDragStartPoint.X;
|
||||
|
||||
// Inverte o sinal pra "puxar" pro lado que arrasta
|
||||
sv.ScrollToHorizontalOffset(_scrollDragStartOffset - deltaX);
|
||||
}
|
||||
}
|
||||
|
||||
private void svAlertas_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is ScrollViewer sv)
|
||||
{
|
||||
_isDraggingScroll = false;
|
||||
sv.ReleaseMouseCapture();
|
||||
}
|
||||
}
|
||||
|
||||
public void AdicionarAlerta(string Rover_ID, AgroBase.Models.Enums.T_Code Modulo, SeveridadeAlerta Severidade, string Mensagem, string? Mod_ID = null)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var existente = AlertasAtivos.FirstOrDefault(x => x.Rover_ID == Rover_ID && x.Modulo == Modulo && x.Mod_ID == Mod_ID);
|
||||
if (existente == null)
|
||||
{
|
||||
var alerta = new AlertaModel
|
||||
{
|
||||
Rover_ID = Rover_ID,
|
||||
Severidade = Severidade,
|
||||
Modulo = Modulo,
|
||||
Mod_ID = Mod_ID,
|
||||
Mensagem = Mensagem,
|
||||
Timestamp = DateTime.Now,
|
||||
};
|
||||
AlertasAtivos.Add(alerta);
|
||||
|
||||
// 🔔 dispara o toast para NOVO alerta
|
||||
MostrarToast(alerta);
|
||||
}
|
||||
else
|
||||
{
|
||||
existente.Mensagem = Mensagem;
|
||||
existente.Severidade = Severidade;
|
||||
}
|
||||
}
|
||||
catch (Exception exUi)
|
||||
{
|
||||
Variaveis.MostrarLog($"Erro ao adicionar alerta: {exUi.Message}");
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public void RemoverAlerta(string Rover_ID, AgroBase.Models.Enums.T_Code Modulo, SeveridadeAlerta? Severidade = null, string? Mod_ID = null)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var alerta = AlertasAtivos.FirstOrDefault(x => x.Rover_ID == Rover_ID && x.Modulo == Modulo && x.Mod_ID == Mod_ID && (Severidade != null ? x.Severidade == Severidade : true));
|
||||
if (alerta != null)
|
||||
{
|
||||
AlertasAtivos.Remove(alerta);
|
||||
}
|
||||
}
|
||||
catch (Exception exUi)
|
||||
{
|
||||
Variaveis.MostrarLog($"Erro ao remover alerta: {exUi.Message}");
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private void Alerta_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is Border border && border.DataContext is AlertaModel alerta)
|
||||
{
|
||||
var nome = $"lblDiagnosticos_{alerta.Modulo.ToString().ToUpper()}" + ((!string.IsNullOrEmpty(alerta.Mod_ID) && alerta.Mod_ID != AgroBase.Models.Enums.S_Code.sMOD.ToString()) ? $"_{alerta.Mod_ID}" : "");
|
||||
var nome_mod = $"lblDiagnosticos_{alerta.Modulo.ToString().ToUpper()}";
|
||||
var label = this.FindName(nome) as Label;
|
||||
if (label == null) label = this.FindName(nome_mod) as Label;
|
||||
if (label != null)
|
||||
{
|
||||
if (alerta.Rover_ID != VariaveisControleOperacao.SelectedRoverId)
|
||||
{
|
||||
int idx = cmbDispositivo.Items.IndexOf(alerta.Rover_ID);
|
||||
cmbDispositivo.SelectedIndex = idx;
|
||||
}
|
||||
DiagnosticoModulo_Click(label, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void MostrarToast(AlertaModel alerta)
|
||||
{
|
||||
ToastAlerta = alerta;
|
||||
_toastTimer.Stop();
|
||||
_toastTimer.Start();
|
||||
}
|
||||
|
||||
private void ToastAlerta_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var alerta = ToastAlerta;
|
||||
if (alerta == null)
|
||||
return;
|
||||
|
||||
_toastTimer.Stop();
|
||||
ToastAlerta = null;
|
||||
|
||||
var nome = $"lblDiagnosticos_{alerta.Modulo.ToString().ToUpper()}" + ((!string.IsNullOrEmpty(alerta.Mod_ID) && alerta.Mod_ID != AgroBase.Models.Enums.S_Code.sMOD.ToString()) ? $"_{alerta.Mod_ID}" : "");
|
||||
var nome_mod = $"lblDiagnosticos_{alerta.Modulo.ToString().ToUpper()}";
|
||||
var label = this.FindName(nome) as Label;
|
||||
if (label == null) label = this.FindName(nome_mod) as Label;
|
||||
if (label != null)
|
||||
{
|
||||
if (alerta.Rover_ID != VariaveisControleOperacao.SelectedRoverId)
|
||||
{
|
||||
int idx = cmbDispositivo.Items.IndexOf(alerta.Rover_ID);
|
||||
cmbDispositivo.SelectedIndex = idx;
|
||||
}
|
||||
DiagnosticoModulo_Click(label, e);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
public class GraficoModel
|
||||
{
|
||||
public GraficoModel(WpfPlot grafico)
|
||||
{
|
||||
Grafico = grafico;
|
||||
}
|
||||
|
||||
private WpfPlot Grafico { get; set; }
|
||||
private bool EmUso { get; set; }
|
||||
private DateTime Tempo_Atual { get; set; }
|
||||
private DateTime? Tempo_Inicial { get; set; }
|
||||
private List<double> Eixo_X { get; set; }
|
||||
private List<List<double>> Eixo_Y { get; set; }
|
||||
private double Limite { get; set; }
|
||||
private List<GraficoParametrosModel> Parametros { get; set; }
|
||||
|
||||
private void InicializarGrafico(List<GraficoParametrosModel> parametros)
|
||||
{
|
||||
Parametros = parametros;
|
||||
|
||||
Grafico.Plot.ShowLegend(Alignment.UpperLeft);
|
||||
Eixo_X = new List<double>();
|
||||
Eixo_Y = new List<List<double>>();
|
||||
Parametros.ForEach(p =>
|
||||
{
|
||||
Eixo_Y.Add(new List<double>());
|
||||
p.Cor = GetNextColor();
|
||||
});
|
||||
Tempo_Inicial = Tempo_Atual;
|
||||
_colorIndex = 0;
|
||||
EmUso = true;
|
||||
}
|
||||
|
||||
public void Atualizar(bool inicial, DateTime? t_atual, List<GraficoParametrosModel> parametros, double limite = 60)
|
||||
{
|
||||
Tempo_Atual = t_atual ?? DateTime.Now;
|
||||
Limite = limite;
|
||||
if (inicial)
|
||||
InicializarGrafico(parametros);
|
||||
Parametros.ForEach(p => p.Atualizar(parametros[Parametros.IndexOf(p)]));
|
||||
AtualizaDadosGrafico();
|
||||
}
|
||||
|
||||
private void AtualizaDadosGrafico()
|
||||
{
|
||||
double tSegundos = (Tempo_Atual - Tempo_Inicial!.Value).TotalSeconds;
|
||||
|
||||
Grafico.Plot.Clear();
|
||||
|
||||
Eixo_X.Add(tSegundos);
|
||||
|
||||
for (int i = 0; i < Parametros.Count; i++)
|
||||
{
|
||||
Eixo_Y[i].Add(Parametros[i].Valor ?? 0);
|
||||
var sc = Grafico.Plot.Add.Scatter(Eixo_X.ToArray(), Eixo_Y[i].ToArray());
|
||||
sc.Label = $"{Parametros[i].Label} {(Parametros[i].Valor ?? 0):0.00} {Parametros[i].Unidade}";
|
||||
sc.Color = Parametros[i].Cor;
|
||||
sc.LineWidth = 2;
|
||||
}
|
||||
|
||||
while (Eixo_X.Count > Limite)
|
||||
{
|
||||
Eixo_X.RemoveAt(0);
|
||||
Eixo_Y.ForEach(x => x.RemoveAt(0));
|
||||
}
|
||||
|
||||
double xEnd = Eixo_X[^1];
|
||||
double xStart = Math.Max(0, xEnd - Limite);
|
||||
Grafico.Plot.Axes.SetLimitsX(xStart, xEnd);
|
||||
|
||||
Grafico.Plot.Axes.AutoScaleY();
|
||||
Grafico.Refresh();
|
||||
}
|
||||
|
||||
public void Limpar(DateTime? t_atual)
|
||||
{
|
||||
if ((t_atual ?? DateTime.Now) > Tempo_Atual && EmUso)
|
||||
{
|
||||
Grafico.Plot.Clear();
|
||||
Grafico.Refresh();
|
||||
EmUso = false;
|
||||
}
|
||||
}
|
||||
|
||||
private int _colorIndex = 0;
|
||||
private ScottPlot.Color GetNextColor()
|
||||
{
|
||||
var palette = ScottPlot.Palette.GetPalettes()[3];
|
||||
var colors = palette.Colors;
|
||||
|
||||
var color = colors[_colorIndex % colors.Length];
|
||||
_colorIndex++;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
public class GraficoParametrosModel
|
||||
{
|
||||
public string Label { get; set; }
|
||||
public string Unidade { get; set; }
|
||||
public double? Valor { get; set; }
|
||||
public ScottPlot.Color Cor { get; set; }
|
||||
|
||||
public void Atualizar(GraficoParametrosModel p)
|
||||
{
|
||||
Label = p.Label;
|
||||
Unidade = p.Unidade;
|
||||
Valor = p.Valor;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
BIN
AgroBase/OperationControl/bin/Debug/net8.0-windows7.0/OperationControl.dll (Stored with Git LFS)
BIN
AgroBase/OperationControl/bin/Debug/net8.0-windows7.0/OperationControl.dll (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -94,7 +94,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/attitudeindicator.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/attitudeindicator.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\AttitudeIndicator.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/bbox3dviewer.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/bbox3dviewer.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\Bbox3DViewer.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/gstvideoview.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/gstvideoview.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\GstVideoView.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/headingindicator.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/headingindicator.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\HeadingIndicator.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/labeledbar.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/labeledbar.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\LabeledBar.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
#pragma checksum "..\..\..\..\Controls\ManualControlPad.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "45D166CF9D8548740F135E2643613360D10EFB00"
|
||||
#pragma checksum "..\..\..\..\Controls\ManualControlPad.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBBBFC9B3BD438E845FAFDF6B05A8925CB23F643"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#pragma checksum "..\..\..\..\Controls\ManualControlPad.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "45D166CF9D8548740F135E2643613360D10EFB00"
|
||||
#pragma checksum "..\..\..\..\Controls\ManualControlPad.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBBBFC9B3BD438E845FAFDF6B05A8925CB23F643"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
|
@ -142,7 +142,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/manualcontrolpad.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/manualcontrolpad.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\ManualControlPad.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/mapviewcontrol.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/mapviewcontrol.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\MapViewControl.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/progressbartext.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/progressbartext.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\ProgressBarText.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ namespace OperationControl.Controls.Pulverizador {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/pulverizador/bicolequeindicator.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/pulverizador/bicolequeindicator.xam" +
|
||||
"l", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\..\Controls\Pulverizador\BicoLequeIndicator.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
#pragma checksum "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C4A48F534F5D7A53A41F2E3B5092091C33C861F6"
|
||||
#pragma checksum "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "604D2EAAA60BFA58448E360FBF7AF9D6D036362A"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
|
@ -43,7 +43,7 @@ namespace OperationControl.Controls {
|
|||
public partial class PulverizadorIndicator : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 62 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
#line 64 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Canvas canvasPai;
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ namespace OperationControl.Controls {
|
|||
#line hidden
|
||||
|
||||
|
||||
#line 68 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
#line 70 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Line linhaBarra;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#pragma checksum "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C4A48F534F5D7A53A41F2E3B5092091C33C861F6"
|
||||
#pragma checksum "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "604D2EAAA60BFA58448E360FBF7AF9D6D036362A"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
|
@ -43,7 +43,7 @@ namespace OperationControl.Controls {
|
|||
public partial class PulverizadorIndicator : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 62 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
#line 64 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Canvas canvasPai;
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ namespace OperationControl.Controls {
|
|||
#line hidden
|
||||
|
||||
|
||||
#line 68 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
#line 70 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Line linhaBarra;
|
||||
|
||||
|
|
@ -70,7 +70,8 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/pulverizador/pulverizadorindicator.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/pulverizador/pulverizadorindicator." +
|
||||
"xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\..\Controls\Pulverizador\PulverizadorIndicator.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/riskmeter.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/riskmeter.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\RiskMeter.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace OperationControl.Controls {
|
|||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;component/controls/temperatureindicator.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/OperationControl;V1.0.0.0;component/controls/temperatureindicator.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Controls\TemperatureIndicator.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ using System.Reflection;
|
|||
[assembly: System.Reflection.AssemblyCompanyAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+170f3c515683341e5062615888e8b08e6dd70bbf")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
ee269d5abc0f80bb639ff70f345f4aaa91038fc433827d6a87d3f4de82d3e68a
|
||||
7f7e3e3330835a9e331ff8ae9e65bce6b076d907a4ff29ab3f8d822addcfdc36
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
818ef7ce0ed74503ace8ecc78cee6c9069d7c1114e1c47addeef80ec09218213
|
||||
8dc3bc2a7e46ebc3a4ccda87f7e658d27188b6ee79c229774cc95514600ddf60
|
||||
|
|
|
|||
BIN
AgroBase/OperationControl/obj/Debug/net8.0-windows7.0/OperationControl.dll (Stored with Git LFS)
BIN
AgroBase/OperationControl/obj/Debug/net8.0-windows7.0/OperationControl.dll (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,25 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9fe42b1f3e0be8a0b5d1b13daa0cc7d43113865f")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
2007709494792a57c79b1e36c36bcd20f1fc4dedeed0161aabf58c51a9c3f231
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
is_global = true
|
||||
build_property.ApplicationManifest =
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.TargetFramework = net8.0-windows7.0
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = OperationControl_05gxr5jh_wpftmp
|
||||
build_property.ProjectDir = C:\ZendionInc\agrobot_base\AgroBase\OperationControl\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.Drawing;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
global using global::System.Windows.Forms;
|
||||
Binary file not shown.
|
|
@ -0,0 +1,25 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9fe42b1f3e0be8a0b5d1b13daa0cc7d43113865f")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
2007709494792a57c79b1e36c36bcd20f1fc4dedeed0161aabf58c51a9c3f231
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
is_global = true
|
||||
build_property.ApplicationManifest =
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.TargetFramework = net8.0-windows7.0
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = OperationControl_1tt413s1_wpftmp
|
||||
build_property.ProjectDir = C:\ZendionInc\agrobot_base\AgroBase\OperationControl\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.Drawing;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
global using global::System.Windows.Forms;
|
||||
Binary file not shown.
|
|
@ -0,0 +1,25 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9fe42b1f3e0be8a0b5d1b13daa0cc7d43113865f")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
2007709494792a57c79b1e36c36bcd20f1fc4dedeed0161aabf58c51a9c3f231
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
is_global = true
|
||||
build_property.ApplicationManifest =
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.TargetFramework = net8.0-windows7.0
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = OperationControl_2m1r4krm_wpftmp
|
||||
build_property.ProjectDir = C:\ZendionInc\agrobot_base\AgroBase\OperationControl\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.Drawing;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
global using global::System.Windows.Forms;
|
||||
Binary file not shown.
|
|
@ -0,0 +1,25 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9fe42b1f3e0be8a0b5d1b13daa0cc7d43113865f")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
2007709494792a57c79b1e36c36bcd20f1fc4dedeed0161aabf58c51a9c3f231
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
is_global = true
|
||||
build_property.ApplicationManifest =
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.TargetFramework = net8.0-windows7.0
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = OperationControl_34xk15jk_wpftmp
|
||||
build_property.ProjectDir = C:\ZendionInc\agrobot_base\AgroBase\OperationControl\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.Drawing;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
global using global::System.Windows.Forms;
|
||||
Binary file not shown.
|
|
@ -0,0 +1,25 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9fe42b1f3e0be8a0b5d1b13daa0cc7d43113865f")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OperationControl")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
2007709494792a57c79b1e36c36bcd20f1fc4dedeed0161aabf58c51a9c3f231
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
is_global = true
|
||||
build_property.ApplicationManifest =
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.TargetFramework = net8.0-windows7.0
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = OperationControl_3fnjhohy_wpftmp
|
||||
build_property.ProjectDir = C:\ZendionInc\agrobot_base\AgroBase\OperationControl\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue