diff --git a/AgroBase/.vs/AgroBase/DesignTimeBuild/.dtbcache.v2 b/AgroBase/.vs/AgroBase/DesignTimeBuild/.dtbcache.v2 index 8a62a1c55..333480383 100644 Binary files a/AgroBase/.vs/AgroBase/DesignTimeBuild/.dtbcache.v2 and b/AgroBase/.vs/AgroBase/DesignTimeBuild/.dtbcache.v2 differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/0185b50a-ecdd-45fc-9448-bbb82daa56e8.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/0185b50a-ecdd-45fc-9448-bbb82daa56e8.vsidx new file mode 100644 index 000000000..eb33e6024 Binary files /dev/null and b/AgroBase/.vs/AgroBase/FileContentIndex/0185b50a-ecdd-45fc-9448-bbb82daa56e8.vsidx differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/23e292a5-f075-425d-8cb1-9fa492c98034.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/23e292a5-f075-425d-8cb1-9fa492c98034.vsidx new file mode 100644 index 000000000..f99f68e90 Binary files /dev/null and b/AgroBase/.vs/AgroBase/FileContentIndex/23e292a5-f075-425d-8cb1-9fa492c98034.vsidx differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/335b1589-1799-49a3-9601-458237ec50e6.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/335b1589-1799-49a3-9601-458237ec50e6.vsidx deleted file mode 100644 index 5c011cfdd..000000000 Binary files a/AgroBase/.vs/AgroBase/FileContentIndex/335b1589-1799-49a3-9601-458237ec50e6.vsidx and /dev/null differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/666c2841-7753-4061-81bd-3a040ea4205c.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/666c2841-7753-4061-81bd-3a040ea4205c.vsidx deleted file mode 100644 index aa62e7510..000000000 Binary files a/AgroBase/.vs/AgroBase/FileContentIndex/666c2841-7753-4061-81bd-3a040ea4205c.vsidx and /dev/null differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/7334dd0f-4586-43c2-9e66-5fe9ff15b81f.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/7334dd0f-4586-43c2-9e66-5fe9ff15b81f.vsidx deleted file mode 100644 index 806b16d3f..000000000 Binary files a/AgroBase/.vs/AgroBase/FileContentIndex/7334dd0f-4586-43c2-9e66-5fe9ff15b81f.vsidx and /dev/null differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/9b442054-6a53-4348-a8fd-e5706433ec21.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/9b442054-6a53-4348-a8fd-e5706433ec21.vsidx deleted file mode 100644 index 2db74d545..000000000 Binary files a/AgroBase/.vs/AgroBase/FileContentIndex/9b442054-6a53-4348-a8fd-e5706433ec21.vsidx and /dev/null differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/9b4fc27d-596d-4711-83f2-b5ae5d13bef8.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/9b4fc27d-596d-4711-83f2-b5ae5d13bef8.vsidx new file mode 100644 index 000000000..f8bc8bd34 Binary files /dev/null and b/AgroBase/.vs/AgroBase/FileContentIndex/9b4fc27d-596d-4711-83f2-b5ae5d13bef8.vsidx differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/afc3a5d7-dd85-4420-990e-9765d92f7791.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/afc3a5d7-dd85-4420-990e-9765d92f7791.vsidx new file mode 100644 index 000000000..af0ffcd14 Binary files /dev/null and b/AgroBase/.vs/AgroBase/FileContentIndex/afc3a5d7-dd85-4420-990e-9765d92f7791.vsidx differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/b24ff3d4-d68d-455e-a79e-be0f102bba45.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/b24ff3d4-d68d-455e-a79e-be0f102bba45.vsidx deleted file mode 100644 index 5371f6287..000000000 Binary files a/AgroBase/.vs/AgroBase/FileContentIndex/b24ff3d4-d68d-455e-a79e-be0f102bba45.vsidx and /dev/null differ diff --git a/AgroBase/.vs/AgroBase/FileContentIndex/e42a2878-5057-4cf0-bba3-37900fcb4880.vsidx b/AgroBase/.vs/AgroBase/FileContentIndex/e42a2878-5057-4cf0-bba3-37900fcb4880.vsidx new file mode 100644 index 000000000..7c11a1164 Binary files /dev/null and b/AgroBase/.vs/AgroBase/FileContentIndex/e42a2878-5057-4cf0-bba3-37900fcb4880.vsidx differ diff --git a/AgroBase/.vs/AgroBase/v17/.futdcache.v2 b/AgroBase/.vs/AgroBase/v17/.futdcache.v2 index c07d7bd51..8e87fe0bd 100644 Binary files a/AgroBase/.vs/AgroBase/v17/.futdcache.v2 and b/AgroBase/.vs/AgroBase/v17/.futdcache.v2 differ diff --git a/AgroBase/.vs/AgroBase/v17/.suo b/AgroBase/.vs/AgroBase/v17/.suo index efa39b5a4..9be8c4e0e 100644 Binary files a/AgroBase/.vs/AgroBase/v17/.suo and b/AgroBase/.vs/AgroBase/v17/.suo differ diff --git a/AgroBase/.vs/AgroBase/v17/Browse.VC.db b/AgroBase/.vs/AgroBase/v17/Browse.VC.db index 334b2ee08..330196262 100644 Binary files a/AgroBase/.vs/AgroBase/v17/Browse.VC.db and b/AgroBase/.vs/AgroBase/v17/Browse.VC.db differ diff --git a/AgroBase/.vs/AgroBase/v17/fileList.bin b/AgroBase/.vs/AgroBase/v17/fileList.bin index b1dd7a901..a5c88474d 100644 Binary files a/AgroBase/.vs/AgroBase/v17/fileList.bin and b/AgroBase/.vs/AgroBase/v17/fileList.bin differ diff --git a/AgroBase/.vs/ProjectEvaluation/agrobase.metadata.v7.bin b/AgroBase/.vs/ProjectEvaluation/agrobase.metadata.v7.bin index a5e91f37d..e8e834fd2 100644 Binary files a/AgroBase/.vs/ProjectEvaluation/agrobase.metadata.v7.bin and b/AgroBase/.vs/ProjectEvaluation/agrobase.metadata.v7.bin differ diff --git a/AgroBase/.vs/ProjectEvaluation/agrobase.projects.v7.bin b/AgroBase/.vs/ProjectEvaluation/agrobase.projects.v7.bin index 74193ac12..be7384026 100644 Binary files a/AgroBase/.vs/ProjectEvaluation/agrobase.projects.v7.bin and b/AgroBase/.vs/ProjectEvaluation/agrobase.projects.v7.bin differ diff --git a/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.Designer.cs b/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.Designer.cs index 08272f7a7..8258947f7 100644 --- a/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.Designer.cs +++ b/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.Designer.cs @@ -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; } } \ No newline at end of file diff --git a/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.cs b/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.cs index c743fca5d..0dcea3d6e 100644 --- a/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.cs +++ b/AgroBase/AgroBase/Forms/Direcional/frmDirConfig.cs @@ -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(gpbSentido, "nud" + Modulo.Modulo_ID + "Offset"); nudOffset.Value = Convert.ToInt32(Modulo.DirMotor.FolgaMecanica); + + TextBox txtOffsetAngulo = FuncoesGlobais.FindControlRecursive(gpbSentido, "txt" + Modulo.Modulo_ID + "OffsetAngulo"); + txtOffsetAngulo.Text = Modulo.DirMotor.OffsetAnguloReal.ToString(); } } @@ -118,6 +114,9 @@ namespace AgroBase.Forms.Direcional NumericUpDown nudOffset = FuncoesGlobais.FindControlRecursive(gpbSentido, "nud" + Modulo.Modulo_ID + "Offset"); Modulo.DirMotor.FolgaMecanica = Convert.ToDouble(nudOffset.Value); + + TextBox txtOffsetAngulo = FuncoesGlobais.FindControlRecursive(gpbSentido, "txt" + Modulo.Modulo_ID + "OffsetAngulo"); + Modulo.DirMotor.OffsetAnguloReal = Convert.ToDouble(txtOffsetAngulo.Text); } } diff --git a/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs b/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs index 0c91f0b67..5b561502a 100644 --- a/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs +++ b/AgroBase/AgroBase/Forms/IHM/frmDiagnosticos.cs @@ -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; } diff --git a/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs b/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs index dfa10682b..581ea3fc6 100644 --- a/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs +++ b/AgroBase/AgroBase/Forms/Operacoes/frmOperacaoManual.cs @@ -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