Criado interface para modo de operacao manual
This commit is contained in:
parent
989f552802
commit
049b6fe717
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.
|
|
@ -3,28 +3,24 @@
|
|||
"WorkspaceRootPath": "C:\\ZendionINC\\agrobot_base\\AgroBase\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|c:\\zendioninc\\agrobot_base\\agrobase\\agrobase\\models\\modules\\atuadormodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\modules\\atuadormodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|c:\\zendioninc\\agrobot_base\\agrobase\\agrobase\\forms\\operacoes\\frmoperacaomanual.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\operacoes\\frmoperacaomanual.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\atuador\\frmatucalibragem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\atuador\\frmatucalibragem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|c:\\zendioninc\\agrobot_base\\agrobase\\agrobase\\forms\\operacoes\\frmoperacaomanual.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\operacoes\\frmoperacaomanual.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\atuador\\frmatucalibragem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\atuador\\frmatucalibragem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\frmprincipal.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\frmprincipal.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\operacoes\\frmoperacaomapagps.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|c:\\zendioninc\\agrobot_base\\agrobase\\agrobase\\forms\\operacoes\\frmoperacaomapagps.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\operacoes\\frmoperacaomapagps.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\frmprincipal.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\frmprincipal.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\operacoes\\frmoperacaomapagps.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\operacoes\\frmoperacaomapagps.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\models\\operacoes\\operacaomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\operacoes\\operacaomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
|
|
@ -36,76 +32,68 @@
|
|||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 2,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "frmAtuCalibragem.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs",
|
||||
"ViewState": "AQIAAJ8AAAAAAAAAAAAswCMBAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-03-26T19:38:16.149Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "frmAtuCalibragem.cs [Design]",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs [Design]",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Atuador\\frmAtuCalibragem.cs [Design]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-03-26T19:26:25.571Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "AtuadorModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Modules\\AtuadorModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\Modules\\AtuadorModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Modules\\AtuadorModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\Modules\\AtuadorModel.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAACAAAAAIAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-03-26T12:45:51.9Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "frmPrincipal.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmPrincipal.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\frmPrincipal.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmPrincipal.cs",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\frmPrincipal.cs",
|
||||
"ViewState": "AQIAACoAAAAAAAAAAADwv4AAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-03-25T19:55:51.951Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "frmPrincipal.cs [Design]",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmPrincipal.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\frmPrincipal.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmPrincipal.cs [Design]",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\frmPrincipal.cs [Design]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-03-25T19:55:44.547Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "frmOperacaoMapaGPS.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs",
|
||||
"ViewState": "AQIAAF8BAAAAAAAAAAAwwGcBAAB1AAAA",
|
||||
"ViewState": "AQIAAE8BAAAAAAAAAAAuwGUBAAAMAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-03-20T13:42:47.8Z"
|
||||
"WhenOpened": "2024-04-02T18:31:03.966Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "frmOperacaoManual.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs",
|
||||
"ViewState": "AQIAAAsAAAAAAAAAAAAIwEwAAAAkAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-02T10:59:16.426Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "frmOperacaoManual.cs [Design]",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs [Design]",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Operacoes\\frmOperacaoManual.cs [Design]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-02T00:33:46.091Z",
|
||||
"EditorCaption": " [Design]"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "frmOperacaoMapaGPS.cs [Design]",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs [Design]",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Operacoes\\frmOperacaoMapaGPS.cs [Design]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-02T00:34:02.185Z",
|
||||
"EditorCaption": " [Design]"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "OperacaoModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"ViewState": "AQIAAGECAAAAAAAAAAAzwAoDAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-01T16:36:28.825Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -264,6 +264,18 @@
|
|||
<Compile Include="Forms\Movimentacao\frmMovPlot.Designer.cs">
|
||||
<DependentUpon>frmMovPlot.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Operacoes\frmInicioOperacao.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Operacoes\frmInicioOperacao.Designer.cs">
|
||||
<DependentUpon>frmInicioOperacao.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Operacoes\frmOperacaoManual.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Operacoes\frmOperacaoManual.Designer.cs">
|
||||
<DependentUpon>frmOperacaoManual.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Operacoes\frmOperacaoMapaGPS.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
|
@ -456,6 +468,12 @@
|
|||
<EmbeddedResource Include="Forms\frmJoystick.resx">
|
||||
<DependentUpon>frmJoystick.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Operacoes\frmInicioOperacao.resx">
|
||||
<DependentUpon>frmInicioOperacao.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Operacoes\frmOperacaoManual.resx">
|
||||
<DependentUpon>frmOperacaoManual.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Operacoes\frmOperacaoMapaGPS.resx">
|
||||
<DependentUpon>frmOperacaoMapaGPS.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
|||
|
|
@ -334,58 +334,5 @@ namespace AgroBase.Forms.Atuador
|
|||
}
|
||||
}
|
||||
|
||||
class CalibragemVazao
|
||||
{
|
||||
public bool Calibrando { get; set; } = false;
|
||||
public double TempoCalibragem { get; set; } = 10000.0;
|
||||
public double VolumeComputado { get; set; } = 0;
|
||||
public List<double> PressoesAferidas { get; set; } = new List<double>();
|
||||
public double MassaInicial { get; set; } = 0.0;
|
||||
public double MassaFinal { get; set; } = 0.0;
|
||||
public int QtdPulsos { get; set; } = 0;
|
||||
public double Periodo { get; set; } = 0.0;
|
||||
public double PressaoMedia
|
||||
{
|
||||
get
|
||||
{
|
||||
return PressoesAferidas.Average();
|
||||
}
|
||||
}
|
||||
public double MassaPerdida
|
||||
{
|
||||
get
|
||||
{
|
||||
return (MassaInicial - MassaFinal) * 1000;
|
||||
}
|
||||
}
|
||||
public double Q
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)VolumeComputado / (double)Periodo;
|
||||
}
|
||||
}
|
||||
public double VolumeCalculado { get; set;} = 0.0;
|
||||
public double d
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)MassaPerdida / (double)VolumeComputado;
|
||||
}
|
||||
}
|
||||
public double x
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)VolumeComputado / (double)QtdPulsos;
|
||||
}
|
||||
}
|
||||
public double Q2
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)x * (double)QtdPulsos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace AgroBase.Forms
|
|||
private void btnIniciar_Click(object sender, EventArgs e)
|
||||
{
|
||||
cameraSolo.camera.IniciarCamera(
|
||||
PythonService.ScriptWeedDetector,
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.ScriptDeteccaoErvas,
|
||||
new string[] {
|
||||
cameraSolo.MaxLeituras.ToString(),
|
||||
cameraSolo.VideoPorta,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
this.lblOperacao = new System.Windows.Forms.Label();
|
||||
this.lblOperacaoStatus = new System.Windows.Forms.Label();
|
||||
this.lblMqtt = new System.Windows.Forms.Label();
|
||||
this.lblD_PZM = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picRobo)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
|
@ -59,7 +60,7 @@
|
|||
this.lblD_Mov.AutoSize = true;
|
||||
this.lblD_Mov.Location = new System.Drawing.Point(457, 40);
|
||||
this.lblD_Mov.Name = "lblD_Mov";
|
||||
this.lblD_Mov.Size = new System.Drawing.Size(133, 24);
|
||||
this.lblD_Mov.Size = new System.Drawing.Size(169, 29);
|
||||
this.lblD_Mov.TabIndex = 2;
|
||||
this.lblD_Mov.Text = "Movimentação";
|
||||
//
|
||||
|
|
@ -68,7 +69,7 @@
|
|||
this.lblD_Dir.AutoSize = true;
|
||||
this.lblD_Dir.Location = new System.Drawing.Point(61, 422);
|
||||
this.lblD_Dir.Name = "lblD_Dir";
|
||||
this.lblD_Dir.Size = new System.Drawing.Size(94, 24);
|
||||
this.lblD_Dir.Size = new System.Drawing.Size(122, 29);
|
||||
this.lblD_Dir.TabIndex = 3;
|
||||
this.lblD_Dir.Text = "Direcional";
|
||||
//
|
||||
|
|
@ -77,7 +78,7 @@
|
|||
this.lblD_Atu.AutoSize = true;
|
||||
this.lblD_Atu.Location = new System.Drawing.Point(435, 645);
|
||||
this.lblD_Atu.Name = "lblD_Atu";
|
||||
this.lblD_Atu.Size = new System.Drawing.Size(76, 24);
|
||||
this.lblD_Atu.Size = new System.Drawing.Size(96, 29);
|
||||
this.lblD_Atu.TabIndex = 4;
|
||||
this.lblD_Atu.Text = "Atuador";
|
||||
//
|
||||
|
|
@ -86,7 +87,7 @@
|
|||
this.lblD_Sen.AutoSize = true;
|
||||
this.lblD_Sen.Location = new System.Drawing.Point(311, 519);
|
||||
this.lblD_Sen.Name = "lblD_Sen";
|
||||
this.lblD_Sen.Size = new System.Drawing.Size(137, 24);
|
||||
this.lblD_Sen.Size = new System.Drawing.Size(176, 29);
|
||||
this.lblD_Sen.TabIndex = 5;
|
||||
this.lblD_Sen.Text = "Sensoriamento";
|
||||
//
|
||||
|
|
@ -95,7 +96,7 @@
|
|||
this.lblD_Gps.AutoSize = true;
|
||||
this.lblD_Gps.Location = new System.Drawing.Point(129, 193);
|
||||
this.lblD_Gps.Name = "lblD_Gps";
|
||||
this.lblD_Gps.Size = new System.Drawing.Size(48, 24);
|
||||
this.lblD_Gps.Size = new System.Drawing.Size(63, 29);
|
||||
this.lblD_Gps.TabIndex = 6;
|
||||
this.lblD_Gps.Text = "GPS";
|
||||
//
|
||||
|
|
@ -125,7 +126,7 @@
|
|||
this.cmbOperacao.FormattingEnabled = true;
|
||||
this.cmbOperacao.Location = new System.Drawing.Point(775, 81);
|
||||
this.cmbOperacao.Name = "cmbOperacao";
|
||||
this.cmbOperacao.Size = new System.Drawing.Size(202, 32);
|
||||
this.cmbOperacao.Size = new System.Drawing.Size(202, 37);
|
||||
this.cmbOperacao.TabIndex = 10;
|
||||
this.cmbOperacao.SelectedIndexChanged += new System.EventHandler(this.cmbOperacao_SelectedIndexChanged);
|
||||
//
|
||||
|
|
@ -134,16 +135,16 @@
|
|||
this.lblOperacao.AutoSize = true;
|
||||
this.lblOperacao.Location = new System.Drawing.Point(771, 45);
|
||||
this.lblOperacao.Name = "lblOperacao";
|
||||
this.lblOperacao.Size = new System.Drawing.Size(175, 24);
|
||||
this.lblOperacao.Size = new System.Drawing.Size(222, 29);
|
||||
this.lblOperacao.TabIndex = 11;
|
||||
this.lblOperacao.Text = "Modo de Operação";
|
||||
//
|
||||
// lblOperacaoStatus
|
||||
//
|
||||
this.lblOperacaoStatus.AutoSize = true;
|
||||
this.lblOperacaoStatus.Location = new System.Drawing.Point(671, 602);
|
||||
this.lblOperacaoStatus.Location = new System.Drawing.Point(651, 602);
|
||||
this.lblOperacaoStatus.Name = "lblOperacaoStatus";
|
||||
this.lblOperacaoStatus.Size = new System.Drawing.Size(287, 24);
|
||||
this.lblOperacaoStatus.Size = new System.Drawing.Size(365, 29);
|
||||
this.lblOperacaoStatus.TabIndex = 12;
|
||||
this.lblOperacaoStatus.Text = "Operação: Manual - Não iniciado";
|
||||
//
|
||||
|
|
@ -154,15 +155,25 @@
|
|||
this.lblMqtt.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblMqtt.Location = new System.Drawing.Point(894, 675);
|
||||
this.lblMqtt.Name = "lblMqtt";
|
||||
this.lblMqtt.Size = new System.Drawing.Size(114, 13);
|
||||
this.lblMqtt.Size = new System.Drawing.Size(147, 17);
|
||||
this.lblMqtt.TabIndex = 13;
|
||||
this.lblMqtt.Text = "MQTT: Desconectado";
|
||||
//
|
||||
// lblD_PZM
|
||||
//
|
||||
this.lblD_PZM.AutoSize = true;
|
||||
this.lblD_PZM.Location = new System.Drawing.Point(356, 306);
|
||||
this.lblD_PZM.Name = "lblD_PZM";
|
||||
this.lblD_PZM.Size = new System.Drawing.Size(79, 29);
|
||||
this.lblD_PZM.TabIndex = 14;
|
||||
this.lblD_PZM.Text = "PZEM";
|
||||
//
|
||||
// frmIHM
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(14F, 29F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1020, 697);
|
||||
this.Controls.Add(this.lblD_PZM);
|
||||
this.Controls.Add(this.lblMqtt);
|
||||
this.Controls.Add(this.lblOperacaoStatus);
|
||||
this.Controls.Add(this.lblOperacao);
|
||||
|
|
@ -202,5 +213,6 @@
|
|||
private System.Windows.Forms.Label lblOperacao;
|
||||
private System.Windows.Forms.Label lblOperacaoStatus;
|
||||
private System.Windows.Forms.Label lblMqtt;
|
||||
private System.Windows.Forms.Label lblD_PZM;
|
||||
}
|
||||
}
|
||||
|
|
@ -70,6 +70,10 @@ namespace AgroBase.Forms.IHM
|
|||
DispositivoConectado = false;
|
||||
}
|
||||
}
|
||||
else if (Modulo.Dispositivo == T_Code.Pzm)
|
||||
{
|
||||
DispositivoConectado = PZEMService.PortaPZEM.IsOpen && PZEMService.Iniciado;
|
||||
}
|
||||
else
|
||||
{
|
||||
IDispositivosService dispositivoService = Variaveis.DispositivosConectados.FirstOrDefault(x => x.Dispositivo == Modulo.Dispositivo && x._Porta.PortName == Modulo.PortaCOM);
|
||||
|
|
@ -98,6 +102,16 @@ namespace AgroBase.Forms.IHM
|
|||
|
||||
lblMqtt.Text = "MQTT: " + (Variaveis.MqttService.StatusConexao() ? "Conectado" : "Desconectado");
|
||||
lblMqtt.ForeColor = Variaveis.MqttService.StatusConexao() ? Color.Green : Color.Red;
|
||||
|
||||
if (
|
||||
Variaveis.OperacaoEmAndamento.DispAtu == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Atu) ||
|
||||
Variaveis.OperacaoEmAndamento.DispDir == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Dir) ||
|
||||
Variaveis.OperacaoEmAndamento.DispMov == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Mov) ||
|
||||
Variaveis.OperacaoEmAndamento.DispSen == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Sen)
|
||||
)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento = OperacaoModel.CarregarParametrosOperacaoPadrao((ModoOperacao)cmbOperacao.SelectedIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -110,18 +124,21 @@ namespace AgroBase.Forms.IHM
|
|||
private void cmbOperacao_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento = OperacaoModel.CarregarParametrosOperacaoPadrao((ModoOperacao)cmbOperacao.SelectedIndex);
|
||||
AtualizarLabelOperacao();
|
||||
}
|
||||
|
||||
private void btnIniciar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.Iniciado)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.FinalizarOperacao();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.ModulosConectados)
|
||||
{
|
||||
/*if (Variaveis.OperacaoEmAndamento.Modo == ModoOperacao.Manual)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.frmOperacao = new frmAcompanhamento();
|
||||
}
|
||||
else if (Variaveis.OperacaoEmAndamento.Modo == ModoOperacao.MapaGPS)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.frmOperacao = new frmOperacaoMapaGPS();
|
||||
}*/
|
||||
Variaveis.OperacaoEmAndamento.frmOperacao = (Form)Activator.CreateInstance(Variaveis.OperacaoEmAndamento.frmOperacao.GetType());
|
||||
Variaveis.OperacaoEmAndamento.frmOperacao.ShowDialog();
|
||||
}
|
||||
|
|
@ -130,10 +147,11 @@ namespace AgroBase.Forms.IHM
|
|||
MessageBox.Show(Variaveis.OperacaoEmAndamento.ErroOperacaoLiberada, "Conexão de módulos pendentes", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
AtualizarLabelOperacao();
|
||||
}
|
||||
|
||||
btnIniciar.Text = Variaveis.OperacaoEmAndamento.Iniciado ? "Finalizar" : "Iniciar";
|
||||
cmbOperacao.Enabled = !Variaveis.OperacaoEmAndamento.Iniciado;
|
||||
private void AtualizarLabelOperacao()
|
||||
{
|
||||
lblOperacaoStatus.Text = "Operação: " + Enum.GetName(typeof(ModoOperacao), Variaveis.OperacaoEmAndamento.Modo) + " " + (Variaveis.OperacaoEmAndamento.Iniciado ? "Iniciado" : "Não iniciado");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
namespace AgroBase.Forms.Operacoes
|
||||
{
|
||||
partial class frmInicioOperacao
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// frmInicioOperacao
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1176, 578);
|
||||
this.Name = "frmInicioOperacao";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Preparando operação...";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
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;
|
||||
|
||||
namespace AgroBase.Forms.Operacoes
|
||||
{
|
||||
public partial class frmInicioOperacao : Form
|
||||
{
|
||||
public frmInicioOperacao()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,550 @@
|
|||
namespace AgroBase.Forms.Operacoes
|
||||
{
|
||||
partial class frmOperacaoManual
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea6 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend6 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
this.pnlCamerasSolo = new System.Windows.Forms.Panel();
|
||||
this.pnlCameraSoloE = new System.Windows.Forms.Panel();
|
||||
this.picCameraSoloE = new System.Windows.Forms.PictureBox();
|
||||
this.pnlCameraSoloD = new System.Windows.Forms.Panel();
|
||||
this.picCameraSoloD = new System.Windows.Forms.PictureBox();
|
||||
this.pnlAtuadores = new System.Windows.Forms.Panel();
|
||||
this.chartGraficos = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.lblDir_EF = new System.Windows.Forms.Label();
|
||||
this.lblDir_DF = new System.Windows.Forms.Label();
|
||||
this.lblDir_DT = new System.Windows.Forms.Label();
|
||||
this.lblDir_ET = new System.Windows.Forms.Label();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabMapa = new System.Windows.Forms.TabPage();
|
||||
this.pnlMapa = new System.Windows.Forms.Panel();
|
||||
this.tabInformacoes = new System.Windows.Forms.TabPage();
|
||||
this.gridDados = new System.Windows.Forms.DataGridView();
|
||||
this.tabDeteccoes = new System.Windows.Forms.TabPage();
|
||||
this.pnlDeteccoesRua = new System.Windows.Forms.Panel();
|
||||
this.pnlAnguloGPS = new System.Windows.Forms.Panel();
|
||||
this.lblGPS = new System.Windows.Forms.Label();
|
||||
this.lblMagnetometro = new System.Windows.Forms.Label();
|
||||
this.pnlAnguloMagnetometro = new System.Windows.Forms.Panel();
|
||||
this.pnlCameraRua = new System.Windows.Forms.Panel();
|
||||
this.picCameraRua = new System.Windows.Forms.PictureBox();
|
||||
this.pnlDir_EF = new System.Windows.Forms.Panel();
|
||||
this.pnlDir_ET = new System.Windows.Forms.Panel();
|
||||
this.pnlDir_DT = new System.Windows.Forms.Panel();
|
||||
this.pnlDir_DF = new System.Windows.Forms.Panel();
|
||||
this.btnIniciarOperacao = new System.Windows.Forms.Button();
|
||||
this.tabPulverizador = new System.Windows.Forms.TabPage();
|
||||
this.btnLigarBomba = new System.Windows.Forms.Button();
|
||||
this.btnDesligarBomba = new System.Windows.Forms.Button();
|
||||
this.nudPressaoSP = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblPressaoSP = new System.Windows.Forms.Label();
|
||||
this.lblDistanciaEsquerda = new System.Windows.Forms.Label();
|
||||
this.lblDistanciaDireita = new System.Windows.Forms.Label();
|
||||
this.pnlCamerasSolo.SuspendLayout();
|
||||
this.pnlCameraSoloE.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picCameraSoloE)).BeginInit();
|
||||
this.pnlCameraSoloD.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picCameraSoloD)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartGraficos)).BeginInit();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabMapa.SuspendLayout();
|
||||
this.tabInformacoes.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridDados)).BeginInit();
|
||||
this.tabDeteccoes.SuspendLayout();
|
||||
this.pnlCameraRua.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picCameraRua)).BeginInit();
|
||||
this.pnlDir_EF.SuspendLayout();
|
||||
this.pnlDir_ET.SuspendLayout();
|
||||
this.pnlDir_DT.SuspendLayout();
|
||||
this.pnlDir_DF.SuspendLayout();
|
||||
this.tabPulverizador.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pnlCamerasSolo
|
||||
//
|
||||
this.pnlCamerasSolo.BackColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.pnlCamerasSolo.Controls.Add(this.pnlCameraSoloE);
|
||||
this.pnlCamerasSolo.Controls.Add(this.pnlCameraSoloD);
|
||||
this.pnlCamerasSolo.Location = new System.Drawing.Point(12, 404);
|
||||
this.pnlCamerasSolo.Name = "pnlCamerasSolo";
|
||||
this.pnlCamerasSolo.Size = new System.Drawing.Size(784, 227);
|
||||
this.pnlCamerasSolo.TabIndex = 0;
|
||||
//
|
||||
// pnlCameraSoloE
|
||||
//
|
||||
this.pnlCameraSoloE.Controls.Add(this.picCameraSoloE);
|
||||
this.pnlCameraSoloE.Location = new System.Drawing.Point(3, 3);
|
||||
this.pnlCameraSoloE.Name = "pnlCameraSoloE";
|
||||
this.pnlCameraSoloE.Size = new System.Drawing.Size(385, 219);
|
||||
this.pnlCameraSoloE.TabIndex = 24;
|
||||
//
|
||||
// picCameraSoloE
|
||||
//
|
||||
this.picCameraSoloE.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.picCameraSoloE.Location = new System.Drawing.Point(0, 0);
|
||||
this.picCameraSoloE.Name = "picCameraSoloE";
|
||||
this.picCameraSoloE.Size = new System.Drawing.Size(385, 219);
|
||||
this.picCameraSoloE.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.picCameraSoloE.TabIndex = 1;
|
||||
this.picCameraSoloE.TabStop = false;
|
||||
//
|
||||
// pnlCameraSoloD
|
||||
//
|
||||
this.pnlCameraSoloD.Controls.Add(this.picCameraSoloD);
|
||||
this.pnlCameraSoloD.Location = new System.Drawing.Point(394, 3);
|
||||
this.pnlCameraSoloD.Name = "pnlCameraSoloD";
|
||||
this.pnlCameraSoloD.Size = new System.Drawing.Size(385, 219);
|
||||
this.pnlCameraSoloD.TabIndex = 23;
|
||||
//
|
||||
// picCameraSoloD
|
||||
//
|
||||
this.picCameraSoloD.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.picCameraSoloD.Location = new System.Drawing.Point(0, 0);
|
||||
this.picCameraSoloD.Name = "picCameraSoloD";
|
||||
this.picCameraSoloD.Size = new System.Drawing.Size(385, 219);
|
||||
this.picCameraSoloD.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.picCameraSoloD.TabIndex = 1;
|
||||
this.picCameraSoloD.TabStop = false;
|
||||
//
|
||||
// pnlAtuadores
|
||||
//
|
||||
this.pnlAtuadores.BackColor = System.Drawing.Color.White;
|
||||
this.pnlAtuadores.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pnlAtuadores.Location = new System.Drawing.Point(12, 637);
|
||||
this.pnlAtuadores.Name = "pnlAtuadores";
|
||||
this.pnlAtuadores.Size = new System.Drawing.Size(784, 155);
|
||||
this.pnlAtuadores.TabIndex = 1;
|
||||
this.pnlAtuadores.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlAtuadores_Paint);
|
||||
//
|
||||
// chartGraficos
|
||||
//
|
||||
chartArea6.Name = "ChartArea1";
|
||||
this.chartGraficos.ChartAreas.Add(chartArea6);
|
||||
legend6.Name = "Legend1";
|
||||
this.chartGraficos.Legends.Add(legend6);
|
||||
this.chartGraficos.Location = new System.Drawing.Point(802, 404);
|
||||
this.chartGraficos.Name = "chartGraficos";
|
||||
series6.ChartArea = "ChartArea1";
|
||||
series6.Legend = "Legend1";
|
||||
series6.Name = "Series1";
|
||||
this.chartGraficos.Series.Add(series6);
|
||||
this.chartGraficos.Size = new System.Drawing.Size(837, 388);
|
||||
this.chartGraficos.TabIndex = 2;
|
||||
this.chartGraficos.Text = "chart1";
|
||||
//
|
||||
// lblDir_EF
|
||||
//
|
||||
this.lblDir_EF.AutoSize = true;
|
||||
this.lblDir_EF.Location = new System.Drawing.Point(1, 1);
|
||||
this.lblDir_EF.Name = "lblDir_EF";
|
||||
this.lblDir_EF.Size = new System.Drawing.Size(53, 16);
|
||||
this.lblDir_EF.TabIndex = 9;
|
||||
this.lblDir_EF.Text = "EF 000º";
|
||||
//
|
||||
// lblDir_DF
|
||||
//
|
||||
this.lblDir_DF.AutoSize = true;
|
||||
this.lblDir_DF.Location = new System.Drawing.Point(3, 1);
|
||||
this.lblDir_DF.Name = "lblDir_DF";
|
||||
this.lblDir_DF.Size = new System.Drawing.Size(54, 16);
|
||||
this.lblDir_DF.TabIndex = 10;
|
||||
this.lblDir_DF.Text = "DF 000º";
|
||||
//
|
||||
// lblDir_DT
|
||||
//
|
||||
this.lblDir_DT.AutoSize = true;
|
||||
this.lblDir_DT.Location = new System.Drawing.Point(3, 183);
|
||||
this.lblDir_DT.Name = "lblDir_DT";
|
||||
this.lblDir_DT.Size = new System.Drawing.Size(55, 16);
|
||||
this.lblDir_DT.TabIndex = 11;
|
||||
this.lblDir_DT.Text = "DT 000º";
|
||||
//
|
||||
// lblDir_ET
|
||||
//
|
||||
this.lblDir_ET.AutoSize = true;
|
||||
this.lblDir_ET.Location = new System.Drawing.Point(1, 183);
|
||||
this.lblDir_ET.Name = "lblDir_ET";
|
||||
this.lblDir_ET.Size = new System.Drawing.Size(54, 16);
|
||||
this.lblDir_ET.TabIndex = 12;
|
||||
this.lblDir_ET.Text = "ET 000º";
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabMapa);
|
||||
this.tabControl1.Controls.Add(this.tabInformacoes);
|
||||
this.tabControl1.Controls.Add(this.tabDeteccoes);
|
||||
this.tabControl1.Controls.Add(this.tabPulverizador);
|
||||
this.tabControl1.Location = new System.Drawing.Point(1011, 12);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(628, 387);
|
||||
this.tabControl1.TabIndex = 17;
|
||||
//
|
||||
// tabMapa
|
||||
//
|
||||
this.tabMapa.Controls.Add(this.pnlMapa);
|
||||
this.tabMapa.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabMapa.Name = "tabMapa";
|
||||
this.tabMapa.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabMapa.Size = new System.Drawing.Size(620, 358);
|
||||
this.tabMapa.TabIndex = 0;
|
||||
this.tabMapa.Text = "Mapa";
|
||||
this.tabMapa.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// pnlMapa
|
||||
//
|
||||
this.pnlMapa.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlMapa.Location = new System.Drawing.Point(3, 3);
|
||||
this.pnlMapa.Name = "pnlMapa";
|
||||
this.pnlMapa.Size = new System.Drawing.Size(614, 352);
|
||||
this.pnlMapa.TabIndex = 0;
|
||||
//
|
||||
// tabInformacoes
|
||||
//
|
||||
this.tabInformacoes.Controls.Add(this.gridDados);
|
||||
this.tabInformacoes.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabInformacoes.Name = "tabInformacoes";
|
||||
this.tabInformacoes.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabInformacoes.Size = new System.Drawing.Size(620, 358);
|
||||
this.tabInformacoes.TabIndex = 1;
|
||||
this.tabInformacoes.Text = "Informações";
|
||||
this.tabInformacoes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// gridDados
|
||||
//
|
||||
this.gridDados.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridDados.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.gridDados.Location = new System.Drawing.Point(3, 3);
|
||||
this.gridDados.Name = "gridDados";
|
||||
this.gridDados.RowHeadersWidth = 51;
|
||||
this.gridDados.RowTemplate.Height = 24;
|
||||
this.gridDados.Size = new System.Drawing.Size(614, 352);
|
||||
this.gridDados.TabIndex = 0;
|
||||
//
|
||||
// tabDeteccoes
|
||||
//
|
||||
this.tabDeteccoes.Controls.Add(this.pnlDeteccoesRua);
|
||||
this.tabDeteccoes.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabDeteccoes.Name = "tabDeteccoes";
|
||||
this.tabDeteccoes.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabDeteccoes.Size = new System.Drawing.Size(620, 358);
|
||||
this.tabDeteccoes.TabIndex = 2;
|
||||
this.tabDeteccoes.Text = "Detecção rua";
|
||||
this.tabDeteccoes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// pnlDeteccoesRua
|
||||
//
|
||||
this.pnlDeteccoesRua.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlDeteccoesRua.Location = new System.Drawing.Point(3, 3);
|
||||
this.pnlDeteccoesRua.Name = "pnlDeteccoesRua";
|
||||
this.pnlDeteccoesRua.Size = new System.Drawing.Size(614, 352);
|
||||
this.pnlDeteccoesRua.TabIndex = 0;
|
||||
//
|
||||
// pnlAnguloGPS
|
||||
//
|
||||
this.pnlAnguloGPS.BackColor = System.Drawing.Color.White;
|
||||
this.pnlAnguloGPS.BackgroundImage = global::AgroBase.Properties.Resources.rosa_dos_ventos;
|
||||
this.pnlAnguloGPS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.pnlAnguloGPS.Location = new System.Drawing.Point(879, 37);
|
||||
this.pnlAnguloGPS.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.pnlAnguloGPS.Name = "pnlAnguloGPS";
|
||||
this.pnlAnguloGPS.Size = new System.Drawing.Size(104, 103);
|
||||
this.pnlAnguloGPS.TabIndex = 18;
|
||||
this.pnlAnguloGPS.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlAnguloGPS_Paint);
|
||||
//
|
||||
// lblGPS
|
||||
//
|
||||
this.lblGPS.AutoSize = true;
|
||||
this.lblGPS.Location = new System.Drawing.Point(876, 18);
|
||||
this.lblGPS.Name = "lblGPS";
|
||||
this.lblGPS.Size = new System.Drawing.Size(35, 16);
|
||||
this.lblGPS.TabIndex = 19;
|
||||
this.lblGPS.Text = "GPS";
|
||||
//
|
||||
// lblMagnetometro
|
||||
//
|
||||
this.lblMagnetometro.AutoSize = true;
|
||||
this.lblMagnetometro.Location = new System.Drawing.Point(876, 165);
|
||||
this.lblMagnetometro.Name = "lblMagnetometro";
|
||||
this.lblMagnetometro.Size = new System.Drawing.Size(94, 16);
|
||||
this.lblMagnetometro.TabIndex = 21;
|
||||
this.lblMagnetometro.Text = "Magnetômetro";
|
||||
//
|
||||
// pnlAnguloMagnetometro
|
||||
//
|
||||
this.pnlAnguloMagnetometro.BackColor = System.Drawing.Color.White;
|
||||
this.pnlAnguloMagnetometro.BackgroundImage = global::AgroBase.Properties.Resources.rosa_dos_ventos;
|
||||
this.pnlAnguloMagnetometro.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.pnlAnguloMagnetometro.Location = new System.Drawing.Point(879, 184);
|
||||
this.pnlAnguloMagnetometro.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.pnlAnguloMagnetometro.Name = "pnlAnguloMagnetometro";
|
||||
this.pnlAnguloMagnetometro.Size = new System.Drawing.Size(104, 103);
|
||||
this.pnlAnguloMagnetometro.TabIndex = 20;
|
||||
this.pnlAnguloMagnetometro.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlAnguloMagnetometro_Paint);
|
||||
//
|
||||
// pnlCameraRua
|
||||
//
|
||||
this.pnlCameraRua.Controls.Add(this.picCameraRua);
|
||||
this.pnlCameraRua.Location = new System.Drawing.Point(186, 28);
|
||||
this.pnlCameraRua.Name = "pnlCameraRua";
|
||||
this.pnlCameraRua.Size = new System.Drawing.Size(476, 369);
|
||||
this.pnlCameraRua.TabIndex = 22;
|
||||
//
|
||||
// picCameraRua
|
||||
//
|
||||
this.picCameraRua.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.picCameraRua.Location = new System.Drawing.Point(0, 0);
|
||||
this.picCameraRua.Name = "picCameraRua";
|
||||
this.picCameraRua.Size = new System.Drawing.Size(476, 369);
|
||||
this.picCameraRua.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.picCameraRua.TabIndex = 0;
|
||||
this.picCameraRua.TabStop = false;
|
||||
//
|
||||
// pnlDir_EF
|
||||
//
|
||||
this.pnlDir_EF.Controls.Add(this.lblDir_EF);
|
||||
this.pnlDir_EF.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlDir_EF.Name = "pnlDir_EF";
|
||||
this.pnlDir_EF.Size = new System.Drawing.Size(200, 200);
|
||||
this.pnlDir_EF.TabIndex = 23;
|
||||
//
|
||||
// pnlDir_ET
|
||||
//
|
||||
this.pnlDir_ET.Controls.Add(this.lblDir_ET);
|
||||
this.pnlDir_ET.Location = new System.Drawing.Point(0, 200);
|
||||
this.pnlDir_ET.Name = "pnlDir_ET";
|
||||
this.pnlDir_ET.Size = new System.Drawing.Size(200, 200);
|
||||
this.pnlDir_ET.TabIndex = 24;
|
||||
//
|
||||
// pnlDir_DT
|
||||
//
|
||||
this.pnlDir_DT.Controls.Add(this.lblDir_DT);
|
||||
this.pnlDir_DT.Location = new System.Drawing.Point(648, 200);
|
||||
this.pnlDir_DT.Name = "pnlDir_DT";
|
||||
this.pnlDir_DT.Size = new System.Drawing.Size(200, 200);
|
||||
this.pnlDir_DT.TabIndex = 24;
|
||||
//
|
||||
// pnlDir_DF
|
||||
//
|
||||
this.pnlDir_DF.Controls.Add(this.lblDir_DF);
|
||||
this.pnlDir_DF.Location = new System.Drawing.Point(648, 0);
|
||||
this.pnlDir_DF.Name = "pnlDir_DF";
|
||||
this.pnlDir_DF.Size = new System.Drawing.Size(200, 200);
|
||||
this.pnlDir_DF.TabIndex = 24;
|
||||
//
|
||||
// btnIniciarOperacao
|
||||
//
|
||||
this.btnIniciarOperacao.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnIniciarOperacao.Location = new System.Drawing.Point(854, 330);
|
||||
this.btnIniciarOperacao.Name = "btnIniciarOperacao";
|
||||
this.btnIniciarOperacao.Size = new System.Drawing.Size(151, 65);
|
||||
this.btnIniciarOperacao.TabIndex = 25;
|
||||
this.btnIniciarOperacao.Text = "Iniciar Operação";
|
||||
this.btnIniciarOperacao.UseVisualStyleBackColor = true;
|
||||
this.btnIniciarOperacao.Click += new System.EventHandler(this.btnIniciarOperacao_Click);
|
||||
//
|
||||
// tabPulverizador
|
||||
//
|
||||
this.tabPulverizador.Controls.Add(this.lblPressaoSP);
|
||||
this.tabPulverizador.Controls.Add(this.nudPressaoSP);
|
||||
this.tabPulverizador.Controls.Add(this.btnDesligarBomba);
|
||||
this.tabPulverizador.Controls.Add(this.btnLigarBomba);
|
||||
this.tabPulverizador.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabPulverizador.Name = "tabPulverizador";
|
||||
this.tabPulverizador.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPulverizador.Size = new System.Drawing.Size(620, 358);
|
||||
this.tabPulverizador.TabIndex = 3;
|
||||
this.tabPulverizador.Text = "Pulverizador";
|
||||
this.tabPulverizador.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnLigarBomba
|
||||
//
|
||||
this.btnLigarBomba.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnLigarBomba.Location = new System.Drawing.Point(158, 21);
|
||||
this.btnLigarBomba.Name = "btnLigarBomba";
|
||||
this.btnLigarBomba.Size = new System.Drawing.Size(139, 34);
|
||||
this.btnLigarBomba.TabIndex = 26;
|
||||
this.btnLigarBomba.Text = "Ligar Bomba";
|
||||
this.btnLigarBomba.UseVisualStyleBackColor = true;
|
||||
this.btnLigarBomba.Click += new System.EventHandler(this.btnLigarBomba_Click);
|
||||
//
|
||||
// btnDesligarBomba
|
||||
//
|
||||
this.btnDesligarBomba.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnDesligarBomba.Location = new System.Drawing.Point(325, 21);
|
||||
this.btnDesligarBomba.Name = "btnDesligarBomba";
|
||||
this.btnDesligarBomba.Size = new System.Drawing.Size(139, 34);
|
||||
this.btnDesligarBomba.TabIndex = 27;
|
||||
this.btnDesligarBomba.Text = "Desligar Bomba";
|
||||
this.btnDesligarBomba.UseVisualStyleBackColor = true;
|
||||
this.btnDesligarBomba.Click += new System.EventHandler(this.btnDesligarBomba_Click);
|
||||
//
|
||||
// nudPressaoSP
|
||||
//
|
||||
this.nudPressaoSP.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.nudPressaoSP.Location = new System.Drawing.Point(24, 33);
|
||||
this.nudPressaoSP.Maximum = new decimal(new int[] {
|
||||
200,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudPressaoSP.Name = "nudPressaoSP";
|
||||
this.nudPressaoSP.Size = new System.Drawing.Size(105, 22);
|
||||
this.nudPressaoSP.TabIndex = 28;
|
||||
this.nudPressaoSP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudPressaoSP.ValueChanged += new System.EventHandler(this.nudPressaoSP_ValueChanged);
|
||||
//
|
||||
// lblPressaoSP
|
||||
//
|
||||
this.lblPressaoSP.AutoSize = true;
|
||||
this.lblPressaoSP.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblPressaoSP.Location = new System.Drawing.Point(24, 14);
|
||||
this.lblPressaoSP.Name = "lblPressaoSP";
|
||||
this.lblPressaoSP.Size = new System.Drawing.Size(89, 16);
|
||||
this.lblPressaoSP.TabIndex = 29;
|
||||
this.lblPressaoSP.Text = "Pressão SP";
|
||||
//
|
||||
// lblDistanciaEsquerda
|
||||
//
|
||||
this.lblDistanciaEsquerda.AutoSize = true;
|
||||
this.lblDistanciaEsquerda.Font = new System.Drawing.Font("Mongolian Baiti", 9.25F, System.Drawing.FontStyle.Bold);
|
||||
this.lblDistanciaEsquerda.Location = new System.Drawing.Point(206, 9);
|
||||
this.lblDistanciaEsquerda.Name = "lblDistanciaEsquerda";
|
||||
this.lblDistanciaEsquerda.Size = new System.Drawing.Size(184, 16);
|
||||
this.lblDistanciaEsquerda.TabIndex = 26;
|
||||
this.lblDistanciaEsquerda.Text = "Distancia Esq: 00.00 cm";
|
||||
//
|
||||
// lblDistanciaDireita
|
||||
//
|
||||
this.lblDistanciaDireita.AutoSize = true;
|
||||
this.lblDistanciaDireita.Font = new System.Drawing.Font("Mongolian Baiti", 9F, System.Drawing.FontStyle.Bold);
|
||||
this.lblDistanciaDireita.Location = new System.Drawing.Point(459, 9);
|
||||
this.lblDistanciaDireita.Name = "lblDistanciaDireita";
|
||||
this.lblDistanciaDireita.Size = new System.Drawing.Size(179, 16);
|
||||
this.lblDistanciaDireita.TabIndex = 27;
|
||||
this.lblDistanciaDireita.Text = "Distancia Dir: 00.00 cm";
|
||||
//
|
||||
// frmOperacaoManual
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(1651, 804);
|
||||
this.Controls.Add(this.lblDistanciaEsquerda);
|
||||
this.Controls.Add(this.lblDistanciaDireita);
|
||||
this.Controls.Add(this.btnIniciarOperacao);
|
||||
this.Controls.Add(this.pnlDir_DF);
|
||||
this.Controls.Add(this.pnlDir_DT);
|
||||
this.Controls.Add(this.pnlDir_ET);
|
||||
this.Controls.Add(this.pnlDir_EF);
|
||||
this.Controls.Add(this.pnlCameraRua);
|
||||
this.Controls.Add(this.lblMagnetometro);
|
||||
this.Controls.Add(this.pnlAnguloMagnetometro);
|
||||
this.Controls.Add(this.lblGPS);
|
||||
this.Controls.Add(this.pnlAnguloGPS);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.chartGraficos);
|
||||
this.Controls.Add(this.pnlAtuadores);
|
||||
this.Controls.Add(this.pnlCamerasSolo);
|
||||
this.Name = "frmOperacaoManual";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Operação Manual";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmOperacaoManual_FormClosing);
|
||||
this.Load += new System.EventHandler(this.frmOperacaoManual_Load);
|
||||
this.pnlCamerasSolo.ResumeLayout(false);
|
||||
this.pnlCameraSoloE.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picCameraSoloE)).EndInit();
|
||||
this.pnlCameraSoloD.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picCameraSoloD)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartGraficos)).EndInit();
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabMapa.ResumeLayout(false);
|
||||
this.tabInformacoes.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridDados)).EndInit();
|
||||
this.tabDeteccoes.ResumeLayout(false);
|
||||
this.pnlCameraRua.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picCameraRua)).EndInit();
|
||||
this.pnlDir_EF.ResumeLayout(false);
|
||||
this.pnlDir_EF.PerformLayout();
|
||||
this.pnlDir_ET.ResumeLayout(false);
|
||||
this.pnlDir_ET.PerformLayout();
|
||||
this.pnlDir_DT.ResumeLayout(false);
|
||||
this.pnlDir_DT.PerformLayout();
|
||||
this.pnlDir_DF.ResumeLayout(false);
|
||||
this.pnlDir_DF.PerformLayout();
|
||||
this.tabPulverizador.ResumeLayout(false);
|
||||
this.tabPulverizador.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel pnlCamerasSolo;
|
||||
private System.Windows.Forms.Panel pnlAtuadores;
|
||||
private System.Windows.Forms.DataVisualization.Charting.Chart chartGraficos;
|
||||
private System.Windows.Forms.Label lblDir_EF;
|
||||
private System.Windows.Forms.Label lblDir_DF;
|
||||
private System.Windows.Forms.Label lblDir_DT;
|
||||
private System.Windows.Forms.Label lblDir_ET;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabMapa;
|
||||
private System.Windows.Forms.TabPage tabInformacoes;
|
||||
private System.Windows.Forms.TabPage tabDeteccoes;
|
||||
private System.Windows.Forms.Panel pnlAnguloGPS;
|
||||
private System.Windows.Forms.Panel pnlMapa;
|
||||
private System.Windows.Forms.DataGridView gridDados;
|
||||
private System.Windows.Forms.Panel pnlDeteccoesRua;
|
||||
private System.Windows.Forms.Label lblGPS;
|
||||
private System.Windows.Forms.Label lblMagnetometro;
|
||||
private System.Windows.Forms.Panel pnlAnguloMagnetometro;
|
||||
private System.Windows.Forms.Panel pnlCameraRua;
|
||||
private System.Windows.Forms.Panel pnlDir_EF;
|
||||
private System.Windows.Forms.Panel pnlCameraSoloE;
|
||||
private System.Windows.Forms.Panel pnlCameraSoloD;
|
||||
private System.Windows.Forms.Panel pnlDir_ET;
|
||||
private System.Windows.Forms.Panel pnlDir_DT;
|
||||
private System.Windows.Forms.Panel pnlDir_DF;
|
||||
private System.Windows.Forms.PictureBox picCameraRua;
|
||||
private System.Windows.Forms.Button btnIniciarOperacao;
|
||||
private System.Windows.Forms.PictureBox picCameraSoloE;
|
||||
private System.Windows.Forms.PictureBox picCameraSoloD;
|
||||
private System.Windows.Forms.TabPage tabPulverizador;
|
||||
private System.Windows.Forms.Label lblPressaoSP;
|
||||
private System.Windows.Forms.NumericUpDown nudPressaoSP;
|
||||
private System.Windows.Forms.Button btnDesligarBomba;
|
||||
private System.Windows.Forms.Button btnLigarBomba;
|
||||
private System.Windows.Forms.Label lblDistanciaEsquerda;
|
||||
private System.Windows.Forms.Label lblDistanciaDireita;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,716 @@
|
|||
using AgroBase.Models.Modules;
|
||||
using AgroBase.Models;
|
||||
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.Enuns;
|
||||
using AForge.Video.DirectShow;
|
||||
using AForge.Video;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using AgroBase.Services;
|
||||
|
||||
namespace AgroBase.Forms.Operacoes
|
||||
{
|
||||
public partial class frmOperacaoManual : Form
|
||||
{
|
||||
Timer tmrLeitura;
|
||||
|
||||
public frmOperacaoManual()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Ativa o double buffering
|
||||
this.DoubleBuffered = true;
|
||||
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
this.SetStyle(ControlStyles.UserPaint, true);
|
||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
|
||||
pnlAtuadores.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(pnlAtuadores, new object[] { ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true });
|
||||
pnlAnguloGPS.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(pnlAnguloGPS, new object[] { ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true });
|
||||
pnlAnguloMagnetometro.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(pnlAnguloMagnetometro, new object[] { ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true });
|
||||
pnlDir_DF.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(pnlDir_DF, new object[] { ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true });
|
||||
pnlDir_DT.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(pnlDir_DT, new object[] { ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true });
|
||||
pnlDir_EF.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(pnlDir_EF, new object[] { ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true });
|
||||
pnlDir_ET.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(pnlDir_ET, new object[] { ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true });
|
||||
}
|
||||
|
||||
private void frmOperacaoManual_Load(object sender, EventArgs e)
|
||||
{
|
||||
pnlDir_DF.Paint += pnlDir_Paint;
|
||||
pnlDir_DT.Paint += pnlDir_Paint;
|
||||
pnlDir_EF.Paint += pnlDir_Paint;
|
||||
pnlDir_ET.Paint += pnlDir_Paint;
|
||||
|
||||
|
||||
IniciarCameras();
|
||||
PopularInformacoesGerais();
|
||||
InicializarMapa();
|
||||
PopularBicos();
|
||||
|
||||
tmrLeitura = new Timer() { Interval = 500 };
|
||||
tmrLeitura.Tick += tmrLeitura_Tick;
|
||||
tmrLeitura.Start();
|
||||
}
|
||||
|
||||
private void frmOperacaoManual_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
tmrLeitura.Stop();
|
||||
tmrLeitura.Dispose();
|
||||
Mapa.PararProcessamento();
|
||||
videoSourceRua.Stop();
|
||||
videoSourceSoloD.Stop();
|
||||
videoSourceSoloE.Stop();
|
||||
}
|
||||
|
||||
private void tmrLeitura_Tick(object sender, EventArgs e)
|
||||
{
|
||||
AtualizarDados();
|
||||
}
|
||||
|
||||
public void AtualizarDados()
|
||||
{
|
||||
var statusAtual = Variaveis.OperacaoEmAndamento.ReferencialRuaGPS.StatusAtual;
|
||||
|
||||
if (statusAtual == StatusOperacao.Parametrizando)
|
||||
{
|
||||
this.Text = "Operação Manual - Parametrização";
|
||||
}
|
||||
else if (statusAtual == StatusOperacao.Aguardando)
|
||||
{
|
||||
this.Text = "Operação Manual - Iniciando em " + (Variaveis.OperacaoEmAndamento.TempoAguardando.AddSeconds(Variaveis.OperacaoEmAndamento.TempoIniciarOperacao) - DateTime.Now).TotalSeconds.ToString("0") + " segundo" + ((Variaveis.OperacaoEmAndamento.TempoAguardando.AddSeconds(Variaveis.OperacaoEmAndamento.TempoIniciarOperacao) - DateTime.Now).TotalSeconds < 1 ? "" : "s") + "...";
|
||||
}
|
||||
else if (statusAtual == StatusOperacao.Concluida)
|
||||
{
|
||||
this.Text = "Operação Manual - Concluída";
|
||||
}
|
||||
else if (Variaveis.OperacaoEmAndamento.Iniciado)
|
||||
{
|
||||
this.Text = "Operação Manual - Em andamento";
|
||||
}
|
||||
|
||||
pnlDir_DF.Invalidate();
|
||||
pnlDir_DT.Invalidate();
|
||||
pnlDir_EF.Invalidate();
|
||||
pnlDir_ET.Invalidate();
|
||||
|
||||
pnlAtuadores.Invalidate();
|
||||
pnlAnguloGPS.Invalidate();
|
||||
pnlAnguloMagnetometro.Invalidate();
|
||||
|
||||
AtualizarGrafico();
|
||||
AtualizarInformacoesGerais();
|
||||
|
||||
lblDistanciaEsquerda.Text = "Distancia Esq: " + Variaveis.OperacaoEmAndamento.Sensoriamento.DistanciaEsquerda.ToString("0.00") + " cm";
|
||||
lblDistanciaDireita.Text = "Distancia Dir: " + Variaveis.OperacaoEmAndamento.Sensoriamento.DistanciaDireita.ToString("0.00") + " cm";
|
||||
}
|
||||
|
||||
|
||||
#region Direcionais
|
||||
|
||||
private void pnlDir_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
DesenharGraficos(sender, e);
|
||||
}
|
||||
|
||||
private void DesenharGraficos(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (!Variaveis.DispositivosConectados.Any(d => d.Dispositivo == T_Code.Dir))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Panel pnl = (Panel)sender;
|
||||
string ID = pnl.Name.Replace("pnlDir_", "");
|
||||
|
||||
var Motor = ((DirecionalModel)Variaveis.DispositivosConectados.FirstOrDefault(d => d.Dispositivo == T_Code.Dir).Dados).Motores.FirstOrDefault(m => m.ID == ID);
|
||||
Label lblAngulo = pnl.Controls.OfType<Label>().FirstOrDefault(ctrl => ctrl.Name == "lblDir_" + ID);
|
||||
lblAngulo.Text = ID + " " + ((Motor.Sentido_SP == Sentido.Antihorario ? -1 : 1) * Motor.Angulo).ToString("000") + "º";
|
||||
|
||||
// Use o objeto Graphics para desenhar a representação do motor
|
||||
Graphics g = e.Graphics;
|
||||
|
||||
int centerX = pnl.Width / 2;
|
||||
int centerY = pnl.Height / 2;
|
||||
int radius = Math.Min(centerX, centerY) - 30;
|
||||
|
||||
// Desenhe o círculo para representar o motor
|
||||
g.DrawEllipse(Pens.Black, centerX - radius, centerY - radius, 2 * radius, 2 * radius);
|
||||
|
||||
|
||||
|
||||
// Desenhe a linha externa (set point)
|
||||
double setPointAngleInRadians = (Motor.Sentido_SP == Sentido.Antihorario ? -1 : 1) * ((Motor.Angulo_SP * Math.PI) / 180);
|
||||
int setPointX = centerX + (int)((radius + 10) * Math.Sin(setPointAngleInRadians));
|
||||
int setPointY = centerY - (int)((radius + 10) * Math.Cos(setPointAngleInRadians));
|
||||
g.DrawLine(Pens.Green, centerX, centerY, setPointX, setPointY);
|
||||
|
||||
// Desenhe a seta que indica o sentido
|
||||
int arrowLength = 15; // Comprimento da seta
|
||||
|
||||
if (Motor.Sentido_SP == Sentido.Horario)
|
||||
{
|
||||
// Desenhe uma seta para a direita (sentido horário)
|
||||
Point arrowStart = new Point(setPointX, setPointY);
|
||||
Point arrowEnd = new Point(setPointX + arrowLength, setPointY);
|
||||
g.DrawLine(Pens.Green, arrowStart, arrowEnd);
|
||||
|
||||
// Desenhe a "ponta" da seta (triângulo) para a direita
|
||||
Point arrowPoint1 = new Point(setPointX + arrowLength - 5, setPointY - 5);
|
||||
Point arrowPoint2 = new Point(setPointX + arrowLength - 5, setPointY + 5);
|
||||
g.DrawLine(Pens.Green, arrowEnd, arrowPoint1);
|
||||
g.DrawLine(Pens.Green, arrowEnd, arrowPoint2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Desenhe uma seta para a esquerda (sentido anti-horário)
|
||||
Point arrowStart = new Point(setPointX, setPointY);
|
||||
Point arrowEnd = new Point(setPointX - arrowLength, setPointY);
|
||||
g.DrawLine(Pens.Green, arrowStart, arrowEnd);
|
||||
|
||||
// Desenhe a "ponta" da seta (triângulo) para a esquerda
|
||||
Point arrowPoint1 = new Point(setPointX - arrowLength + 5, setPointY - 5);
|
||||
Point arrowPoint2 = new Point(setPointX - arrowLength + 5, setPointY + 5);
|
||||
g.DrawLine(Pens.Green, arrowEnd, arrowPoint1);
|
||||
g.DrawLine(Pens.Green, arrowEnd, arrowPoint2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Desenhe uma linha para representar a posição do eixo do motor
|
||||
double angleInRadians = (Motor.Angulo * 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);
|
||||
|
||||
// Desenhe a seta que indica o sentido
|
||||
if (Motor.Sentido == Sentido.Horario)
|
||||
{
|
||||
// Desenhe uma seta para a direita (sentido horário)
|
||||
Point arrowStart = new Point(x, y);
|
||||
Point arrowEnd = new Point(x + arrowLength, y);
|
||||
g.DrawLine(Pens.Red, arrowStart, arrowEnd);
|
||||
|
||||
// Desenhe a "ponta" da seta (triângulo) para a direita
|
||||
Point arrowPoint1 = new Point(x + arrowLength - 5, y - 5);
|
||||
Point arrowPoint2 = new Point(x + arrowLength - 5, y + 5);
|
||||
g.DrawLine(Pens.Red, arrowEnd, arrowPoint1);
|
||||
g.DrawLine(Pens.Red, arrowEnd, arrowPoint2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Desenhe uma seta para a esquerda (sentido anti-horário)
|
||||
Point arrowStart = new Point(x, y);
|
||||
Point arrowEnd = new Point(x - arrowLength, y);
|
||||
g.DrawLine(Pens.Red, arrowStart, arrowEnd);
|
||||
|
||||
// Desenhe a "ponta" da seta (triângulo) para a esquerda
|
||||
Point arrowPoint1 = new Point(x - arrowLength + 5, y - 5);
|
||||
Point arrowPoint2 = new Point(x - arrowLength + 5, y + 5);
|
||||
g.DrawLine(Pens.Red, arrowEnd, arrowPoint1);
|
||||
g.DrawLine(Pens.Red, arrowEnd, arrowPoint2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Desenhe os pontos nos angulos fixos
|
||||
int radiusCircle = 5;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
double angle = ((i * 90) * Math.PI) / 180;
|
||||
int xA = centerX + (int)((radius) * Math.Sin(angle)); // Adicione 20 para afastar do círculo principal
|
||||
int yA = centerY - (int)((radius) * Math.Cos(angle)); // Adicione 20 para afastar do círculo principal
|
||||
|
||||
Rectangle rect = new Rectangle(xA - radiusCircle, yA - radiusCircle, 2 * radiusCircle, 2 * radiusCircle);
|
||||
bool Acionado =
|
||||
Motor.Ref000 && i == 0 ||
|
||||
Motor.Ref090 && i == 1 ||
|
||||
Motor.Ref180 && i == 2 ||
|
||||
Motor.Ref270 && i == 3;
|
||||
using (SolidBrush brush = new SolidBrush(Acionado ? Color.Red : Color.DarkRed))
|
||||
{
|
||||
g.FillEllipse(brush, rect);
|
||||
}
|
||||
|
||||
string angleText = ((i * 90).ToString() + "°");
|
||||
SizeF textSize = g.MeasureString(angleText, Font);
|
||||
|
||||
float textX = xA;
|
||||
float textY = yA;
|
||||
float textOffset = 12;
|
||||
|
||||
// Ajuste as coordenadas do texto com base no ângulo
|
||||
if (angle == 0)
|
||||
{
|
||||
textX -= textSize.Width / 2;
|
||||
textY -= textSize.Height - (textOffset * 2);
|
||||
}
|
||||
else if (angle == Math.PI / 2)
|
||||
{
|
||||
textX -= textSize.Width + textOffset;
|
||||
textY -= textSize.Height / 2;
|
||||
}
|
||||
else if (angle == Math.PI)
|
||||
{
|
||||
textX -= textSize.Width / 2;
|
||||
textY -= (textOffset * 2);
|
||||
}
|
||||
else if (angle == 3 * Math.PI / 2)
|
||||
{
|
||||
textX += textOffset;
|
||||
textY -= textSize.Height / 2;
|
||||
}
|
||||
|
||||
g.DrawString(angleText, Font, Brushes.Black, textX, textY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Cameras
|
||||
|
||||
private FilterInfoCollection videoDevices;
|
||||
private VideoCaptureDevice videoSourceRua;
|
||||
private VideoCaptureDevice videoSourceSoloE;
|
||||
private VideoCaptureDevice videoSourceSoloD;
|
||||
private void IniciarCameras()
|
||||
{
|
||||
videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
|
||||
List<string> CamerasIDs = new List<string>();
|
||||
foreach (FilterInfo info in videoDevices)
|
||||
{
|
||||
CamerasIDs.Add(info.MonikerString.ToLower());
|
||||
}
|
||||
|
||||
string IDcamRua = Variaveis.OperacaoEmAndamento.DispSen.Dados.CameraID_Caminho.ToLower().Replace("\\", "#");
|
||||
if (CamerasIDs.Any(x => x.Contains(IDcamRua)))
|
||||
{
|
||||
videoSourceRua = new VideoCaptureDevice(CamerasIDs.First(x => x.Contains(IDcamRua)));
|
||||
videoSourceRua.NewFrame += new NewFrameEventHandler(videoSourceRua_NewFrame);
|
||||
videoSourceRua.Start();
|
||||
}
|
||||
string IDcamSoloE = Variaveis.OperacaoEmAndamento.DispSen.Dados.CameraID_SoloE.ToLower().Replace("\\", "#");
|
||||
if (CamerasIDs.Any(x => x.Contains(IDcamSoloE)))
|
||||
{
|
||||
videoSourceSoloE = new VideoCaptureDevice(CamerasIDs.First(x => x.Contains(IDcamSoloE)));
|
||||
videoSourceSoloE.NewFrame += new NewFrameEventHandler(videoSourceSoloE_NewFrame);
|
||||
videoSourceSoloE.Start();
|
||||
}
|
||||
string IDcamSoloD = Variaveis.OperacaoEmAndamento.DispSen.Dados.CameraID_SoloD.ToLower().Replace("\\", "#");
|
||||
if (CamerasIDs.Any(x => x.Contains(IDcamSoloD)))
|
||||
{
|
||||
videoSourceSoloD = new VideoCaptureDevice(CamerasIDs.First(x => x.Contains(IDcamSoloD)));
|
||||
videoSourceSoloD.NewFrame += new NewFrameEventHandler(videoSourceSoloD_NewFrame);
|
||||
videoSourceSoloD.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private void videoSourceRua_NewFrame(object sender, NewFrameEventArgs eventArgs)
|
||||
{
|
||||
Bitmap bitmap = (Bitmap)eventArgs.Frame.Clone();
|
||||
picCameraRua.Image = bitmap;
|
||||
}
|
||||
private void videoSourceSoloE_NewFrame(object sender, NewFrameEventArgs eventArgs)
|
||||
{
|
||||
Bitmap bitmap = (Bitmap)eventArgs.Frame.Clone();
|
||||
picCameraSoloE.Image = bitmap;
|
||||
}
|
||||
private void videoSourceSoloD_NewFrame(object sender, NewFrameEventArgs eventArgs)
|
||||
{
|
||||
Bitmap bitmap = (Bitmap)eventArgs.Frame.Clone();
|
||||
picCameraSoloD.Image = bitmap;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Angulo orientacao Magnetica
|
||||
|
||||
private void pnlAnguloGPS_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
double angulo = Variaveis.OperacaoEmAndamento.ReferencialRuaGPS.AnguloCarroGPS;
|
||||
DesenharInclinacao((Panel)sender, e, (float)angulo, -90);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void pnlAnguloMagnetometro_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
double angulo = Variaveis.OperacaoEmAndamento.Sensoriamento.AnguloCarroBussola;
|
||||
DesenharInclinacao((Panel)sender, e, (float)angulo, -90);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void DesenharInclinacao(Panel pnlBussola, PaintEventArgs e, float anguloInclinacao, float anguloSub)
|
||||
{
|
||||
if (!(anguloInclinacao >= 0 || anguloInclinacao <= 0))
|
||||
{
|
||||
anguloInclinacao = 0;
|
||||
}
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
// Desenha o círculo da bússola
|
||||
int diameter = Math.Min(pnlBussola.Width - 1, pnlBussola.Height - 1);
|
||||
Point centro = new Point((pnlBussola.Width - 1) / 2, (pnlBussola.Height - 1) / 2);
|
||||
//g.DrawEllipse(Pens.Black, centro.X - diameter / 2, centro.Y - diameter / 2, diameter, diameter);
|
||||
|
||||
// Escreve o ângulo no centro do círculo
|
||||
string anguloTexto = $"{anguloInclinacao.ToString("0")}°";
|
||||
Font fonteAngulo = new Font("Arial", 7); // Ajuste o tamanho da fonte conforme necessário
|
||||
SizeF textSize = e.Graphics.MeasureString(anguloTexto, fonteAngulo);
|
||||
|
||||
// Calcula a posição para o texto ser centralizado no círculo
|
||||
float textX = 0;
|
||||
float textY = 0;
|
||||
|
||||
// Define a cor do texto
|
||||
Brush textBrush = Brushes.Black;
|
||||
|
||||
// Desenha o texto no Graphics do painel
|
||||
g.DrawString(anguloTexto, fonteAngulo, textBrush, textX, textY);
|
||||
|
||||
// A linha será desenhada do centro do círculo
|
||||
PointF pontoCentral = new PointF(centro.X, centro.Y);
|
||||
// O comprimento da linha será metade do diâmetro do círculo (raio)
|
||||
float comprimentoLinha = diameter / 3;
|
||||
|
||||
// Ajustar o ângulo para que 0 graus esteja para cima e aumente no sentido horário
|
||||
//float anguloRadianos = (anguloInclinacao - 90) * (float)(Math.PI / 180.0);
|
||||
float anguloRadianos = (anguloInclinacao - anguloSub) * (float)(Math.PI / 180.0);
|
||||
|
||||
// Calcular o ponto final da linha baseado no ângulo de inclinação
|
||||
PointF pontoFinal = new PointF(
|
||||
pontoCentral.X + comprimentoLinha * (float)Math.Cos(anguloRadianos),
|
||||
pontoCentral.Y + comprimentoLinha * (float)Math.Sin(anguloRadianos)
|
||||
);
|
||||
|
||||
// Desenhar a linha de inclinação
|
||||
g.DrawLine(Pens.Red, pontoCentral, pontoFinal);
|
||||
|
||||
// Opcional: Desenhar uma ponta de seta na linha para indicar direção
|
||||
using (AdjustableArrowCap bigArrow = new AdjustableArrowCap(4, 4))
|
||||
{
|
||||
using (Pen pen = new Pen(Color.Red, 2))
|
||||
{
|
||||
pen.CustomEndCap = bigArrow;
|
||||
g.DrawLine(pen, pontoCentral, pontoFinal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Graficos
|
||||
|
||||
private void AtualizarGrafico()
|
||||
{
|
||||
MovSensorimanetoGrafico Log = null;
|
||||
|
||||
var Motor = Variaveis.OperacaoEmAndamento.DispMov.Dados.Motores.FirstOrDefault(x => x.ID == "ET" && x.LogGrafico.Any());
|
||||
|
||||
if (Motor.LogGrafico.Count > 0)
|
||||
{
|
||||
Log = Motor.LogGrafico.Last();
|
||||
}
|
||||
|
||||
double Minimo = 0;
|
||||
double Maximo = 0;
|
||||
|
||||
Chart chart = chartGraficos;
|
||||
chart.Titles.Clear();
|
||||
//chart.Titles.Add("Acompanhamento");
|
||||
var Logs = (Motor.LogGrafico.Count > MovimentacaoModel.LogsManter ? Motor.LogGrafico.Skip(Math.Max(0, Motor.LogGrafico.Count - MovimentacaoModel.LogsManter)).Take(MovimentacaoModel.LogsManter).ToList() : Motor.LogGrafico).Where(log => log.ComponenteID == Motor.ID).ToList();
|
||||
chart.Series.Clear();
|
||||
List<string> Momentos = Logs.Select(x => x.Momento.ToString("mm:ss:fff")).ToList();
|
||||
|
||||
var serieVelocidade = new Series("Velocidade: " + (Log != null ? Log.Velocidade : 0));
|
||||
serieVelocidade.Points.DataBindXY(Momentos, Logs.Select(x => x.Velocidade).ToList());
|
||||
serieVelocidade.ChartType = SeriesChartType.Line;
|
||||
chart.Series.Add(serieVelocidade);
|
||||
Minimo = Logs.Min(x => x.Velocidade) < Minimo ? Logs.Min(x => x.Velocidade) : Minimo;
|
||||
Maximo = Logs.Min(x => x.Velocidade) > Maximo ? Logs.Min(x => x.Velocidade) : Maximo;
|
||||
|
||||
var serieRPMsp = new Series("RPM SP: " + (Log != null ? Log.RPM_SP : 0));
|
||||
serieRPMsp.Points.DataBindXY(Momentos, Logs.Select(x => x.RPM_SP).ToList());
|
||||
serieRPMsp.ChartType = SeriesChartType.Spline;
|
||||
chart.Series.Add(serieRPMsp);
|
||||
Minimo = Logs.Min(x => x.RPM_SP) < Minimo ? Logs.Min(x => x.RPM_SP) : Minimo;
|
||||
Maximo = Logs.Max(x => x.RPM_SP) > Maximo ? Logs.Max(x => x.RPM_SP) : Maximo;
|
||||
|
||||
var seriePotencia = new Series("Potencia: " + (Log != null ? Log.Potencia : 0));
|
||||
seriePotencia.Points.DataBindXY(Momentos, Logs.Select(x => x.Potencia).ToList());
|
||||
seriePotencia.ChartType = SeriesChartType.Line;
|
||||
chart.Series.Add(seriePotencia);
|
||||
Minimo = Logs.Min(x => x.Potencia) < Minimo ? Logs.Min(x => x.Potencia) : Minimo;
|
||||
Maximo = Logs.Max(x => x.Potencia) > Maximo ? Logs.Max(x => x.Potencia) : Maximo;
|
||||
|
||||
var serieTemperatura = new Series("Temperatura: " + (Log != null ? Log.Temperatura : 0));
|
||||
serieTemperatura.Points.DataBindXY(Momentos, Logs.Select(x => x.Temperatura).ToList());
|
||||
serieTemperatura.ChartType = SeriesChartType.Line;
|
||||
chart.Series.Add(serieTemperatura);
|
||||
Minimo = Logs.Min(x => x.Temperatura) < Minimo ? Logs.Min(x => x.Temperatura) : Minimo;
|
||||
Maximo = Logs.Max(x => x.Temperatura) > Maximo ? Logs.Max(x => x.Temperatura) : Maximo;
|
||||
|
||||
foreach (var legend in chart.Legends)
|
||||
{
|
||||
legend.Docking = Docking.Bottom;
|
||||
}
|
||||
|
||||
chart.ChartAreas[0].AxisY.Minimum = Minimo - 5;
|
||||
chart.ChartAreas[0].AxisY.Maximum = Maximo + 5;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Informacoes gerais
|
||||
|
||||
private void PopularInformacoesGerais()
|
||||
{
|
||||
gridDados.Rows.Clear();
|
||||
gridDados.Columns.Clear();
|
||||
gridDados.Columns.Add("clDado", "Dado");
|
||||
gridDados.Columns.Add("clValor", "Valor");
|
||||
gridDados.Columns.Add("clUnidade", "Un");
|
||||
|
||||
gridDados.Rows.Add("Tempo de Operação", "", "");
|
||||
gridDados.Rows.Add("Tempo em Movimento", "", "");
|
||||
gridDados.Rows.Add("Velocidade Média", "", "km/h");
|
||||
gridDados.Rows.Add("Distância Percorrida", "", "m");
|
||||
gridDados.Rows.Add("Nível de Bateria", "", "%");
|
||||
gridDados.Rows.Add("Tensão da Bateria", "", "v");
|
||||
gridDados.Rows.Add("Corrente da Bateria", "", "A");
|
||||
gridDados.Rows.Add("Nível do Reservatório", "", "%");
|
||||
gridDados.Rows.Add("Volume do Reservatório", "", "L");
|
||||
gridDados.Rows.Add("Herbicida Aplicado", "", "L");
|
||||
gridDados.Rows.Add("Ervas Detectadas", "", "");
|
||||
gridDados.Rows.Add("Pressão da Linha", "", "psi");
|
||||
gridDados.Rows.Add("Potência na Bomba", "", "%");
|
||||
|
||||
AtualizarInformacoesGerais();
|
||||
}
|
||||
|
||||
private void AtualizarInformacoesGerais()
|
||||
{
|
||||
gridDados.Rows[0].Cells[1].Value = Variaveis.OperacaoEmAndamento.Tempo.Hours.ToString("00") + ":" + Variaveis.OperacaoEmAndamento.Tempo.Minutes.ToString("00") + ":" + Variaveis.OperacaoEmAndamento.Tempo.Seconds.ToString("00");
|
||||
gridDados.Rows[1].Cells[1].Value = TimeSpan.FromSeconds(Variaveis.OperacaoEmAndamento.DispMov.Dados.TempoEmAtividade).ToString(@"hh\:mm\:ss");
|
||||
gridDados.Rows[2].Cells[1].Value = Variaveis.OperacaoEmAndamento.Sensoriamento.VelocidadeMedia.ToString("0.00");
|
||||
gridDados.Rows[3].Cells[1].Value = Variaveis.OperacaoEmAndamento.Sensoriamento.DistanciaPercorrida.Sum().ToString("0.00");
|
||||
gridDados.Rows[4].Cells[1].Value = (PZEMService.Iniciado && PZEMService.UltimaLeitura != null ? Variaveis.OperacaoEmAndamento.Sensoriamento.PorcentagemBateria.ToString("00.00") : "");
|
||||
gridDados.Rows[5].Cells[1].Value = (PZEMService.Iniciado && PZEMService.UltimaLeitura != null ? PZEMService.UltimaLeitura.Tensao.ToString("0.00") : "");
|
||||
gridDados.Rows[6].Cells[1].Value = (PZEMService.Iniciado && PZEMService.UltimaLeitura != null ? PZEMService.UltimaLeitura.Corrente.ToString("0.00") : "");
|
||||
gridDados.Rows[7].Cells[1].Value = Variaveis.OperacaoEmAndamento.DispAtu.Dados.PercentualReservatorio.ToString("00.00");
|
||||
gridDados.Rows[8].Cells[1].Value = Variaveis.OperacaoEmAndamento.DispAtu.Dados.VolumeReservatorio.ToString("0.000");
|
||||
gridDados.Rows[9].Cells[1].Value = Variaveis.OperacaoEmAndamento.Sensoriamento.HerbicidaConsumido.ToString("0.000");
|
||||
gridDados.Rows[10].Cells[1].Value = Variaveis.OperacaoEmAndamento.Sensoriamento.ErvasIdentificadas.ToString("000");
|
||||
gridDados.Rows[11].Cells[1].Value = Variaveis.OperacaoEmAndamento.DispAtu.Dados.PressaoLinha.ToString("0.00");
|
||||
gridDados.Rows[12].Cells[1].Value = Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.Potencia.ToString("0.00");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mapa GPS
|
||||
|
||||
private MapasModel Mapa;
|
||||
|
||||
private void InicializarMapa()
|
||||
{
|
||||
Mapa = new MapasModel()
|
||||
{
|
||||
pnlMapa = pnlMapa,
|
||||
};
|
||||
Mapa.CarregarMapaGPS();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bicos Pulverizadores
|
||||
|
||||
private void PopularBicos()
|
||||
{
|
||||
var Atuador = Variaveis.OperacaoEmAndamento.DispAtu;
|
||||
nudPressaoSP.Value = Convert.ToInt32(Atuador.Dados.BombaPressurizadora.PressaoSP);
|
||||
|
||||
int panelWidth = pnlAtuadores.Width;
|
||||
int circleDiameter = 40; // Diâmetro dos círculos grandes
|
||||
int spaceBetweenCircles = (panelWidth - (circleDiameter * Atuador.Dados.QuantidadeBicos)) / (Atuador.Dados.QuantidadeBicos + 1);
|
||||
int yPosition = (pnlAtuadores.Height - circleDiameter) / 3; // Centralizado verticalmente
|
||||
|
||||
|
||||
for (int i = 0; i < Atuador.Dados.QuantidadeBicos; i++)
|
||||
{
|
||||
// Calcula a posição x do círculo
|
||||
int xPosition = spaceBetweenCircles + (i * (circleDiameter + spaceBetweenCircles));
|
||||
// Define a string que representa o número do bico
|
||||
string bicoNumero = Atuador.Dados.BicosPulverizadores[i].ID;
|
||||
|
||||
Button btnDesligar = new Button()
|
||||
{
|
||||
Name = "btn_" + bicoNumero,
|
||||
Size = new Size(75, 27),
|
||||
Location = new Point(xPosition + (circleDiameter - 75) / 2, circleDiameter + yPosition + 25),
|
||||
Text = "Ligar"
|
||||
};
|
||||
btnDesligar.Click -= btn_Click;
|
||||
btnDesligar.Click += btn_Click;
|
||||
Label lblCmd = new Label()
|
||||
{
|
||||
Name = "lblCmd_" + bicoNumero,
|
||||
Size = new Size(110, 20),
|
||||
Location = new Point(xPosition + (circleDiameter - 110) / 2, 0),
|
||||
Text = "Comando: Desligado"
|
||||
};
|
||||
|
||||
pnlAtuadores.Controls.Add(btnDesligar);
|
||||
pnlAtuadores.Controls.Add(lblCmd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button btn = (Button)sender;
|
||||
string ID = btn.Name.Replace("btn_", "");
|
||||
var Bico = Variaveis.OperacaoEmAndamento.DispAtu.Dados.BicosPulverizadores.FirstOrDefault(x => x.ID == ID);
|
||||
if (Bico != null)
|
||||
{
|
||||
Bico.Atuado = Bico.Atuado ? !Variaveis.OperacaoEmAndamento.DispAtu.Dados.AtuacaoNivelAlto : Variaveis.OperacaoEmAndamento.DispAtu.Dados.AtuacaoNivelAlto;
|
||||
string Protocolo = Bico.ProtocoloComando();
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.EnviarDadosSerial(Protocolo);
|
||||
|
||||
pnlAtuadores.Controls.OfType<Label>().First(x => x.Name == "lblCmd_" + ID).Text = "Comando: " + (Bico.Atuado ? "Ligado" : "Desligado");
|
||||
btn.Text = Bico.Atuado ? "Desligar" : "Ligar";
|
||||
}
|
||||
}
|
||||
|
||||
private void btnLigarBomba_Click(object sender, EventArgs e)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.BombaAtuada = true;
|
||||
EnviarProtocoloComandoBomba();
|
||||
}
|
||||
|
||||
private void btnDesligarBomba_Click(object sender, EventArgs e)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.BombaAtuada = false;
|
||||
EnviarProtocoloComandoBomba();
|
||||
}
|
||||
|
||||
private void nudPressaoSP_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.PressaoSP = Convert.ToInt32(((NumericUpDown)sender).Value);
|
||||
EnviarProtocoloComandoBomba();
|
||||
}
|
||||
|
||||
private void EnviarProtocoloComandoBomba()
|
||||
{
|
||||
string Protocolo = Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.ProtocoloComando();
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.EnviarDadosSerial(Protocolo);
|
||||
}
|
||||
|
||||
private void pnlAtuadores_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
var Atuador = Variaveis.OperacaoEmAndamento.DispAtu;
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
Panel myPanel = (Panel)sender;
|
||||
int panelWidth = myPanel.Width;
|
||||
int circleDiameter = 40; // Diâmetro dos círculos grandes
|
||||
int smallCircleDiameter = circleDiameter / 2; // Diâmetro dos círculos pequenos
|
||||
int spaceBetweenCircles = (panelWidth - (circleDiameter * Atuador.Dados.QuantidadeBicos)) / (Atuador.Dados.QuantidadeBicos + 1);
|
||||
int yPosition = (myPanel.Height - circleDiameter) / 3; // Centralizado verticalmente
|
||||
|
||||
|
||||
for (int i = 0; i < Atuador.Dados.QuantidadeBicos; i++)
|
||||
{
|
||||
// Calcula a posição x do círculo
|
||||
int xPosition = spaceBetweenCircles + (i * (circleDiameter + spaceBetweenCircles));
|
||||
// Desenha o contorno do círculo
|
||||
g.DrawEllipse(Pens.Red, xPosition, yPosition, circleDiameter, circleDiameter);
|
||||
// Se o bico estiver aceso, preenche o círculo
|
||||
if (Atuador.Dados.BicosPulverizadores[i].Atuado)
|
||||
{
|
||||
g.FillEllipse(Brushes.Red, xPosition, yPosition, circleDiameter, circleDiameter);
|
||||
}
|
||||
|
||||
// Define a string que representa o número do bico
|
||||
string bicoNumero = Atuador.Dados.BicosPulverizadores[i].ID;
|
||||
// Define a fonte para o texto
|
||||
Font font = new Font("Arial", 10, FontStyle.Bold);
|
||||
// Mede o tamanho do texto
|
||||
SizeF stringSize = g.MeasureString(bicoNumero, font);
|
||||
// Calcula as posições x e y para centralizar o texto no círculo
|
||||
float textXPosition = xPosition + (circleDiameter - stringSize.Width) / 2;
|
||||
float textYPosition = yPosition + (circleDiameter - stringSize.Height) / 2;
|
||||
// Desenha o número do bico
|
||||
g.DrawString(bicoNumero, font, Brushes.Black, textXPosition, textYPosition);
|
||||
|
||||
|
||||
// Define a string que representa a atuacao do bico
|
||||
string bicoAtuacao = Variaveis.OperacaoEmAndamento.Sensoriamento.AtuacoesPorBico[i].ToString("000");
|
||||
// Define a fonte para o texto
|
||||
Font fontA = new Font("Arial", 8, FontStyle.Bold);
|
||||
// Mede o tamanho do texto
|
||||
SizeF stringSizeA = g.MeasureString(bicoAtuacao, fontA);
|
||||
// Calcula as posições x e y para centralizar o texto no círculo
|
||||
float textXPositionA = xPosition + (circleDiameter - stringSizeA.Width) / 2;
|
||||
float textYPositionA = circleDiameter + yPosition + 5;
|
||||
// Desenha as atuacoes do bico
|
||||
g.DrawString(bicoAtuacao, fontA, Brushes.Black, textXPositionA, textYPositionA);
|
||||
|
||||
|
||||
// Calcula a posição x e y do círculo pequeno
|
||||
int smallCircleXPosition = Convert.ToInt32(xPosition + circleDiameter - smallCircleDiameter / 1.3);
|
||||
int smallCircleYPosition = Convert.ToInt32(yPosition + circleDiameter - smallCircleDiameter / 1.3);
|
||||
|
||||
// Define a cor de contorno e preenchimento para o círculo pequeno
|
||||
Pen smallCirclePen = Pens.Blue; // Cor do contorno
|
||||
Brush smallCircleBrush = Brushes.Transparent; // Cor de preenchimento padrão
|
||||
|
||||
// Se o status do bico for true, altera a cor de preenchimento para azul
|
||||
if (Atuador.Dados.BicosPulverizadores[i].StatusBico)
|
||||
{
|
||||
smallCircleBrush = Brushes.Blue;
|
||||
}
|
||||
|
||||
// Desenha o contorno do círculo pequeno
|
||||
g.DrawEllipse(smallCirclePen, smallCircleXPosition, smallCircleYPosition, smallCircleDiameter, smallCircleDiameter);
|
||||
// Preenche o círculo pequeno se o status do bico for true
|
||||
g.FillEllipse(smallCircleBrush, smallCircleXPosition, smallCircleYPosition, smallCircleDiameter, smallCircleDiameter);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void btnIniciarOperacao_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (btnIniciarOperacao.Text == "Finalizar Operação")
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.FinalizarOperacao();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.OperacaoLiberada)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.IniciarOperacao(null, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Finalize a parametrização corretamente para iniciar a operação!", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
btnIniciarOperacao.Text = !Variaveis.OperacaoEmAndamento.Iniciado ? "Iniciar Operação" : "Finalizar Operação";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using AgroBase.Comum;
|
||||
using AgroBase.Forms.Atuador;
|
||||
using AgroBase.Models;
|
||||
using AgroBase.Models.Modules;
|
||||
using AgroBase.Services;
|
||||
|
|
@ -26,6 +27,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
public partial class frmOperacaoMapaGPS : Form
|
||||
{
|
||||
private Timer tmrLeituras = new Timer() { Interval = 200 };
|
||||
CalibragemVazao _CalibragemVazao = new CalibragemVazao();
|
||||
|
||||
#region Eventos do formulário
|
||||
|
||||
|
|
@ -54,6 +56,9 @@ namespace AgroBase.Forms.Operacoes
|
|||
|
||||
AtualizarDispositivos();
|
||||
AtualizaListaCameras();
|
||||
nudPressaoSP.Value = Convert.ToInt32(Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.PressaoSP);
|
||||
txtVolumeLido.Text = Variaveis.OperacaoEmAndamento.DispAtu.Dados._FluxoMlRef.ToString("0.0");
|
||||
lblVazao.Text = "Vazão " + (Variaveis.OperacaoEmAndamento.DispAtu.Dados._FluxoMlRef / _CalibragemVazao.TempoCalibragem * 1000).ToString("0") + " mL/s";
|
||||
}
|
||||
|
||||
private void frmOperacaoMapaGPS_FormClosing(object sender, FormClosingEventArgs e)
|
||||
|
|
@ -115,6 +120,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
AtualizarInformacoesGerais();
|
||||
pnlOrientacao.Invalidate();
|
||||
pnlInclinacao.Invalidate();
|
||||
pnlAtuadores.Invalidate();
|
||||
|
||||
PZEMService.EnviarComando(PZEMService.PortaPZEM, PZEMService.ComandoAquisicaoDados());
|
||||
|
||||
|
|
@ -196,7 +202,6 @@ namespace AgroBase.Forms.Operacoes
|
|||
}
|
||||
|
||||
lblUltimaLeituraSolo.Text = "Ultima Leitura Solo: " + FuncoesGlobais.TimestampToDate(CameraSolo.Leitura.timestamp);
|
||||
pnlAtuadores.Invalidate();
|
||||
|
||||
AtualizaInformacoesControleOperacao();
|
||||
}
|
||||
|
|
@ -364,7 +369,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
lblPressao.Text = "P: " + Variaveis.OperacaoEmAndamento.DispAtu.Dados.PressaoLinha.ToString("0.00") + " psi";
|
||||
|
||||
pgbReservatorio.Value = Convert.ToInt32(Variaveis.OperacaoEmAndamento.DispAtu.Dados.PercentualReservatorio);
|
||||
lblPorcentagemReservatorio.Text = Variaveis.OperacaoEmAndamento.DispAtu.Dados.PercentualReservatorio.ToString("00.00") + "%";
|
||||
lblPorcentagemReservatorio.Text = Variaveis.OperacaoEmAndamento.DispAtu.Dados.VolumeReservatorio.ToString("0.000") + " L " + Variaveis.OperacaoEmAndamento.DispAtu.Dados.PercentualReservatorio.ToString("00.00") + "%";
|
||||
|
||||
pgbBateria.Value = Variaveis.OperacaoEmAndamento.Sensoriamento.PorcentagemBateria <= 100 ? Convert.ToInt32(Variaveis.OperacaoEmAndamento.Sensoriamento.PorcentagemBateria) : 100;
|
||||
lblPorcentagemBateria.Text = (PZEMService.Iniciado && PZEMService.UltimaLeitura != null ? PZEMService.UltimaLeitura.Tensao.ToString("0.00") + "v " + PZEMService.UltimaLeitura.Corrente.ToString("0.00") + "A " : "") + Variaveis.OperacaoEmAndamento.Sensoriamento.PorcentagemBateria.ToString("00.00") + "%";
|
||||
|
|
@ -420,9 +425,23 @@ namespace AgroBase.Forms.Operacoes
|
|||
|
||||
#region Seleção de câmeras
|
||||
|
||||
ComboBox cmbCameraCaminho = new ComboBox() { Name = "cmbCameraCaminho", Visible = false };
|
||||
ComboBox cmbCameraSoloD = new ComboBox() { Name = "cmbCameraSoloD", Visible = false };
|
||||
ComboBox cmbCameraSoloE = new ComboBox() { Name = "cmbCameraSoloE", Visible = false };
|
||||
|
||||
private void AtualizaListaCameras()
|
||||
{
|
||||
var listaCameras = CameraService.AtualizaListaCameras().Keys.ToArray();
|
||||
cmbCameraCaminho.SelectedIndexChanged -= cmbCameraCaminho_SelectedIndexChanged;
|
||||
cmbCameraCaminho.SelectedIndexChanged += cmbCameraCaminho_SelectedIndexChanged;
|
||||
cmbCameraSoloD.SelectedIndexChanged -= cmbCameraSolo_SelectedIndexChanged;
|
||||
cmbCameraSoloD.SelectedIndexChanged += cmbCameraSolo_SelectedIndexChanged;
|
||||
cmbCameraSoloE.SelectedIndexChanged -= cmbCameraSolo_SelectedIndexChanged;
|
||||
cmbCameraSoloE.SelectedIndexChanged += cmbCameraSolo_SelectedIndexChanged;
|
||||
gpbOpcoes.Controls.Add(cmbCameraCaminho);
|
||||
gpbOpcoes.Controls.Add(cmbCameraSoloE);
|
||||
gpbOpcoes.Controls.Add(cmbCameraSoloD);
|
||||
|
||||
var listaCameras = CameraService.AtualizaListaCameras().Values.ToArray();
|
||||
|
||||
var cameras = gpbOpcoes.Controls.OfType<ComboBox>().Where(x => x.Name.Contains("cmbCameraSolo")).OrderBy(x => x.TabIndex).ToList();
|
||||
foreach (ComboBox cmb in cameras)
|
||||
|
|
@ -452,8 +471,19 @@ namespace AgroBase.Forms.Operacoes
|
|||
|
||||
CameraSolo.combo.Items.Clear();
|
||||
CameraSolo.combo.Items.AddRange(listaCameras);
|
||||
if (CamNome == "D")
|
||||
{
|
||||
CameraSolo.combo.SelectedIndex = CameraSolo.combo.Items.IndexOf(Variaveis.OperacaoEmAndamento.DispSen.Dados.CameraID_SoloD);
|
||||
}
|
||||
else if (CamNome == "E")
|
||||
{
|
||||
CameraSolo.combo.SelectedIndex = CameraSolo.combo.Items.IndexOf(Variaveis.OperacaoEmAndamento.DispSen.Dados.CameraID_SoloE);
|
||||
}
|
||||
else
|
||||
{
|
||||
CameraSolo.combo.SelectedIndex = CameraSolo.camera.selectedCamera;
|
||||
}
|
||||
}
|
||||
|
||||
if (Variaveis.OperacaoEmAndamento.CameraCaminho == null)
|
||||
{
|
||||
|
|
@ -481,7 +511,8 @@ namespace AgroBase.Forms.Operacoes
|
|||
|
||||
cmbCameraCaminho.Items.Clear();
|
||||
cmbCameraCaminho.Items.AddRange(listaCameras);
|
||||
cmbCameraCaminho.SelectedIndex = Variaveis.OperacaoEmAndamento.CameraCaminho.camera.selectedCamera;
|
||||
cmbCameraCaminho.SelectedIndex = cmbCameraCaminho.Items.IndexOf(Variaveis.OperacaoEmAndamento.DispSen.Dados.CameraID_Caminho);
|
||||
//cmbCameraCaminho.SelectedIndex = Variaveis.OperacaoEmAndamento.CameraCaminho.camera.selectedCamera;
|
||||
}
|
||||
|
||||
private void cmbCameraSolo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
|
@ -511,7 +542,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
private void IniciarCameraSolo(CameraSoloModel CameraSolo)
|
||||
{
|
||||
CameraSolo.camera.IniciarCamera(
|
||||
PythonService.ScriptWeedDetector,
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.ScriptDeteccaoErvas,
|
||||
new string[] {
|
||||
CameraSolo.MaxLeituras.ToString(),
|
||||
CameraSolo.VideoPorta,
|
||||
|
|
@ -601,6 +632,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
{
|
||||
if (Variaveis.OperacaoEmAndamento.OperacaoLiberada)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.PressaoSP = Convert.ToDouble(nudPressaoSP.Value);
|
||||
Variaveis.OperacaoEmAndamento.IniciarOperacao(null, false);
|
||||
}
|
||||
else
|
||||
|
|
@ -895,8 +927,132 @@ namespace AgroBase.Forms.Operacoes
|
|||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Calibragem do pulverizador
|
||||
|
||||
private void AtuarBico(AtuadorBicoModel Bico, bool Estado)
|
||||
{
|
||||
if (Bico != null)
|
||||
{
|
||||
Bico.Atuado = Variaveis.OperacaoEmAndamento.DispAtu.Dados.AtuacaoNivelAlto ? Estado : !Estado;
|
||||
string Protocolo = Bico.ProtocoloComando();
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.EnviarDadosSerial(Protocolo);
|
||||
}
|
||||
}
|
||||
|
||||
private void AtuarBomba(bool Estado)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.BombaAtuada = Estado;
|
||||
string Protocolo = Variaveis.OperacaoEmAndamento.DispAtu.Dados.BombaPressurizadora.ProtocoloComando();
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.EnviarDadosSerial(Protocolo);
|
||||
}
|
||||
|
||||
private void btnCalibrarVazao_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (btnCalibrarVazao.Text == "Calcular")
|
||||
{
|
||||
if (txtVolumeLido.Text == "" || double.TryParse(txtVolumeLido.Text, out double Volume) == false)
|
||||
{
|
||||
MessageBox.Show("Informe o volume obtido durante a calibragem!");
|
||||
return;
|
||||
}
|
||||
_CalibragemVazao.VolumeComputado = Volume;
|
||||
btnCalibrarVazao.Text = "Calibrar vazão";
|
||||
|
||||
string Resultados =
|
||||
"Valores iniciais" + Environment.NewLine +
|
||||
"Massa = " + _CalibragemVazao.MassaInicial.ToString("0.0000") + " Kg" + Environment.NewLine +
|
||||
"Pressão = " + _CalibragemVazao.PressoesAferidas.First().ToString("0.0000") + " psi" + Environment.NewLine +
|
||||
Environment.NewLine +
|
||||
"Medições" + Environment.NewLine +
|
||||
"V = " + _CalibragemVazao.VolumeComputado.ToString("0.0000") + "mL" + Environment.NewLine +
|
||||
"P = " + _CalibragemVazao.PressaoMedia.ToString("0.0000") + " psi" + Environment.NewLine +
|
||||
"NP = " + _CalibragemVazao.QtdPulsos + Environment.NewLine +
|
||||
"T = " + _CalibragemVazao.Periodo + " s" + Environment.NewLine +
|
||||
"M = " + _CalibragemVazao.MassaFinal.ToString("0.0000") + " Kg" + Environment.NewLine +
|
||||
Environment.NewLine +
|
||||
"Cálculos" + Environment.NewLine +
|
||||
"Massa Perdida = " + _CalibragemVazao.MassaPerdida.ToString("0.0000") + " g" + Environment.NewLine +
|
||||
"d = " + _CalibragemVazao.d.ToString("0.0000") + Environment.NewLine +
|
||||
"Q = " + _CalibragemVazao.Q.ToString("0.0000") + " mL/s" + Environment.NewLine +
|
||||
"x = " + _CalibragemVazao.x.ToString("0.0000") + Environment.NewLine +
|
||||
"Q2 = " + _CalibragemVazao.Q2.ToString("0.0000") + " mL" + Environment.NewLine +
|
||||
""
|
||||
;
|
||||
|
||||
Console.WriteLine(Resultados);
|
||||
MessageBox.Show(Resultados, "Resultado da calibragem");
|
||||
if (MessageBox.Show("Deseja aceitar os parâmetros de calibragem?", "Atualizar dados", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados._FluxoMlRef = _CalibragemVazao.VolumeComputado;
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados._FluxoPulsoRef = _CalibragemVazao.QtdPulsos;
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.DensidadeHerbicida = _CalibragemVazao.d;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
btnCalibrarVazao.Enabled = false;
|
||||
AtuarBomba(true);
|
||||
var tmrInicioCalibragemVazao = new Timer { Interval = 1000 };
|
||||
tmrInicioCalibragemVazao.Tick += tmrInicioCalibragemVazao_Tick;
|
||||
tmrInicioCalibragemVazao.Start();
|
||||
}
|
||||
txtVolumeLido.Enabled = false;
|
||||
}
|
||||
|
||||
private void tmrInicioCalibragemVazao_Tick(object sender, EventArgs e)
|
||||
{
|
||||
((Timer)sender).Stop();
|
||||
|
||||
var tmrCalibragemVazao = new Timer() { Interval = 500 };
|
||||
|
||||
_CalibragemVazao = new CalibragemVazao()
|
||||
{
|
||||
Calibrando = true,
|
||||
IniciadoEm = DateTime.Now,
|
||||
MassaInicial = Variaveis.OperacaoEmAndamento.DispAtu.Dados.MassaReservatorio,
|
||||
PressoesAferidas = new List<double>()
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.PressaoLinha,
|
||||
}
|
||||
};
|
||||
tmrCalibragemVazao.Tick += tmrCalibragemVazao_Tick;
|
||||
tmrCalibragemVazao.Start();
|
||||
|
||||
AtuarBico(Variaveis.OperacaoEmAndamento.DispAtu.Dados.BicosPulverizadores.FirstOrDefault(x => x.Inicializado), true);
|
||||
}
|
||||
|
||||
private void tmrCalibragemVazao_Tick(object sender, EventArgs e)
|
||||
{
|
||||
_CalibragemVazao.QtdPulsos = Variaveis.OperacaoEmAndamento.DispAtu.Dados._LeituraPulsos;
|
||||
_CalibragemVazao.Periodo = Variaveis.OperacaoEmAndamento.DispAtu.Dados._LeituraPeriodo;
|
||||
_CalibragemVazao.PressoesAferidas.Add(Variaveis.OperacaoEmAndamento.DispAtu.Dados.PressaoLinha);
|
||||
_CalibragemVazao.MassaFinal = Variaveis.OperacaoEmAndamento.DispAtu.Dados.MassaReservatorio;
|
||||
|
||||
if (Variaveis.OperacaoEmAndamento.DispAtu.Dados._LeituraPeriodo >= _CalibragemVazao.TempoCalibragem || DateTime.Now >= _CalibragemVazao.IniciadoEm.AddMilliseconds(_CalibragemVazao.TempoCalibragem))
|
||||
{
|
||||
((Timer)sender).Stop();
|
||||
|
||||
AtuarBico(Variaveis.OperacaoEmAndamento.DispAtu.Dados.BicosPulverizadores.FirstOrDefault(x => x.Inicializado), false);
|
||||
AtuarBomba(false);
|
||||
|
||||
_CalibragemVazao.Periodo = _CalibragemVazao.Periodo / 1000.0;
|
||||
if (_CalibragemVazao.Periodo == 0)
|
||||
{
|
||||
_CalibragemVazao.Periodo = _CalibragemVazao.TempoCalibragem / 1000;
|
||||
}
|
||||
|
||||
btnCalibrarVazao.Text = "Calcular";
|
||||
btnCalibrarVazao.Enabled = true;
|
||||
txtVolumeLido.Enabled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ namespace AgroBase.Forms.Operacoes
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea6 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend6 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
this.pnlCameraSolo = new System.Windows.Forms.Panel();
|
||||
this.pnlCameraSoloD = new System.Windows.Forms.Panel();
|
||||
this.pnlCameraSoloE = new System.Windows.Forms.Panel();
|
||||
|
|
@ -60,13 +60,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
this.pgbReservatorio = new System.Windows.Forms.ProgressBar();
|
||||
this.gpbOpcoes = new System.Windows.Forms.GroupBox();
|
||||
this.btnCarregarMapa = new System.Windows.Forms.Button();
|
||||
this.cmbCameraSoloD = new System.Windows.Forms.ComboBox();
|
||||
this.lblCameraSoloD = new System.Windows.Forms.Label();
|
||||
this.btnIniciarOperacao = new System.Windows.Forms.Button();
|
||||
this.cmbCameraCaminho = new System.Windows.Forms.ComboBox();
|
||||
this.lblCameraCaminho = new System.Windows.Forms.Label();
|
||||
this.cmbCameraSoloE = new System.Windows.Forms.ComboBox();
|
||||
this.lblCameraSoloE = new System.Windows.Forms.Label();
|
||||
this.gpbInformacoesGerais = new System.Windows.Forms.GroupBox();
|
||||
this.lblBateriaConsumida = new System.Windows.Forms.Label();
|
||||
this.lblHerbicidaPorErva = new System.Windows.Forms.Label();
|
||||
|
|
@ -91,6 +85,14 @@ namespace AgroBase.Forms.Operacoes
|
|||
this.pnlInclinacao = new System.Windows.Forms.Panel();
|
||||
this.pnlAnguloCamera = new System.Windows.Forms.Panel();
|
||||
this.lblPerformance = new System.Windows.Forms.Label();
|
||||
this.btnCalibrarVazao = new System.Windows.Forms.Button();
|
||||
this.nudPressaoSP = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblPressaoSP = new System.Windows.Forms.Label();
|
||||
this.lblPSI = new System.Windows.Forms.Label();
|
||||
this.txtVolumeLido = new System.Windows.Forms.TextBox();
|
||||
this.lblML = new System.Windows.Forms.Label();
|
||||
this.lblVolumeLido = new System.Windows.Forms.Label();
|
||||
this.lblVazao = new System.Windows.Forms.Label();
|
||||
this.pnlCameraSolo.SuspendLayout();
|
||||
this.pnlAtuadores.SuspendLayout();
|
||||
this.pnlGraficos.SuspendLayout();
|
||||
|
|
@ -99,6 +101,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
this.gpbOpcoes.SuspendLayout();
|
||||
this.gpbInformacoesGerais.SuspendLayout();
|
||||
this.pnlInferior.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pnlCameraSolo
|
||||
|
|
@ -116,7 +119,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
this.pnlCameraSoloD.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.pnlCameraSoloD.Location = new System.Drawing.Point(399, 2);
|
||||
this.pnlCameraSoloD.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.pnlCameraSoloD.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pnlCameraSoloD.Name = "pnlCameraSoloD";
|
||||
this.pnlCameraSoloD.Size = new System.Drawing.Size(385, 325);
|
||||
this.pnlCameraSoloD.TabIndex = 1;
|
||||
|
|
@ -125,7 +128,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
this.pnlCameraSoloE.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.pnlCameraSoloE.Location = new System.Drawing.Point(5, 2);
|
||||
this.pnlCameraSoloE.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.pnlCameraSoloE.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pnlCameraSoloE.Name = "pnlCameraSoloE";
|
||||
this.pnlCameraSoloE.Size = new System.Drawing.Size(385, 325);
|
||||
this.pnlCameraSoloE.TabIndex = 0;
|
||||
|
|
@ -182,18 +185,18 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
// chartGraficos
|
||||
//
|
||||
chartArea1.Name = "ChartArea1";
|
||||
this.chartGraficos.ChartAreas.Add(chartArea1);
|
||||
chartArea6.Name = "ChartArea1";
|
||||
this.chartGraficos.ChartAreas.Add(chartArea6);
|
||||
this.chartGraficos.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend1.Name = "Legend1";
|
||||
this.chartGraficos.Legends.Add(legend1);
|
||||
legend6.Name = "Legend1";
|
||||
this.chartGraficos.Legends.Add(legend6);
|
||||
this.chartGraficos.Location = new System.Drawing.Point(0, 0);
|
||||
this.chartGraficos.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.chartGraficos.Name = "chartGraficos";
|
||||
series1.ChartArea = "ChartArea1";
|
||||
series1.Legend = "Legend1";
|
||||
series1.Name = "Series1";
|
||||
this.chartGraficos.Series.Add(series1);
|
||||
series6.ChartArea = "ChartArea1";
|
||||
series6.Legend = "Legend1";
|
||||
series6.Name = "Series1";
|
||||
this.chartGraficos.Series.Add(series6);
|
||||
this.chartGraficos.Size = new System.Drawing.Size(540, 313);
|
||||
this.chartGraficos.TabIndex = 0;
|
||||
this.chartGraficos.Text = "chart1";
|
||||
|
|
@ -373,14 +376,16 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
// gpbOpcoes
|
||||
//
|
||||
this.gpbOpcoes.Controls.Add(this.lblVazao);
|
||||
this.gpbOpcoes.Controls.Add(this.lblVolumeLido);
|
||||
this.gpbOpcoes.Controls.Add(this.lblML);
|
||||
this.gpbOpcoes.Controls.Add(this.txtVolumeLido);
|
||||
this.gpbOpcoes.Controls.Add(this.lblPSI);
|
||||
this.gpbOpcoes.Controls.Add(this.lblPressaoSP);
|
||||
this.gpbOpcoes.Controls.Add(this.nudPressaoSP);
|
||||
this.gpbOpcoes.Controls.Add(this.btnCalibrarVazao);
|
||||
this.gpbOpcoes.Controls.Add(this.btnCarregarMapa);
|
||||
this.gpbOpcoes.Controls.Add(this.cmbCameraSoloD);
|
||||
this.gpbOpcoes.Controls.Add(this.lblCameraSoloD);
|
||||
this.gpbOpcoes.Controls.Add(this.btnIniciarOperacao);
|
||||
this.gpbOpcoes.Controls.Add(this.cmbCameraCaminho);
|
||||
this.gpbOpcoes.Controls.Add(this.lblCameraCaminho);
|
||||
this.gpbOpcoes.Controls.Add(this.cmbCameraSoloE);
|
||||
this.gpbOpcoes.Controls.Add(this.lblCameraSoloE);
|
||||
this.gpbOpcoes.Font = new System.Drawing.Font("Mongolian Baiti", 9F, System.Drawing.FontStyle.Bold);
|
||||
this.gpbOpcoes.Location = new System.Drawing.Point(1084, 697);
|
||||
this.gpbOpcoes.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
|
|
@ -402,77 +407,17 @@ namespace AgroBase.Forms.Operacoes
|
|||
this.btnCarregarMapa.UseVisualStyleBackColor = true;
|
||||
this.btnCarregarMapa.Click += new System.EventHandler(this.btnCarregarMapa_Click);
|
||||
//
|
||||
// cmbCameraSoloD
|
||||
//
|
||||
this.cmbCameraSoloD.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbCameraSoloD.FormattingEnabled = true;
|
||||
this.cmbCameraSoloD.Location = new System.Drawing.Point(111, 52);
|
||||
this.cmbCameraSoloD.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cmbCameraSoloD.Name = "cmbCameraSoloD";
|
||||
this.cmbCameraSoloD.Size = new System.Drawing.Size(147, 24);
|
||||
this.cmbCameraSoloD.TabIndex = 8;
|
||||
this.cmbCameraSoloD.SelectedIndexChanged += new System.EventHandler(this.cmbCameraSolo_SelectedIndexChanged);
|
||||
//
|
||||
// lblCameraSoloD
|
||||
//
|
||||
this.lblCameraSoloD.AutoSize = true;
|
||||
this.lblCameraSoloD.Location = new System.Drawing.Point(5, 55);
|
||||
this.lblCameraSoloD.Name = "lblCameraSoloD";
|
||||
this.lblCameraSoloD.Size = new System.Drawing.Size(93, 16);
|
||||
this.lblCameraSoloD.TabIndex = 7;
|
||||
this.lblCameraSoloD.Text = "Cam Solo D";
|
||||
//
|
||||
// btnIniciarOperacao
|
||||
//
|
||||
this.btnIniciarOperacao.Location = new System.Drawing.Point(111, 114);
|
||||
this.btnIniciarOperacao.Location = new System.Drawing.Point(110, 114);
|
||||
this.btnIniciarOperacao.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnIniciarOperacao.Name = "btnIniciarOperacao";
|
||||
this.btnIniciarOperacao.Size = new System.Drawing.Size(148, 26);
|
||||
this.btnIniciarOperacao.Size = new System.Drawing.Size(149, 26);
|
||||
this.btnIniciarOperacao.TabIndex = 6;
|
||||
this.btnIniciarOperacao.Text = "Iniciar Operação";
|
||||
this.btnIniciarOperacao.UseVisualStyleBackColor = true;
|
||||
this.btnIniciarOperacao.Click += new System.EventHandler(this.btnIniciarOperacao_Click);
|
||||
//
|
||||
// cmbCameraCaminho
|
||||
//
|
||||
this.cmbCameraCaminho.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbCameraCaminho.FormattingEnabled = true;
|
||||
this.cmbCameraCaminho.Location = new System.Drawing.Point(111, 82);
|
||||
this.cmbCameraCaminho.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cmbCameraCaminho.Name = "cmbCameraCaminho";
|
||||
this.cmbCameraCaminho.Size = new System.Drawing.Size(147, 24);
|
||||
this.cmbCameraCaminho.TabIndex = 3;
|
||||
this.cmbCameraCaminho.SelectedIndexChanged += new System.EventHandler(this.cmbCameraCaminho_SelectedIndexChanged);
|
||||
//
|
||||
// lblCameraCaminho
|
||||
//
|
||||
this.lblCameraCaminho.AutoSize = true;
|
||||
this.lblCameraCaminho.Location = new System.Drawing.Point(5, 86);
|
||||
this.lblCameraCaminho.Name = "lblCameraCaminho";
|
||||
this.lblCameraCaminho.Size = new System.Drawing.Size(94, 16);
|
||||
this.lblCameraCaminho.TabIndex = 2;
|
||||
this.lblCameraCaminho.Text = "Camera Rua";
|
||||
//
|
||||
// cmbCameraSoloE
|
||||
//
|
||||
this.cmbCameraSoloE.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbCameraSoloE.FormattingEnabled = true;
|
||||
this.cmbCameraSoloE.Location = new System.Drawing.Point(111, 21);
|
||||
this.cmbCameraSoloE.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cmbCameraSoloE.Name = "cmbCameraSoloE";
|
||||
this.cmbCameraSoloE.Size = new System.Drawing.Size(147, 24);
|
||||
this.cmbCameraSoloE.TabIndex = 1;
|
||||
this.cmbCameraSoloE.SelectedIndexChanged += new System.EventHandler(this.cmbCameraSolo_SelectedIndexChanged);
|
||||
//
|
||||
// lblCameraSoloE
|
||||
//
|
||||
this.lblCameraSoloE.AutoSize = true;
|
||||
this.lblCameraSoloE.Location = new System.Drawing.Point(5, 25);
|
||||
this.lblCameraSoloE.Name = "lblCameraSoloE";
|
||||
this.lblCameraSoloE.Size = new System.Drawing.Size(91, 16);
|
||||
this.lblCameraSoloE.TabIndex = 0;
|
||||
this.lblCameraSoloE.Text = "Cam Solo E";
|
||||
//
|
||||
// gpbInformacoesGerais
|
||||
//
|
||||
this.gpbInformacoesGerais.Controls.Add(this.lblBateriaConsumida);
|
||||
|
|
@ -616,7 +561,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
this.chbGPSativo.AutoSize = true;
|
||||
this.chbGPSativo.Location = new System.Drawing.Point(708, 25);
|
||||
this.chbGPSativo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chbGPSativo.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.chbGPSativo.Name = "chbGPSativo";
|
||||
this.chbGPSativo.Size = new System.Drawing.Size(59, 20);
|
||||
this.chbGPSativo.TabIndex = 9;
|
||||
|
|
@ -627,7 +572,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
this.chbATUativo.AutoSize = true;
|
||||
this.chbATUativo.Location = new System.Drawing.Point(708, 4);
|
||||
this.chbATUativo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chbATUativo.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.chbATUativo.Name = "chbATUativo";
|
||||
this.chbATUativo.Size = new System.Drawing.Size(63, 20);
|
||||
this.chbATUativo.TabIndex = 8;
|
||||
|
|
@ -638,7 +583,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
this.chbDIRativo.AutoSize = true;
|
||||
this.chbDIRativo.Location = new System.Drawing.Point(623, 28);
|
||||
this.chbDIRativo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chbDIRativo.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.chbDIRativo.Name = "chbDIRativo";
|
||||
this.chbDIRativo.Size = new System.Drawing.Size(58, 20);
|
||||
this.chbDIRativo.TabIndex = 7;
|
||||
|
|
@ -649,7 +594,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
//
|
||||
this.chbMOVativo.AutoSize = true;
|
||||
this.chbMOVativo.Location = new System.Drawing.Point(623, 4);
|
||||
this.chbMOVativo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chbMOVativo.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.chbMOVativo.Name = "chbMOVativo";
|
||||
this.chbMOVativo.Size = new System.Drawing.Size(67, 20);
|
||||
this.chbMOVativo.TabIndex = 6;
|
||||
|
|
@ -677,7 +622,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
// pnlMapa
|
||||
//
|
||||
this.pnlMapa.Location = new System.Drawing.Point(12, 7);
|
||||
this.pnlMapa.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.pnlMapa.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pnlMapa.Name = "pnlMapa";
|
||||
this.pnlMapa.Size = new System.Drawing.Size(463, 255);
|
||||
this.pnlMapa.TabIndex = 14;
|
||||
|
|
@ -729,6 +674,84 @@ namespace AgroBase.Forms.Operacoes
|
|||
this.lblPerformance.TabIndex = 16;
|
||||
this.lblPerformance.Text = "CPU: 0,0% GPU: 0,0% RAM: 0,0%";
|
||||
//
|
||||
// btnCalibrarVazao
|
||||
//
|
||||
this.btnCalibrarVazao.Location = new System.Drawing.Point(138, 84);
|
||||
this.btnCalibrarVazao.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnCalibrarVazao.Name = "btnCalibrarVazao";
|
||||
this.btnCalibrarVazao.Size = new System.Drawing.Size(120, 26);
|
||||
this.btnCalibrarVazao.TabIndex = 7;
|
||||
this.btnCalibrarVazao.Text = "Calibrar vazão";
|
||||
this.btnCalibrarVazao.UseVisualStyleBackColor = true;
|
||||
this.btnCalibrarVazao.Click += new System.EventHandler(this.btnCalibrarVazao_Click);
|
||||
//
|
||||
// nudPressaoSP
|
||||
//
|
||||
this.nudPressaoSP.Location = new System.Drawing.Point(138, 23);
|
||||
this.nudPressaoSP.Maximum = new decimal(new int[] {
|
||||
200,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudPressaoSP.Name = "nudPressaoSP";
|
||||
this.nudPressaoSP.Size = new System.Drawing.Size(74, 25);
|
||||
this.nudPressaoSP.TabIndex = 8;
|
||||
this.nudPressaoSP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblPressaoSP
|
||||
//
|
||||
this.lblPressaoSP.AutoSize = true;
|
||||
this.lblPressaoSP.Location = new System.Drawing.Point(6, 28);
|
||||
this.lblPressaoSP.Name = "lblPressaoSP";
|
||||
this.lblPressaoSP.Size = new System.Drawing.Size(124, 16);
|
||||
this.lblPressaoSP.TabIndex = 9;
|
||||
this.lblPressaoSP.Text = "Pressão da linha";
|
||||
//
|
||||
// lblPSI
|
||||
//
|
||||
this.lblPSI.AutoSize = true;
|
||||
this.lblPSI.Location = new System.Drawing.Point(218, 28);
|
||||
this.lblPSI.Name = "lblPSI";
|
||||
this.lblPSI.Size = new System.Drawing.Size(28, 16);
|
||||
this.lblPSI.TabIndex = 10;
|
||||
this.lblPSI.Text = "psi";
|
||||
//
|
||||
// txtVolumeLido
|
||||
//
|
||||
this.txtVolumeLido.Enabled = false;
|
||||
this.txtVolumeLido.Location = new System.Drawing.Point(138, 54);
|
||||
this.txtVolumeLido.Name = "txtVolumeLido";
|
||||
this.txtVolumeLido.Size = new System.Drawing.Size(74, 25);
|
||||
this.txtVolumeLido.TabIndex = 11;
|
||||
this.txtVolumeLido.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblML
|
||||
//
|
||||
this.lblML.AutoSize = true;
|
||||
this.lblML.Location = new System.Drawing.Point(218, 59);
|
||||
this.lblML.Name = "lblML";
|
||||
this.lblML.Size = new System.Drawing.Size(30, 16);
|
||||
this.lblML.TabIndex = 12;
|
||||
this.lblML.Text = "mL";
|
||||
//
|
||||
// lblVolumeLido
|
||||
//
|
||||
this.lblVolumeLido.AutoSize = true;
|
||||
this.lblVolumeLido.Location = new System.Drawing.Point(6, 59);
|
||||
this.lblVolumeLido.Name = "lblVolumeLido";
|
||||
this.lblVolumeLido.Size = new System.Drawing.Size(96, 16);
|
||||
this.lblVolumeLido.TabIndex = 13;
|
||||
this.lblVolumeLido.Text = "Volume lido";
|
||||
//
|
||||
// lblVazao
|
||||
//
|
||||
this.lblVazao.AutoSize = true;
|
||||
this.lblVazao.Location = new System.Drawing.Point(6, 91);
|
||||
this.lblVazao.Name = "lblVazao";
|
||||
this.lblVazao.Size = new System.Drawing.Size(120, 16);
|
||||
this.lblVazao.TabIndex = 14;
|
||||
this.lblVazao.Text = "Vazão: 10 mL/s";
|
||||
//
|
||||
// frmOperacaoMapaGPS
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
|
|
@ -770,6 +793,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
this.gpbInformacoesGerais.PerformLayout();
|
||||
this.pnlInferior.ResumeLayout(false);
|
||||
this.pnlInferior.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudPressaoSP)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
@ -793,10 +817,6 @@ namespace AgroBase.Forms.Operacoes
|
|||
private System.Windows.Forms.ProgressBar pgbProgresso;
|
||||
private System.Windows.Forms.Button btnIniciarOperacao;
|
||||
private System.Windows.Forms.Button btnCarregarMapa;
|
||||
private System.Windows.Forms.ComboBox cmbCameraCaminho;
|
||||
private System.Windows.Forms.Label lblCameraCaminho;
|
||||
private System.Windows.Forms.ComboBox cmbCameraSoloE;
|
||||
private System.Windows.Forms.Label lblCameraSoloE;
|
||||
private System.Windows.Forms.GroupBox gpbInformacoesGerais;
|
||||
private System.Windows.Forms.Label lblBateriaConsumida;
|
||||
private System.Windows.Forms.Label lblHerbicidaPorErva;
|
||||
|
|
@ -813,8 +833,6 @@ namespace AgroBase.Forms.Operacoes
|
|||
private System.Windows.Forms.Label lblUltimaLeituraSolo;
|
||||
private System.Windows.Forms.Panel pnlCameraSoloD;
|
||||
private System.Windows.Forms.Panel pnlCameraSoloE;
|
||||
private System.Windows.Forms.ComboBox cmbCameraSoloD;
|
||||
private System.Windows.Forms.Label lblCameraSoloD;
|
||||
private System.Windows.Forms.Panel pnlMapa;
|
||||
private System.Windows.Forms.CheckBox chbGPSativo;
|
||||
private System.Windows.Forms.CheckBox chbATUativo;
|
||||
|
|
@ -836,5 +854,13 @@ namespace AgroBase.Forms.Operacoes
|
|||
private System.Windows.Forms.Label lblProgressoRua;
|
||||
private System.Windows.Forms.Panel pnlAnguloCamera;
|
||||
private System.Windows.Forms.Label lblPerformance;
|
||||
private System.Windows.Forms.Label lblML;
|
||||
private System.Windows.Forms.TextBox txtVolumeLido;
|
||||
private System.Windows.Forms.Label lblPSI;
|
||||
private System.Windows.Forms.Label lblPressaoSP;
|
||||
private System.Windows.Forms.NumericUpDown nudPressaoSP;
|
||||
private System.Windows.Forms.Button btnCalibrarVazao;
|
||||
private System.Windows.Forms.Label lblVolumeLido;
|
||||
private System.Windows.Forms.Label lblVazao;
|
||||
}
|
||||
}
|
||||
|
|
@ -47,10 +47,9 @@
|
|||
this.gpbP_Dir = new System.Windows.Forms.GroupBox();
|
||||
this.nudAnguloMinimo = new System.Windows.Forms.NumericUpDown();
|
||||
this.nudVelocidadeMP = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblVelocidadePercentual = new System.Windows.Forms.Label();
|
||||
this.lblVelocidadeMP = new System.Windows.Forms.Label();
|
||||
this.nudAnguloMaximo = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblAngulo = new System.Windows.Forms.Label();
|
||||
this.lblAngulomin = new System.Windows.Forms.Label();
|
||||
this.gpbP_Mov = new System.Windows.Forms.GroupBox();
|
||||
this.nudVelocidadeComErvas = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblKmhCErvas = new System.Windows.Forms.Label();
|
||||
|
|
@ -78,6 +77,7 @@
|
|||
this.nudCapacidadereservatorio = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblUnCapcaidadereservatorio = new System.Windows.Forms.Label();
|
||||
this.lblCapacidadereservatorio = new System.Windows.Forms.Label();
|
||||
this.lblAngulomax = new System.Windows.Forms.Label();
|
||||
this.gpbModulos.SuspendLayout();
|
||||
this.gpbP_Sen.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudTemposalvarlog)).BeginInit();
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
this.cmbOperacao.Location = new System.Drawing.Point(15, 39);
|
||||
this.cmbOperacao.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.cmbOperacao.Name = "cmbOperacao";
|
||||
this.cmbOperacao.Size = new System.Drawing.Size(417, 32);
|
||||
this.cmbOperacao.Size = new System.Drawing.Size(417, 37);
|
||||
this.cmbOperacao.TabIndex = 0;
|
||||
//
|
||||
// lblOperacao
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
this.lblOperacao.Location = new System.Drawing.Point(15, 9);
|
||||
this.lblOperacao.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.lblOperacao.Name = "lblOperacao";
|
||||
this.lblOperacao.Size = new System.Drawing.Size(175, 24);
|
||||
this.lblOperacao.Size = new System.Drawing.Size(222, 29);
|
||||
this.lblOperacao.TabIndex = 1;
|
||||
this.lblOperacao.Text = "Modo de Operação";
|
||||
//
|
||||
|
|
@ -148,6 +148,7 @@
|
|||
//
|
||||
// gpbP_Gps
|
||||
//
|
||||
this.gpbP_Gps.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.gpbP_Gps.Location = new System.Drawing.Point(792, 105);
|
||||
this.gpbP_Gps.Name = "gpbP_Gps";
|
||||
this.gpbP_Gps.Size = new System.Drawing.Size(190, 168);
|
||||
|
|
@ -160,6 +161,7 @@
|
|||
this.gpbP_Sen.Controls.Add(this.lblTemposalvarlogU);
|
||||
this.gpbP_Sen.Controls.Add(this.nudTemposalvarlog);
|
||||
this.gpbP_Sen.Controls.Add(this.lblTemposalvarlog);
|
||||
this.gpbP_Sen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.gpbP_Sen.Location = new System.Drawing.Point(596, 105);
|
||||
this.gpbP_Sen.Name = "gpbP_Sen";
|
||||
this.gpbP_Sen.Size = new System.Drawing.Size(190, 168);
|
||||
|
|
@ -170,22 +172,23 @@
|
|||
// lblTemposalvarlogU
|
||||
//
|
||||
this.lblTemposalvarlogU.AutoSize = true;
|
||||
this.lblTemposalvarlogU.Location = new System.Drawing.Point(136, 69);
|
||||
this.lblTemposalvarlogU.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblTemposalvarlogU.Location = new System.Drawing.Point(136, 61);
|
||||
this.lblTemposalvarlogU.Name = "lblTemposalvarlogU";
|
||||
this.lblTemposalvarlogU.Size = new System.Drawing.Size(41, 24);
|
||||
this.lblTemposalvarlogU.Size = new System.Drawing.Size(39, 22);
|
||||
this.lblTemposalvarlogU.TabIndex = 13;
|
||||
this.lblTemposalvarlogU.Text = "seg";
|
||||
//
|
||||
// nudTemposalvarlog
|
||||
//
|
||||
this.nudTemposalvarlog.Location = new System.Drawing.Point(10, 67);
|
||||
this.nudTemposalvarlog.Location = new System.Drawing.Point(10, 59);
|
||||
this.nudTemposalvarlog.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudTemposalvarlog.Name = "nudTemposalvarlog";
|
||||
this.nudTemposalvarlog.Size = new System.Drawing.Size(120, 29);
|
||||
this.nudTemposalvarlog.Size = new System.Drawing.Size(120, 30);
|
||||
this.nudTemposalvarlog.TabIndex = 10;
|
||||
this.nudTemposalvarlog.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudTemposalvarlog.Value = new decimal(new int[] {
|
||||
|
|
@ -197,10 +200,10 @@
|
|||
// lblTemposalvarlog
|
||||
//
|
||||
this.lblTemposalvarlog.AutoSize = true;
|
||||
this.lblTemposalvarlog.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblTemposalvarlog.Location = new System.Drawing.Point(6, 40);
|
||||
this.lblTemposalvarlog.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblTemposalvarlog.Location = new System.Drawing.Point(7, 26);
|
||||
this.lblTemposalvarlog.Name = "lblTemposalvarlog";
|
||||
this.lblTemposalvarlog.Size = new System.Drawing.Size(145, 20);
|
||||
this.lblTemposalvarlog.Size = new System.Drawing.Size(157, 22);
|
||||
this.lblTemposalvarlog.TabIndex = 9;
|
||||
this.lblTemposalvarlog.Text = "Tempo Salvar Log";
|
||||
//
|
||||
|
|
@ -213,6 +216,7 @@
|
|||
this.gpbP_Atu.Controls.Add(this.lblQtdCameras);
|
||||
this.gpbP_Atu.Controls.Add(this.nudQtdBicos);
|
||||
this.gpbP_Atu.Controls.Add(this.lblQtdBicos);
|
||||
this.gpbP_Atu.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.gpbP_Atu.Location = new System.Drawing.Point(400, 105);
|
||||
this.gpbP_Atu.Name = "gpbP_Atu";
|
||||
this.gpbP_Atu.Size = new System.Drawing.Size(190, 168);
|
||||
|
|
@ -224,73 +228,74 @@
|
|||
//
|
||||
this.cmbScriptErvas.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbScriptErvas.FormattingEnabled = true;
|
||||
this.cmbScriptErvas.Location = new System.Drawing.Point(10, 129);
|
||||
this.cmbScriptErvas.Location = new System.Drawing.Point(6, 129);
|
||||
this.cmbScriptErvas.Name = "cmbScriptErvas";
|
||||
this.cmbScriptErvas.Size = new System.Drawing.Size(174, 32);
|
||||
this.cmbScriptErvas.Size = new System.Drawing.Size(178, 33);
|
||||
this.cmbScriptErvas.TabIndex = 15;
|
||||
//
|
||||
// nudAtuarem
|
||||
//
|
||||
this.nudAtuarem.Location = new System.Drawing.Point(130, 94);
|
||||
this.nudAtuarem.Location = new System.Drawing.Point(130, 97);
|
||||
this.nudAtuarem.Name = "nudAtuarem";
|
||||
this.nudAtuarem.Size = new System.Drawing.Size(54, 29);
|
||||
this.nudAtuarem.Size = new System.Drawing.Size(54, 30);
|
||||
this.nudAtuarem.TabIndex = 13;
|
||||
this.nudAtuarem.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblAtuarem
|
||||
//
|
||||
this.lblAtuarem.AutoSize = true;
|
||||
this.lblAtuarem.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAtuarem.Location = new System.Drawing.Point(6, 99);
|
||||
this.lblAtuarem.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAtuarem.Location = new System.Drawing.Point(6, 101);
|
||||
this.lblAtuarem.Name = "lblAtuarem";
|
||||
this.lblAtuarem.Size = new System.Drawing.Size(109, 20);
|
||||
this.lblAtuarem.Size = new System.Drawing.Size(115, 22);
|
||||
this.lblAtuarem.TabIndex = 12;
|
||||
this.lblAtuarem.Text = "Atuar em (%)";
|
||||
//
|
||||
// nudQtdCameras
|
||||
//
|
||||
this.nudQtdCameras.Location = new System.Drawing.Point(130, 59);
|
||||
this.nudQtdCameras.Location = new System.Drawing.Point(130, 61);
|
||||
this.nudQtdCameras.Name = "nudQtdCameras";
|
||||
this.nudQtdCameras.Size = new System.Drawing.Size(54, 29);
|
||||
this.nudQtdCameras.Size = new System.Drawing.Size(54, 30);
|
||||
this.nudQtdCameras.TabIndex = 11;
|
||||
this.nudQtdCameras.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblQtdCameras
|
||||
//
|
||||
this.lblQtdCameras.AutoSize = true;
|
||||
this.lblQtdCameras.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblQtdCameras.Location = new System.Drawing.Point(6, 64);
|
||||
this.lblQtdCameras.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblQtdCameras.Location = new System.Drawing.Point(6, 65);
|
||||
this.lblQtdCameras.Name = "lblQtdCameras";
|
||||
this.lblQtdCameras.Size = new System.Drawing.Size(77, 20);
|
||||
this.lblQtdCameras.Size = new System.Drawing.Size(82, 22);
|
||||
this.lblQtdCameras.TabIndex = 9;
|
||||
this.lblQtdCameras.Text = "Câmeras";
|
||||
//
|
||||
// nudQtdBicos
|
||||
//
|
||||
this.nudQtdBicos.Location = new System.Drawing.Point(130, 24);
|
||||
this.nudQtdBicos.Location = new System.Drawing.Point(130, 25);
|
||||
this.nudQtdBicos.Name = "nudQtdBicos";
|
||||
this.nudQtdBicos.Size = new System.Drawing.Size(54, 29);
|
||||
this.nudQtdBicos.Size = new System.Drawing.Size(54, 30);
|
||||
this.nudQtdBicos.TabIndex = 8;
|
||||
this.nudQtdBicos.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblQtdBicos
|
||||
//
|
||||
this.lblQtdBicos.AutoSize = true;
|
||||
this.lblQtdBicos.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblQtdBicos.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblQtdBicos.Location = new System.Drawing.Point(6, 29);
|
||||
this.lblQtdBicos.Name = "lblQtdBicos";
|
||||
this.lblQtdBicos.Size = new System.Drawing.Size(52, 20);
|
||||
this.lblQtdBicos.Size = new System.Drawing.Size(54, 22);
|
||||
this.lblQtdBicos.TabIndex = 6;
|
||||
this.lblQtdBicos.Text = "Bicos";
|
||||
//
|
||||
// gpbP_Dir
|
||||
//
|
||||
this.gpbP_Dir.Controls.Add(this.lblAngulomax);
|
||||
this.gpbP_Dir.Controls.Add(this.nudAnguloMinimo);
|
||||
this.gpbP_Dir.Controls.Add(this.nudVelocidadeMP);
|
||||
this.gpbP_Dir.Controls.Add(this.lblVelocidadePercentual);
|
||||
this.gpbP_Dir.Controls.Add(this.lblVelocidadeMP);
|
||||
this.gpbP_Dir.Controls.Add(this.nudAnguloMaximo);
|
||||
this.gpbP_Dir.Controls.Add(this.lblAngulo);
|
||||
this.gpbP_Dir.Controls.Add(this.lblAngulomin);
|
||||
this.gpbP_Dir.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.gpbP_Dir.Location = new System.Drawing.Point(204, 105);
|
||||
this.gpbP_Dir.Name = "gpbP_Dir";
|
||||
this.gpbP_Dir.Size = new System.Drawing.Size(190, 168);
|
||||
|
|
@ -300,7 +305,7 @@
|
|||
//
|
||||
// nudAnguloMinimo
|
||||
//
|
||||
this.nudAnguloMinimo.Location = new System.Drawing.Point(102, 67);
|
||||
this.nudAnguloMinimo.Location = new System.Drawing.Point(112, 28);
|
||||
this.nudAnguloMinimo.Maximum = new decimal(new int[] {
|
||||
90,
|
||||
0,
|
||||
|
|
@ -312,40 +317,31 @@
|
|||
0,
|
||||
-2147483648});
|
||||
this.nudAnguloMinimo.Name = "nudAnguloMinimo";
|
||||
this.nudAnguloMinimo.Size = new System.Drawing.Size(72, 29);
|
||||
this.nudAnguloMinimo.Size = new System.Drawing.Size(72, 30);
|
||||
this.nudAnguloMinimo.TabIndex = 12;
|
||||
this.nudAnguloMinimo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// nudVelocidadeMP
|
||||
//
|
||||
this.nudVelocidadeMP.Location = new System.Drawing.Point(10, 126);
|
||||
this.nudVelocidadeMP.Location = new System.Drawing.Point(111, 100);
|
||||
this.nudVelocidadeMP.Name = "nudVelocidadeMP";
|
||||
this.nudVelocidadeMP.Size = new System.Drawing.Size(120, 29);
|
||||
this.nudVelocidadeMP.Size = new System.Drawing.Size(73, 30);
|
||||
this.nudVelocidadeMP.TabIndex = 11;
|
||||
this.nudVelocidadeMP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblVelocidadePercentual
|
||||
//
|
||||
this.lblVelocidadePercentual.AutoSize = true;
|
||||
this.lblVelocidadePercentual.Location = new System.Drawing.Point(136, 128);
|
||||
this.lblVelocidadePercentual.Name = "lblVelocidadePercentual";
|
||||
this.lblVelocidadePercentual.Size = new System.Drawing.Size(25, 24);
|
||||
this.lblVelocidadePercentual.TabIndex = 10;
|
||||
this.lblVelocidadePercentual.Text = "%";
|
||||
//
|
||||
// lblVelocidadeMP
|
||||
//
|
||||
this.lblVelocidadeMP.AutoSize = true;
|
||||
this.lblVelocidadeMP.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblVelocidadeMP.Location = new System.Drawing.Point(6, 99);
|
||||
this.lblVelocidadeMP.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblVelocidadeMP.Location = new System.Drawing.Point(6, 104);
|
||||
this.lblVelocidadeMP.Name = "lblVelocidadeMP";
|
||||
this.lblVelocidadeMP.Size = new System.Drawing.Size(91, 20);
|
||||
this.lblVelocidadeMP.Size = new System.Drawing.Size(99, 22);
|
||||
this.lblVelocidadeMP.TabIndex = 9;
|
||||
this.lblVelocidadeMP.Text = "Velocidade";
|
||||
//
|
||||
// nudAnguloMaximo
|
||||
//
|
||||
this.nudAnguloMaximo.Location = new System.Drawing.Point(10, 67);
|
||||
this.nudAnguloMaximo.Location = new System.Drawing.Point(112, 64);
|
||||
this.nudAnguloMaximo.Maximum = new decimal(new int[] {
|
||||
90,
|
||||
0,
|
||||
|
|
@ -357,19 +353,19 @@
|
|||
0,
|
||||
-2147483648});
|
||||
this.nudAnguloMaximo.Name = "nudAnguloMaximo";
|
||||
this.nudAnguloMaximo.Size = new System.Drawing.Size(72, 29);
|
||||
this.nudAnguloMaximo.Size = new System.Drawing.Size(72, 30);
|
||||
this.nudAnguloMaximo.TabIndex = 8;
|
||||
this.nudAnguloMaximo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblAngulo
|
||||
// lblAngulomin
|
||||
//
|
||||
this.lblAngulo.AutoSize = true;
|
||||
this.lblAngulo.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAngulo.Location = new System.Drawing.Point(6, 40);
|
||||
this.lblAngulo.Name = "lblAngulo";
|
||||
this.lblAngulo.Size = new System.Drawing.Size(142, 20);
|
||||
this.lblAngulo.TabIndex = 6;
|
||||
this.lblAngulo.Text = "Angulo Máx e Mín";
|
||||
this.lblAngulomin.AutoSize = true;
|
||||
this.lblAngulomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAngulomin.Location = new System.Drawing.Point(6, 32);
|
||||
this.lblAngulomin.Name = "lblAngulomin";
|
||||
this.lblAngulomin.Size = new System.Drawing.Size(99, 22);
|
||||
this.lblAngulomin.TabIndex = 6;
|
||||
this.lblAngulomin.Text = "Angulo Mín";
|
||||
//
|
||||
// gpbP_Mov
|
||||
//
|
||||
|
|
@ -379,6 +375,7 @@
|
|||
this.gpbP_Mov.Controls.Add(this.nudVelocidadeSemErvas);
|
||||
this.gpbP_Mov.Controls.Add(this.lblKmhSErvas);
|
||||
this.gpbP_Mov.Controls.Add(this.lblVelocidadeSemErvas);
|
||||
this.gpbP_Mov.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.gpbP_Mov.Location = new System.Drawing.Point(8, 105);
|
||||
this.gpbP_Mov.Name = "gpbP_Mov";
|
||||
this.gpbP_Mov.Size = new System.Drawing.Size(190, 168);
|
||||
|
|
@ -388,9 +385,9 @@
|
|||
//
|
||||
// nudVelocidadeComErvas
|
||||
//
|
||||
this.nudVelocidadeComErvas.Location = new System.Drawing.Point(10, 126);
|
||||
this.nudVelocidadeComErvas.Location = new System.Drawing.Point(10, 120);
|
||||
this.nudVelocidadeComErvas.Name = "nudVelocidadeComErvas";
|
||||
this.nudVelocidadeComErvas.Size = new System.Drawing.Size(73, 29);
|
||||
this.nudVelocidadeComErvas.Size = new System.Drawing.Size(73, 30);
|
||||
this.nudVelocidadeComErvas.TabIndex = 11;
|
||||
this.nudVelocidadeComErvas.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudVelocidadeComErvas.ValueChanged += new System.EventHandler(this.nudVelocidadeComErvas_ValueChanged);
|
||||
|
|
@ -398,27 +395,28 @@
|
|||
// lblKmhCErvas
|
||||
//
|
||||
this.lblKmhCErvas.AutoSize = true;
|
||||
this.lblKmhCErvas.Location = new System.Drawing.Point(89, 128);
|
||||
this.lblKmhCErvas.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblKmhCErvas.Location = new System.Drawing.Point(89, 124);
|
||||
this.lblKmhCErvas.Name = "lblKmhCErvas";
|
||||
this.lblKmhCErvas.Size = new System.Drawing.Size(94, 24);
|
||||
this.lblKmhCErvas.Size = new System.Drawing.Size(91, 22);
|
||||
this.lblKmhCErvas.TabIndex = 10;
|
||||
this.lblKmhCErvas.Text = "0,00 Km/h";
|
||||
//
|
||||
// lblVelocidadeComErvas
|
||||
//
|
||||
this.lblVelocidadeComErvas.AutoSize = true;
|
||||
this.lblVelocidadeComErvas.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblVelocidadeComErvas.Location = new System.Drawing.Point(6, 99);
|
||||
this.lblVelocidadeComErvas.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblVelocidadeComErvas.Location = new System.Drawing.Point(3, 94);
|
||||
this.lblVelocidadeComErvas.Name = "lblVelocidadeComErvas";
|
||||
this.lblVelocidadeComErvas.Size = new System.Drawing.Size(174, 20);
|
||||
this.lblVelocidadeComErvas.Size = new System.Drawing.Size(186, 22);
|
||||
this.lblVelocidadeComErvas.TabIndex = 9;
|
||||
this.lblVelocidadeComErvas.Text = "Velocidade com ervas";
|
||||
//
|
||||
// nudVelocidadeSemErvas
|
||||
//
|
||||
this.nudVelocidadeSemErvas.Location = new System.Drawing.Point(10, 67);
|
||||
this.nudVelocidadeSemErvas.Location = new System.Drawing.Point(10, 57);
|
||||
this.nudVelocidadeSemErvas.Name = "nudVelocidadeSemErvas";
|
||||
this.nudVelocidadeSemErvas.Size = new System.Drawing.Size(73, 29);
|
||||
this.nudVelocidadeSemErvas.Size = new System.Drawing.Size(73, 30);
|
||||
this.nudVelocidadeSemErvas.TabIndex = 8;
|
||||
this.nudVelocidadeSemErvas.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.nudVelocidadeSemErvas.ValueChanged += new System.EventHandler(this.nudVelocidadeSemErvas_ValueChanged);
|
||||
|
|
@ -426,19 +424,20 @@
|
|||
// lblKmhSErvas
|
||||
//
|
||||
this.lblKmhSErvas.AutoSize = true;
|
||||
this.lblKmhSErvas.Location = new System.Drawing.Point(89, 69);
|
||||
this.lblKmhSErvas.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblKmhSErvas.Location = new System.Drawing.Point(89, 61);
|
||||
this.lblKmhSErvas.Name = "lblKmhSErvas";
|
||||
this.lblKmhSErvas.Size = new System.Drawing.Size(94, 24);
|
||||
this.lblKmhSErvas.Size = new System.Drawing.Size(91, 22);
|
||||
this.lblKmhSErvas.TabIndex = 7;
|
||||
this.lblKmhSErvas.Text = "0,00 Km/h";
|
||||
//
|
||||
// lblVelocidadeSemErvas
|
||||
//
|
||||
this.lblVelocidadeSemErvas.AutoSize = true;
|
||||
this.lblVelocidadeSemErvas.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblVelocidadeSemErvas.Location = new System.Drawing.Point(6, 40);
|
||||
this.lblVelocidadeSemErvas.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblVelocidadeSemErvas.Location = new System.Drawing.Point(3, 32);
|
||||
this.lblVelocidadeSemErvas.Name = "lblVelocidadeSemErvas";
|
||||
this.lblVelocidadeSemErvas.Size = new System.Drawing.Size(174, 20);
|
||||
this.lblVelocidadeSemErvas.Size = new System.Drawing.Size(186, 22);
|
||||
this.lblVelocidadeSemErvas.TabIndex = 6;
|
||||
this.lblVelocidadeSemErvas.Text = "Velocidade sem ervas";
|
||||
//
|
||||
|
|
@ -449,7 +448,7 @@
|
|||
this.chbO_Gps.Location = new System.Drawing.Point(802, 74);
|
||||
this.chbO_Gps.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbO_Gps.Name = "chbO_Gps";
|
||||
this.chbO_Gps.Size = new System.Drawing.Size(86, 22);
|
||||
this.chbO_Gps.Size = new System.Drawing.Size(108, 28);
|
||||
this.chbO_Gps.TabIndex = 9;
|
||||
this.chbO_Gps.Text = "Opcional";
|
||||
this.chbO_Gps.UseVisualStyleBackColor = true;
|
||||
|
|
@ -462,7 +461,7 @@
|
|||
this.chbO_Sen.Location = new System.Drawing.Point(606, 74);
|
||||
this.chbO_Sen.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbO_Sen.Name = "chbO_Sen";
|
||||
this.chbO_Sen.Size = new System.Drawing.Size(86, 22);
|
||||
this.chbO_Sen.Size = new System.Drawing.Size(108, 28);
|
||||
this.chbO_Sen.TabIndex = 8;
|
||||
this.chbO_Sen.Text = "Opcional";
|
||||
this.chbO_Sen.UseVisualStyleBackColor = true;
|
||||
|
|
@ -475,7 +474,7 @@
|
|||
this.chbO_Atu.Location = new System.Drawing.Point(410, 74);
|
||||
this.chbO_Atu.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbO_Atu.Name = "chbO_Atu";
|
||||
this.chbO_Atu.Size = new System.Drawing.Size(86, 22);
|
||||
this.chbO_Atu.Size = new System.Drawing.Size(108, 28);
|
||||
this.chbO_Atu.TabIndex = 7;
|
||||
this.chbO_Atu.Text = "Opcional";
|
||||
this.chbO_Atu.UseVisualStyleBackColor = true;
|
||||
|
|
@ -488,7 +487,7 @@
|
|||
this.chbO_Dir.Location = new System.Drawing.Point(214, 74);
|
||||
this.chbO_Dir.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbO_Dir.Name = "chbO_Dir";
|
||||
this.chbO_Dir.Size = new System.Drawing.Size(86, 22);
|
||||
this.chbO_Dir.Size = new System.Drawing.Size(108, 28);
|
||||
this.chbO_Dir.TabIndex = 6;
|
||||
this.chbO_Dir.Text = "Opcional";
|
||||
this.chbO_Dir.UseVisualStyleBackColor = true;
|
||||
|
|
@ -501,7 +500,7 @@
|
|||
this.chbO_Mov.Location = new System.Drawing.Point(18, 74);
|
||||
this.chbO_Mov.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbO_Mov.Name = "chbO_Mov";
|
||||
this.chbO_Mov.Size = new System.Drawing.Size(86, 22);
|
||||
this.chbO_Mov.Size = new System.Drawing.Size(108, 28);
|
||||
this.chbO_Mov.TabIndex = 5;
|
||||
this.chbO_Mov.Text = "Opcional";
|
||||
this.chbO_Mov.UseVisualStyleBackColor = true;
|
||||
|
|
@ -513,7 +512,7 @@
|
|||
this.chbD_Gps.Location = new System.Drawing.Point(802, 34);
|
||||
this.chbD_Gps.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbD_Gps.Name = "chbD_Gps";
|
||||
this.chbD_Gps.Size = new System.Drawing.Size(67, 28);
|
||||
this.chbD_Gps.Size = new System.Drawing.Size(85, 33);
|
||||
this.chbD_Gps.TabIndex = 4;
|
||||
this.chbD_Gps.Text = "GPS";
|
||||
this.chbD_Gps.UseVisualStyleBackColor = true;
|
||||
|
|
@ -525,7 +524,7 @@
|
|||
this.chbD_Sen.Location = new System.Drawing.Point(606, 34);
|
||||
this.chbD_Sen.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbD_Sen.Name = "chbD_Sen";
|
||||
this.chbD_Sen.Size = new System.Drawing.Size(156, 28);
|
||||
this.chbD_Sen.Size = new System.Drawing.Size(198, 33);
|
||||
this.chbD_Sen.TabIndex = 3;
|
||||
this.chbD_Sen.Text = "Sensoriamento";
|
||||
this.chbD_Sen.UseVisualStyleBackColor = true;
|
||||
|
|
@ -537,7 +536,7 @@
|
|||
this.chbD_Mov.Location = new System.Drawing.Point(18, 34);
|
||||
this.chbD_Mov.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbD_Mov.Name = "chbD_Mov";
|
||||
this.chbD_Mov.Size = new System.Drawing.Size(152, 28);
|
||||
this.chbD_Mov.Size = new System.Drawing.Size(191, 33);
|
||||
this.chbD_Mov.TabIndex = 0;
|
||||
this.chbD_Mov.Text = "Movimentação";
|
||||
this.chbD_Mov.UseVisualStyleBackColor = true;
|
||||
|
|
@ -549,7 +548,7 @@
|
|||
this.chbD_Atu.Location = new System.Drawing.Point(410, 34);
|
||||
this.chbD_Atu.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbD_Atu.Name = "chbD_Atu";
|
||||
this.chbD_Atu.Size = new System.Drawing.Size(95, 28);
|
||||
this.chbD_Atu.Size = new System.Drawing.Size(118, 33);
|
||||
this.chbD_Atu.TabIndex = 2;
|
||||
this.chbD_Atu.Text = "Atuador";
|
||||
this.chbD_Atu.UseVisualStyleBackColor = true;
|
||||
|
|
@ -561,7 +560,7 @@
|
|||
this.chbD_Dir.Location = new System.Drawing.Point(214, 34);
|
||||
this.chbD_Dir.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.chbD_Dir.Name = "chbD_Dir";
|
||||
this.chbD_Dir.Size = new System.Drawing.Size(113, 28);
|
||||
this.chbD_Dir.Size = new System.Drawing.Size(144, 33);
|
||||
this.chbD_Dir.TabIndex = 1;
|
||||
this.chbD_Dir.Text = "Direcional";
|
||||
this.chbD_Dir.UseVisualStyleBackColor = true;
|
||||
|
|
@ -569,10 +568,10 @@
|
|||
//
|
||||
// btnCarregar
|
||||
//
|
||||
this.btnCarregar.Location = new System.Drawing.Point(569, 38);
|
||||
this.btnCarregar.Location = new System.Drawing.Point(444, 38);
|
||||
this.btnCarregar.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.btnCarregar.Name = "btnCarregar";
|
||||
this.btnCarregar.Size = new System.Drawing.Size(138, 32);
|
||||
this.btnCarregar.Size = new System.Drawing.Size(138, 38);
|
||||
this.btnCarregar.TabIndex = 5;
|
||||
this.btnCarregar.Text = "Carregar";
|
||||
this.btnCarregar.UseVisualStyleBackColor = true;
|
||||
|
|
@ -583,7 +582,7 @@
|
|||
this.btnSalvar.Location = new System.Drawing.Point(867, 38);
|
||||
this.btnSalvar.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.btnSalvar.Name = "btnSalvar";
|
||||
this.btnSalvar.Size = new System.Drawing.Size(138, 32);
|
||||
this.btnSalvar.Size = new System.Drawing.Size(138, 38);
|
||||
this.btnSalvar.TabIndex = 6;
|
||||
this.btnSalvar.Text = "Salvar";
|
||||
this.btnSalvar.UseVisualStyleBackColor = true;
|
||||
|
|
@ -593,9 +592,9 @@
|
|||
//
|
||||
this.chbSalvar.AutoSize = true;
|
||||
this.chbSalvar.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chbSalvar.Location = new System.Drawing.Point(740, 44);
|
||||
this.chbSalvar.Location = new System.Drawing.Point(700, 45);
|
||||
this.chbSalvar.Name = "chbSalvar";
|
||||
this.chbSalvar.Size = new System.Drawing.Size(128, 24);
|
||||
this.chbSalvar.Size = new System.Drawing.Size(158, 29);
|
||||
this.chbSalvar.TabIndex = 7;
|
||||
this.chbSalvar.Text = "Personalizado";
|
||||
this.chbSalvar.UseVisualStyleBackColor = true;
|
||||
|
|
@ -619,7 +618,7 @@
|
|||
//
|
||||
this.txtDensidadeherbicida.Location = new System.Drawing.Point(18, 118);
|
||||
this.txtDensidadeherbicida.Name = "txtDensidadeherbicida";
|
||||
this.txtDensidadeherbicida.Size = new System.Drawing.Size(73, 29);
|
||||
this.txtDensidadeherbicida.Size = new System.Drawing.Size(73, 34);
|
||||
this.txtDensidadeherbicida.TabIndex = 15;
|
||||
this.txtDensidadeherbicida.Text = "1,1";
|
||||
this.txtDensidadeherbicida.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
|
|
@ -627,19 +626,20 @@
|
|||
// lblUnDensidadeherbicida
|
||||
//
|
||||
this.lblUnDensidadeherbicida.AutoSize = true;
|
||||
this.lblUnDensidadeherbicida.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblUnDensidadeherbicida.Location = new System.Drawing.Point(97, 121);
|
||||
this.lblUnDensidadeherbicida.Name = "lblUnDensidadeherbicida";
|
||||
this.lblUnDensidadeherbicida.Size = new System.Drawing.Size(57, 24);
|
||||
this.lblUnDensidadeherbicida.Size = new System.Drawing.Size(62, 25);
|
||||
this.lblUnDensidadeherbicida.TabIndex = 13;
|
||||
this.lblUnDensidadeherbicida.Text = "g/cm³";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(14, 92);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(162, 20);
|
||||
this.label2.Size = new System.Drawing.Size(190, 25);
|
||||
this.label2.TabIndex = 12;
|
||||
this.label2.Text = "Densidade herbicida";
|
||||
//
|
||||
|
|
@ -647,34 +647,45 @@
|
|||
//
|
||||
this.nudCapacidadereservatorio.Location = new System.Drawing.Point(18, 55);
|
||||
this.nudCapacidadereservatorio.Name = "nudCapacidadereservatorio";
|
||||
this.nudCapacidadereservatorio.Size = new System.Drawing.Size(73, 29);
|
||||
this.nudCapacidadereservatorio.Size = new System.Drawing.Size(73, 34);
|
||||
this.nudCapacidadereservatorio.TabIndex = 11;
|
||||
this.nudCapacidadereservatorio.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblUnCapcaidadereservatorio
|
||||
//
|
||||
this.lblUnCapcaidadereservatorio.AutoSize = true;
|
||||
this.lblUnCapcaidadereservatorio.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblUnCapcaidadereservatorio.Location = new System.Drawing.Point(97, 57);
|
||||
this.lblUnCapcaidadereservatorio.Name = "lblUnCapcaidadereservatorio";
|
||||
this.lblUnCapcaidadereservatorio.Size = new System.Drawing.Size(48, 24);
|
||||
this.lblUnCapcaidadereservatorio.Size = new System.Drawing.Size(52, 25);
|
||||
this.lblUnCapcaidadereservatorio.TabIndex = 10;
|
||||
this.lblUnCapcaidadereservatorio.Text = "litros";
|
||||
//
|
||||
// lblCapacidadereservatorio
|
||||
//
|
||||
this.lblCapacidadereservatorio.AutoSize = true;
|
||||
this.lblCapacidadereservatorio.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblCapacidadereservatorio.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblCapacidadereservatorio.Location = new System.Drawing.Point(14, 28);
|
||||
this.lblCapacidadereservatorio.Name = "lblCapacidadereservatorio";
|
||||
this.lblCapacidadereservatorio.Size = new System.Drawing.Size(191, 20);
|
||||
this.lblCapacidadereservatorio.Size = new System.Drawing.Size(225, 25);
|
||||
this.lblCapacidadereservatorio.TabIndex = 9;
|
||||
this.lblCapacidadereservatorio.Text = "Capacidade reservatório";
|
||||
//
|
||||
// lblAngulomax
|
||||
//
|
||||
this.lblAngulomax.AutoSize = true;
|
||||
this.lblAngulomax.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAngulomax.Location = new System.Drawing.Point(6, 67);
|
||||
this.lblAngulomax.Name = "lblAngulomax";
|
||||
this.lblAngulomax.Size = new System.Drawing.Size(104, 22);
|
||||
this.lblAngulomax.TabIndex = 13;
|
||||
this.lblAngulomax.Text = "Angulo Máx";
|
||||
//
|
||||
// frmParametrizacaoOperacao
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(14F, 29F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1020, 673);
|
||||
this.ClientSize = new System.Drawing.Size(1022, 683);
|
||||
this.Controls.Add(this.gpbConfiguracoesgerais);
|
||||
this.Controls.Add(this.chbSalvar);
|
||||
this.Controls.Add(this.btnSalvar);
|
||||
|
|
@ -748,10 +759,9 @@
|
|||
private System.Windows.Forms.Label lblQtdBicos;
|
||||
private System.Windows.Forms.GroupBox gpbP_Dir;
|
||||
private System.Windows.Forms.NumericUpDown nudVelocidadeMP;
|
||||
private System.Windows.Forms.Label lblVelocidadePercentual;
|
||||
private System.Windows.Forms.Label lblVelocidadeMP;
|
||||
private System.Windows.Forms.NumericUpDown nudAnguloMaximo;
|
||||
private System.Windows.Forms.Label lblAngulo;
|
||||
private System.Windows.Forms.Label lblAngulomin;
|
||||
private System.Windows.Forms.NumericUpDown nudAnguloMinimo;
|
||||
private System.Windows.Forms.CheckBox chbSalvar;
|
||||
private System.Windows.Forms.Label lblTemposalvarlogU;
|
||||
|
|
@ -767,5 +777,6 @@
|
|||
private System.Windows.Forms.NumericUpDown nudAtuarem;
|
||||
private System.Windows.Forms.Label lblAtuarem;
|
||||
private System.Windows.Forms.ComboBox cmbScriptErvas;
|
||||
private System.Windows.Forms.Label lblAngulomax;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
private void frmParametrizacaoOperacao_Load(object sender, EventArgs e)
|
||||
{
|
||||
cmbScriptErvas.Items.Clear();
|
||||
cmbScriptErvas.Items.AddRange(new string[] { "weed-detector", "green-detector" });
|
||||
cmbScriptErvas.Items.AddRange(new string[] { PythonService.ScriptWeedDetector.Replace(".py", ""), PythonService.ScriptGreenDetector.Replace(".py", "") });
|
||||
CarregarParametros();
|
||||
}
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
nudCapacidadereservatorio.Value = Convert.ToInt32(Variaveis.OperacaoEmAndamento.DispAtu.Dados.CapacidadeReservatorio);
|
||||
txtDensidadeherbicida.Text = Variaveis.OperacaoEmAndamento.DispAtu.Dados.DensidadeHerbicida.ToString("0.00");
|
||||
nudAtuarem.Value = Convert.ToInt32(Variaveis.OperacaoEmAndamento.DispAtu.Dados.PercentualInicioPulverizacao * 100);
|
||||
cmbScriptErvas.SelectedIndex = cmbScriptErvas.Items.IndexOf(PythonService.ScriptWeedDetector.Replace(".py", ""));
|
||||
cmbScriptErvas.SelectedIndex = cmbScriptErvas.Items.IndexOf(Variaveis.OperacaoEmAndamento.DispAtu.Dados.ScriptDeteccaoErvas.Replace(".py", ""));
|
||||
}
|
||||
|
||||
private void chbD_CheckedChanged(object sender, EventArgs e)
|
||||
|
|
@ -133,7 +133,7 @@ namespace AgroBase.Forms.Operacoes
|
|||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.CapacidadeReservatorio = (double)nudCapacidadereservatorio.Value;
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.DensidadeHerbicida = Convert.ToDouble(txtDensidadeherbicida.Text.Replace(".", ","));
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.PercentualInicioPulverizacao = (double)(nudAtuarem.Value / 100);
|
||||
PythonService.ScriptWeedDetector = cmbScriptErvas.Text + ".py";
|
||||
Variaveis.OperacaoEmAndamento.DispAtu.Dados.ScriptDeteccaoErvas = cmbScriptErvas.Text + ".py";
|
||||
|
||||
if (chbSalvar.Checked)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,10 +45,17 @@
|
|||
this.gridsPRS = new System.Windows.Forms.DataGridView();
|
||||
this.btnBateriaVer = new System.Windows.Forms.Button();
|
||||
this.cmbBateriaParametro = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.nudBateriaValor = new System.Windows.Forms.NumericUpDown();
|
||||
this.btnBateriaDefinir = new System.Windows.Forms.Button();
|
||||
this.gpbBateria = new System.Windows.Forms.GroupBox();
|
||||
this.gpbCameras = new System.Windows.Forms.GroupBox();
|
||||
this.lblCaminho = new System.Windows.Forms.Label();
|
||||
this.cmbCaminho = new System.Windows.Forms.ComboBox();
|
||||
this.lblSoloesq = new System.Windows.Forms.Label();
|
||||
this.cmbSoloEsq = new System.Windows.Forms.ComboBox();
|
||||
this.lblSolodir = new System.Windows.Forms.Label();
|
||||
this.cmbSoloDir = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridsTEN)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridsCOR)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridsTMP)).BeginInit();
|
||||
|
|
@ -57,13 +64,15 @@
|
|||
((System.ComponentModel.ISupportInitialize)(this.gridsMAS)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridsPRS)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudBateriaValor)).BeginInit();
|
||||
this.gpbBateria.SuspendLayout();
|
||||
this.gpbCameras.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// gridsTEN
|
||||
//
|
||||
this.gridsTEN.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridsTEN.Location = new System.Drawing.Point(20, 31);
|
||||
this.gridsTEN.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridsTEN.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gridsTEN.Name = "gridsTEN";
|
||||
this.gridsTEN.RowHeadersWidth = 51;
|
||||
this.gridsTEN.Size = new System.Drawing.Size(600, 153);
|
||||
|
|
@ -73,7 +82,7 @@
|
|||
//
|
||||
this.gridsCOR.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridsCOR.Location = new System.Drawing.Point(20, 207);
|
||||
this.gridsCOR.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridsCOR.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gridsCOR.Name = "gridsCOR";
|
||||
this.gridsCOR.RowHeadersWidth = 51;
|
||||
this.gridsCOR.Size = new System.Drawing.Size(600, 153);
|
||||
|
|
@ -83,7 +92,7 @@
|
|||
//
|
||||
this.btnSalvar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSalvar.Location = new System.Drawing.Point(1156, 682);
|
||||
this.btnSalvar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btnSalvar.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnSalvar.Name = "btnSalvar";
|
||||
this.btnSalvar.Size = new System.Drawing.Size(100, 28);
|
||||
this.btnSalvar.TabIndex = 3;
|
||||
|
|
@ -125,7 +134,7 @@
|
|||
//
|
||||
this.gridsTMP.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridsTMP.Location = new System.Drawing.Point(20, 383);
|
||||
this.gridsTMP.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridsTMP.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gridsTMP.Name = "gridsTMP";
|
||||
this.gridsTMP.RowHeadersWidth = 51;
|
||||
this.gridsTMP.Size = new System.Drawing.Size(600, 153);
|
||||
|
|
@ -145,7 +154,7 @@
|
|||
//
|
||||
this.gridsULT.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridsULT.Location = new System.Drawing.Point(20, 559);
|
||||
this.gridsULT.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridsULT.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gridsULT.Name = "gridsULT";
|
||||
this.gridsULT.RowHeadersWidth = 51;
|
||||
this.gridsULT.Size = new System.Drawing.Size(600, 153);
|
||||
|
|
@ -165,7 +174,7 @@
|
|||
//
|
||||
this.gridsFLX.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridsFLX.Location = new System.Drawing.Point(651, 207);
|
||||
this.gridsFLX.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridsFLX.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gridsFLX.Name = "gridsFLX";
|
||||
this.gridsFLX.RowHeadersWidth = 51;
|
||||
this.gridsFLX.Size = new System.Drawing.Size(600, 153);
|
||||
|
|
@ -185,7 +194,7 @@
|
|||
//
|
||||
this.gridsMAS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridsMAS.Location = new System.Drawing.Point(651, 383);
|
||||
this.gridsMAS.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridsMAS.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gridsMAS.Name = "gridsMAS";
|
||||
this.gridsMAS.RowHeadersWidth = 51;
|
||||
this.gridsMAS.Size = new System.Drawing.Size(600, 153);
|
||||
|
|
@ -205,7 +214,7 @@
|
|||
//
|
||||
this.gridsPRS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridsPRS.Location = new System.Drawing.Point(651, 31);
|
||||
this.gridsPRS.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridsPRS.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gridsPRS.Name = "gridsPRS";
|
||||
this.gridsPRS.RowHeadersWidth = 51;
|
||||
this.gridsPRS.Size = new System.Drawing.Size(600, 153);
|
||||
|
|
@ -213,11 +222,11 @@
|
|||
//
|
||||
// btnBateriaVer
|
||||
//
|
||||
this.btnBateriaVer.Location = new System.Drawing.Point(837, 586);
|
||||
this.btnBateriaVer.Location = new System.Drawing.Point(10, 67);
|
||||
this.btnBateriaVer.Name = "btnBateriaVer";
|
||||
this.btnBateriaVer.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnBateriaVer.Size = new System.Drawing.Size(180, 23);
|
||||
this.btnBateriaVer.TabIndex = 16;
|
||||
this.btnBateriaVer.Text = "Ver";
|
||||
this.btnBateriaVer.Text = "Ver valor";
|
||||
this.btnBateriaVer.UseVisualStyleBackColor = true;
|
||||
this.btnBateriaVer.Click += new System.EventHandler(this.btnBateriaVer_Click);
|
||||
//
|
||||
|
|
@ -225,25 +234,15 @@
|
|||
//
|
||||
this.cmbBateriaParametro.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbBateriaParametro.FormattingEnabled = true;
|
||||
this.cmbBateriaParametro.Location = new System.Drawing.Point(650, 586);
|
||||
this.cmbBateriaParametro.Location = new System.Drawing.Point(9, 37);
|
||||
this.cmbBateriaParametro.Name = "cmbBateriaParametro";
|
||||
this.cmbBateriaParametro.Size = new System.Drawing.Size(181, 24);
|
||||
this.cmbBateriaParametro.TabIndex = 17;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(648, 539);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(50, 16);
|
||||
this.label1.TabIndex = 18;
|
||||
this.label1.Text = "Bateria";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(648, 567);
|
||||
this.label2.Location = new System.Drawing.Point(7, 18);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(70, 16);
|
||||
|
|
@ -252,33 +251,115 @@
|
|||
//
|
||||
// nudBateriaValor
|
||||
//
|
||||
this.nudBateriaValor.Location = new System.Drawing.Point(651, 616);
|
||||
this.nudBateriaValor.Location = new System.Drawing.Point(10, 97);
|
||||
this.nudBateriaValor.Name = "nudBateriaValor";
|
||||
this.nudBateriaValor.Size = new System.Drawing.Size(105, 22);
|
||||
this.nudBateriaValor.Size = new System.Drawing.Size(85, 22);
|
||||
this.nudBateriaValor.TabIndex = 20;
|
||||
this.nudBateriaValor.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// btnBateriaDefinir
|
||||
//
|
||||
this.btnBateriaDefinir.Location = new System.Drawing.Point(837, 615);
|
||||
this.btnBateriaDefinir.Location = new System.Drawing.Point(101, 96);
|
||||
this.btnBateriaDefinir.Name = "btnBateriaDefinir";
|
||||
this.btnBateriaDefinir.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnBateriaDefinir.Size = new System.Drawing.Size(89, 23);
|
||||
this.btnBateriaDefinir.TabIndex = 21;
|
||||
this.btnBateriaDefinir.Text = "Definir";
|
||||
this.btnBateriaDefinir.UseVisualStyleBackColor = true;
|
||||
this.btnBateriaDefinir.Click += new System.EventHandler(this.btnBateriaDefinir_Click);
|
||||
//
|
||||
// gpbBateria
|
||||
//
|
||||
this.gpbBateria.Controls.Add(this.label2);
|
||||
this.gpbBateria.Controls.Add(this.btnBateriaDefinir);
|
||||
this.gpbBateria.Controls.Add(this.cmbBateriaParametro);
|
||||
this.gpbBateria.Controls.Add(this.nudBateriaValor);
|
||||
this.gpbBateria.Controls.Add(this.btnBateriaVer);
|
||||
this.gpbBateria.Location = new System.Drawing.Point(650, 559);
|
||||
this.gpbBateria.Name = "gpbBateria";
|
||||
this.gpbBateria.Size = new System.Drawing.Size(205, 149);
|
||||
this.gpbBateria.TabIndex = 22;
|
||||
this.gpbBateria.TabStop = false;
|
||||
this.gpbBateria.Text = "Bateria";
|
||||
//
|
||||
// gpbCameras
|
||||
//
|
||||
this.gpbCameras.Controls.Add(this.lblSolodir);
|
||||
this.gpbCameras.Controls.Add(this.cmbSoloDir);
|
||||
this.gpbCameras.Controls.Add(this.lblSoloesq);
|
||||
this.gpbCameras.Controls.Add(this.cmbSoloEsq);
|
||||
this.gpbCameras.Controls.Add(this.lblCaminho);
|
||||
this.gpbCameras.Controls.Add(this.cmbCaminho);
|
||||
this.gpbCameras.Location = new System.Drawing.Point(861, 559);
|
||||
this.gpbCameras.Name = "gpbCameras";
|
||||
this.gpbCameras.Size = new System.Drawing.Size(263, 149);
|
||||
this.gpbCameras.TabIndex = 23;
|
||||
this.gpbCameras.TabStop = false;
|
||||
this.gpbCameras.Text = "Câmeras";
|
||||
//
|
||||
// lblCaminho
|
||||
//
|
||||
this.lblCaminho.AutoSize = true;
|
||||
this.lblCaminho.Location = new System.Drawing.Point(7, 40);
|
||||
this.lblCaminho.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblCaminho.Name = "lblCaminho";
|
||||
this.lblCaminho.Size = new System.Drawing.Size(60, 16);
|
||||
this.lblCaminho.TabIndex = 21;
|
||||
this.lblCaminho.Text = "Caminho";
|
||||
//
|
||||
// cmbCaminho
|
||||
//
|
||||
this.cmbCaminho.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbCaminho.FormattingEnabled = true;
|
||||
this.cmbCaminho.Location = new System.Drawing.Point(74, 37);
|
||||
this.cmbCaminho.Name = "cmbCaminho";
|
||||
this.cmbCaminho.Size = new System.Drawing.Size(181, 24);
|
||||
this.cmbCaminho.TabIndex = 20;
|
||||
//
|
||||
// lblSoloesq
|
||||
//
|
||||
this.lblSoloesq.AutoSize = true;
|
||||
this.lblSoloesq.Location = new System.Drawing.Point(7, 75);
|
||||
this.lblSoloesq.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblSoloesq.Name = "lblSoloesq";
|
||||
this.lblSoloesq.Size = new System.Drawing.Size(65, 16);
|
||||
this.lblSoloesq.TabIndex = 23;
|
||||
this.lblSoloesq.Text = "Solo Esq.";
|
||||
//
|
||||
// cmbSolodEsq
|
||||
//
|
||||
this.cmbSoloEsq.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbSoloEsq.FormattingEnabled = true;
|
||||
this.cmbSoloEsq.Location = new System.Drawing.Point(74, 67);
|
||||
this.cmbSoloEsq.Name = "cmbSolodEsq";
|
||||
this.cmbSoloEsq.Size = new System.Drawing.Size(181, 24);
|
||||
this.cmbSoloEsq.TabIndex = 22;
|
||||
//
|
||||
// lblSolodir
|
||||
//
|
||||
this.lblSolodir.AutoSize = true;
|
||||
this.lblSolodir.Location = new System.Drawing.Point(7, 105);
|
||||
this.lblSolodir.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblSolodir.Name = "lblSolodir";
|
||||
this.lblSolodir.Size = new System.Drawing.Size(58, 16);
|
||||
this.lblSolodir.TabIndex = 25;
|
||||
this.lblSolodir.Text = "Solo Dir.";
|
||||
//
|
||||
// cmbSoloDir
|
||||
//
|
||||
this.cmbSoloDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbSoloDir.FormattingEnabled = true;
|
||||
this.cmbSoloDir.Location = new System.Drawing.Point(74, 97);
|
||||
this.cmbSoloDir.Name = "cmbSoloDir";
|
||||
this.cmbSoloDir.Size = new System.Drawing.Size(181, 24);
|
||||
this.cmbSoloDir.TabIndex = 24;
|
||||
//
|
||||
// frmSenConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1272, 720);
|
||||
this.Controls.Add(this.btnBateriaDefinir);
|
||||
this.Controls.Add(this.nudBateriaValor);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.btnBateriaVer);
|
||||
this.Controls.Add(this.cmbBateriaParametro);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.gpbCameras);
|
||||
this.Controls.Add(this.gpbBateria);
|
||||
this.Controls.Add(this.lblUltrassom);
|
||||
this.Controls.Add(this.gridsPRS);
|
||||
this.Controls.Add(this.lblMassa);
|
||||
|
|
@ -294,7 +375,7 @@
|
|||
this.Controls.Add(this.gridsCOR);
|
||||
this.Controls.Add(this.gridsTEN);
|
||||
this.Controls.Add(this.btnSalvar);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Name = "frmSenConfig";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Sensoriamento - Parametrização";
|
||||
|
|
@ -308,6 +389,10 @@
|
|||
((System.ComponentModel.ISupportInitialize)(this.gridsMAS)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridsPRS)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudBateriaValor)).EndInit();
|
||||
this.gpbBateria.ResumeLayout(false);
|
||||
this.gpbBateria.PerformLayout();
|
||||
this.gpbCameras.ResumeLayout(false);
|
||||
this.gpbCameras.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
@ -331,9 +416,16 @@
|
|||
private System.Windows.Forms.DataGridView gridsPRS;
|
||||
private System.Windows.Forms.Button btnBateriaVer;
|
||||
private System.Windows.Forms.ComboBox cmbBateriaParametro;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.NumericUpDown nudBateriaValor;
|
||||
private System.Windows.Forms.Button btnBateriaDefinir;
|
||||
private System.Windows.Forms.GroupBox gpbBateria;
|
||||
private System.Windows.Forms.GroupBox gpbCameras;
|
||||
private System.Windows.Forms.Label lblSolodir;
|
||||
private System.Windows.Forms.ComboBox cmbSoloDir;
|
||||
private System.Windows.Forms.Label lblSoloesq;
|
||||
private System.Windows.Forms.ComboBox cmbSoloEsq;
|
||||
private System.Windows.Forms.Label lblCaminho;
|
||||
private System.Windows.Forms.ComboBox cmbCaminho;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@ namespace AgroBase.Forms.Sensoriamento
|
|||
IDispositivosService Disp = null;
|
||||
public T_Code Dispositivo = T_Code.Sen;
|
||||
List<SensorModel> Sensores = new List<SensorModel>();
|
||||
Dictionary<string, string> Cameras = new Dictionary<string, string>();
|
||||
|
||||
int ParametrosComecamEm = 3;
|
||||
|
||||
|
|
@ -58,6 +59,23 @@ namespace AgroBase.Forms.Sensoriamento
|
|||
cmbBateriaParametro.Items.Clear();
|
||||
cmbBateriaParametro.Items.AddRange(PZEMService.Parametros.Keys.ToArray());
|
||||
cmbBateriaParametro.SelectedIndex = 0;
|
||||
|
||||
if (Disp != null && Disp.Dispositivo == T_Code.Sen)
|
||||
{
|
||||
Cameras = CameraService.AtualizaListaCameras();
|
||||
cmbCaminho.Items.Clear();
|
||||
cmbCaminho.Items.AddRange(Cameras.Values.ToArray());
|
||||
cmbCaminho.SelectedIndex = cmbCaminho.Items.IndexOf(((SensoriamentoModel)Disp.Dados).CameraID_Caminho);
|
||||
|
||||
cmbSoloEsq.Items.Clear();
|
||||
cmbSoloEsq.Items.AddRange(Cameras.Values.ToArray());
|
||||
cmbSoloEsq.SelectedIndex = cmbCaminho.Items.IndexOf(((SensoriamentoModel)Disp.Dados).CameraID_SoloE);
|
||||
|
||||
cmbSoloDir.Items.Clear();
|
||||
cmbSoloDir.Items.AddRange(Cameras.Values.ToArray());
|
||||
cmbSoloDir.SelectedIndex = cmbCaminho.Items.IndexOf(((SensoriamentoModel)Disp.Dados).CameraID_SoloD);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void PopulaParametrosSensor()
|
||||
|
|
@ -146,6 +164,9 @@ namespace AgroBase.Forms.Sensoriamento
|
|||
{
|
||||
var _Disp = (DispositivosService<SensoriamentoModel>)Variaveis.DispositivosConectados.FirstOrDefault(x => x.Dispositivo == Dispositivo);
|
||||
_Disp.Dados.Sensores = Sensores.ToList();
|
||||
_Disp.Dados.CameraID_Caminho = cmbCaminho.Text;
|
||||
_Disp.Dados.CameraID_SoloE = cmbSoloEsq.Text;
|
||||
_Disp.Dados.CameraID_SoloD = cmbSoloDir.Text;
|
||||
_Disp.SalvarParametros(_Disp.Dados);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,11 +102,21 @@ namespace AgroBase.Forms
|
|||
|
||||
Funcoes = SensoriamentoModel.Funcoes.ToList();
|
||||
Pinout = SensoriamentoModel.Pinout.ToList();
|
||||
Dispositivos = Disp.Dados.Sensores.Select(x => new DispositivoDataModel()
|
||||
Dispositivos.Add(new DispositivoDataModel()
|
||||
{
|
||||
ID = "",
|
||||
Funcoes = Funcoes
|
||||
});
|
||||
Dispositivos.AddRange(Disp.Dados.Sensores.Select(x => new DispositivoDataModel()
|
||||
{
|
||||
ID = x.ID,
|
||||
Funcoes = x.Funcoes
|
||||
}).ToList();
|
||||
}));
|
||||
Dispositivos.AddRange(Disp.Dados.Sinaleiros.Select(x => new DispositivoDataModel()
|
||||
{
|
||||
ID = x.ID,
|
||||
Funcoes = x.Funcoes
|
||||
}));
|
||||
break;
|
||||
}
|
||||
case T_Code.Atu:
|
||||
|
|
|
|||
|
|
@ -149,6 +149,16 @@ namespace AgroBase
|
|||
Variaveis.DispositivosConectados.Where(x => x.Dados.GetStatusConexao()).ToList().ForEach(x => x.AcaoDesconectar());
|
||||
}
|
||||
SerialService.RealizarVarreduraPortasUSB();
|
||||
|
||||
if (
|
||||
Variaveis.OperacaoEmAndamento.DispAtu == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Atu) ||
|
||||
Variaveis.OperacaoEmAndamento.DispDir == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Dir) ||
|
||||
Variaveis.OperacaoEmAndamento.DispMov == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Mov) ||
|
||||
Variaveis.OperacaoEmAndamento.DispSen == null && Variaveis.DispositivosConectados.Any(x => x.Dispositivo == T_Code.Sen)
|
||||
)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento = OperacaoModel.CarregarParametrosOperacaoPadrao((ModoOperacao)cmbModoOperacao.SelectedIndex);
|
||||
}
|
||||
}
|
||||
|
||||
private void frmPrincipal_FormClosed(object sender, FormClosedEventArgs e)
|
||||
|
|
@ -271,10 +281,10 @@ namespace AgroBase
|
|||
if (Variaveis.OperacaoEmAndamento.OperacaoLiberada)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.frmOperacao = (Form)Activator.CreateInstance(Variaveis.OperacaoEmAndamento.frmOperacao.GetType());
|
||||
if (Variaveis.OperacaoEmAndamento.Modo == ModoOperacao.Manual)
|
||||
/*if (Variaveis.OperacaoEmAndamento.Modo == ModoOperacao.Manual)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.Iniciado = true;
|
||||
}
|
||||
}*/
|
||||
Variaveis.OperacaoEmAndamento.frmOperacao.Show();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ namespace AgroBase.Models
|
|||
sPRS = 333,
|
||||
sMAG = 855,
|
||||
sBMB = 325,
|
||||
sLED = 445,
|
||||
}
|
||||
|
||||
public enum BotoesJoystick
|
||||
|
|
@ -147,5 +148,12 @@ namespace AgroBase.Models
|
|||
Joystick
|
||||
}
|
||||
|
||||
public enum StatusLED
|
||||
{
|
||||
Apagado = 0,
|
||||
Aceso = 1,
|
||||
Piscando = 2
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ namespace AgroBase.Models
|
|||
{
|
||||
mapaService.CarregarMapa(MapasVariaveisModel.NomeArquivoMapaInterativo, MapasVariaveisModel.NomeArquivoMapaInterativoSaida);
|
||||
|
||||
if (mapaService.MapaUrl != "")
|
||||
{
|
||||
if (picLoading == null)
|
||||
{
|
||||
picLoading = new PictureBox();
|
||||
|
|
@ -43,9 +45,20 @@ namespace AgroBase.Models
|
|||
tmr.Tick += Tmr_Tick;
|
||||
tmr.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public void CarregarMapaGPS()
|
||||
{
|
||||
if (picLoading == null)
|
||||
{
|
||||
picLoading = new PictureBox()
|
||||
{
|
||||
SizeMode = PictureBoxSizeMode.Zoom,
|
||||
Location = new System.Drawing.Point(0, 0),
|
||||
Size = new System.Drawing.Size(pnlMapa.Width, pnlMapa.Height)
|
||||
};
|
||||
pnlMapa.Controls.Add(picLoading);
|
||||
}
|
||||
mapaService.CarregarMapaGPS(MapasVariaveisModel.NomeArquivoMapaGPS);
|
||||
Timer tmr = new Timer() { Interval = 500 };
|
||||
tmr.Tick += Tmr_Tick;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace AgroBase.Models.Modules
|
|||
FuncoesPinout.SDA,
|
||||
FuncoesPinout.SCL,
|
||||
};
|
||||
public int QuantidadeBicos { get; set; } = 10;
|
||||
public int QuantidadeBicos { get; set; } = 4;
|
||||
public double DensidadeHerbicida { get; set; } = 1.1;
|
||||
public double CapacidadeReservatorio { get; set; } = 30;
|
||||
public bool AtuacaoNivelAlto { get; set; } = true;
|
||||
|
|
@ -29,6 +29,7 @@ namespace AgroBase.Models.Modules
|
|||
public AtuadorBombaModel BombaPressurizadora { get; set; } = new AtuadorBombaModel();
|
||||
public List<SensorModel> Sensores { get; set; } = new List<SensorModel>();
|
||||
public double PercentualInicioPulverizacao { get; set; } = 0.3;
|
||||
public string ScriptDeteccaoErvas { get; set; } = PythonService.ScriptWeedDetector;
|
||||
|
||||
#region MASSA
|
||||
public double _MassaRef { get; set; } = 0.8;
|
||||
|
|
@ -584,5 +585,60 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
}
|
||||
|
||||
public class CalibragemVazao
|
||||
{
|
||||
public bool Calibrando { get; set; } = false;
|
||||
public DateTime IniciadoEm { get; set; }
|
||||
public double TempoCalibragem { get; set; } = 10000.0;
|
||||
public double VolumeComputado { get; set; } = 0;
|
||||
public List<double> PressoesAferidas { get; set; } = new List<double>();
|
||||
public double MassaInicial { get; set; } = 0.0;
|
||||
public double MassaFinal { get; set; } = 0.0;
|
||||
public int QtdPulsos { get; set; } = 0;
|
||||
public double Periodo { get; set; } = 0.0;
|
||||
public double PressaoMedia
|
||||
{
|
||||
get
|
||||
{
|
||||
return PressoesAferidas.Average();
|
||||
}
|
||||
}
|
||||
public double MassaPerdida
|
||||
{
|
||||
get
|
||||
{
|
||||
return (MassaInicial - MassaFinal) * 1000;
|
||||
}
|
||||
}
|
||||
public double Q
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)VolumeComputado / (double)Periodo;
|
||||
}
|
||||
}
|
||||
public double VolumeCalculado { get; set; } = 0.0;
|
||||
public double d
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)MassaPerdida / (double)VolumeComputado;
|
||||
}
|
||||
}
|
||||
public double x
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)VolumeComputado / (double)QtdPulsos;
|
||||
}
|
||||
}
|
||||
public double Q2
|
||||
{
|
||||
get
|
||||
{
|
||||
return (double)x * (double)QtdPulsos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@ namespace AgroBase.Models.Modules
|
|||
CS,
|
||||
INA,
|
||||
INB,
|
||||
Sinaleiro,
|
||||
}
|
||||
|
||||
public static class PinoutUtils
|
||||
|
|
|
|||
|
|
@ -23,12 +23,49 @@ namespace AgroBase.Models.Modules
|
|||
FuncoesPinout.SCL,
|
||||
};
|
||||
public List<SensorModel> Sensores { get; set; }
|
||||
public List<SensorSinaleiroModel> Sinaleiros { get; set; }
|
||||
public string CameraID_Caminho { get; set; }
|
||||
public string CameraID_SoloE { get; set; }
|
||||
public string CameraID_SoloD { get; set; }
|
||||
|
||||
|
||||
public static SensoriamentoModel CarregarParametrosIniciais()
|
||||
{
|
||||
return new SensoriamentoModel()
|
||||
{
|
||||
Sinaleiros = new List<SensorSinaleiroModel>()
|
||||
{
|
||||
new SensorSinaleiroModel()
|
||||
{
|
||||
ID = "LEDMN",
|
||||
Descricao = "Sinaleiro indicação de modo Manual ativo",
|
||||
Componente = S_Code.sLED,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.Sinaleiro,
|
||||
}
|
||||
},
|
||||
new SensorSinaleiroModel()
|
||||
{
|
||||
ID = "LEDAT",
|
||||
Descricao = "Sinaleiro indicação de modo Automático ativo",
|
||||
Componente = S_Code.sLED,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.Sinaleiro,
|
||||
}
|
||||
},
|
||||
new SensorSinaleiroModel()
|
||||
{
|
||||
ID = "LEDOP",
|
||||
Descricao = "Sinaleiro indicação do status da operação ativa",
|
||||
Componente = S_Code.sLED,
|
||||
Funcoes = new List<FuncoesPinout>()
|
||||
{
|
||||
FuncoesPinout.Sinaleiro,
|
||||
}
|
||||
},
|
||||
},
|
||||
Sensores = new List<SensorModel>()
|
||||
{
|
||||
new SensorModel()
|
||||
|
|
@ -353,6 +390,7 @@ namespace AgroBase.Models.Modules
|
|||
public List<string> ProtocoloConfiguracao(bool Conectar)
|
||||
{
|
||||
List<string> Config = Sensores.Select(x => x.ProtocoloConfiguracaoSensor(Pinout, Conectar)).ToList();
|
||||
Config.AddRange(Sinaleiros.Select(x => x.ProtocoloConfiguracaoSinaleiro(Pinout, Conectar)).ToList());
|
||||
string ProtocoloMOD = ((int)F_Code.Cfg).ToString() +
|
||||
"MD".PadRight(5, ' ') + ";" + // 0 ~ 4
|
||||
(Conectar ? "1" : "0") + ";" + // 6
|
||||
|
|
@ -683,6 +721,48 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
}
|
||||
|
||||
public class SensorSinaleiroModel
|
||||
{
|
||||
public string ID { get; set; }
|
||||
public string Descricao { get; set; }
|
||||
public S_Code Componente { get; set; }
|
||||
public List<FuncoesPinout> Funcoes { get; set; }
|
||||
public SensorSinaleiroComportamentoModel Comportamento { get; set; }
|
||||
|
||||
public string ProtocoloConfiguracaoSinaleiro(List<PinoutModel> Pinout, bool Conectar)
|
||||
{
|
||||
var _pinout = Pinout.Where(x => x.ComponenteID == ID).ToList();
|
||||
string Protocolo = ((int)F_Code.Cfg).ToString() +
|
||||
ID.PadRight(5, ' ') + ";" + // 0 ~ 4
|
||||
(Conectar ? "1" : "0") + ";" + // 6
|
||||
(_pinout.Any(x => x.Funcao != FuncoesPinout.NaoConectado) ? _pinout.FirstOrDefault(x => x.Funcao != FuncoesPinout.NaoConectado).Pino.ToString("00") : "-1"); // 8 ~ 9
|
||||
return Protocolo;
|
||||
}
|
||||
|
||||
public string ProtocoloComando()
|
||||
{
|
||||
string ProtocoloSinaleiro =
|
||||
((int)F_Code.Cmd).ToString() +
|
||||
ID.PadRight(5, ' ') + ";" + // 0 ~ 4
|
||||
(int)Comportamento.statusLED + ";" + // 6
|
||||
Comportamento.QtdPiscadas.ToString() + ";" + // 8
|
||||
Comportamento.TempoMs.ToString("0000") + ";" + // 10 ~ 13
|
||||
Comportamento.PausaMs.ToString("0000"); // 15 ~ 18
|
||||
|
||||
return ProtocoloSinaleiro;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SensorSinaleiroComportamentoModel
|
||||
{
|
||||
public StatusLED statusLED { get; set; }
|
||||
public int QtdPiscadas { get; set; } = 0;
|
||||
public int TempoMs { get; set; } = 0;
|
||||
public int PausaMs { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class SenSensorimanetoGrafico
|
||||
{
|
||||
public DateTime Momento { get; set; }
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using AgroBase.Services;
|
|||
using CefSharp.DevTools.Network;
|
||||
using Emgu.CV.CvEnum;
|
||||
using Newtonsoft.Json;
|
||||
using OpenTK.Graphics.ES11;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
|
@ -70,6 +71,7 @@ namespace AgroBase.Models
|
|||
}
|
||||
this.tmrLogs.Tick -= TmrLogs_Tick;
|
||||
this.tmrLogs.Tick += TmrLogs_Tick;
|
||||
this.tmrLogs.Start();
|
||||
/*this.tmrParametrizacao.Tick -= TmrParametrizacao_Tick;
|
||||
this.tmrParametrizacao.Tick += TmrParametrizacao_Tick;
|
||||
|
||||
|
|
@ -200,7 +202,7 @@ namespace AgroBase.Models
|
|||
switch (Modo)
|
||||
{
|
||||
case ModoOperacao.Manual:
|
||||
OperacaoCarregar.frmOperacao = new frmAcompanhamento();
|
||||
OperacaoCarregar.frmOperacao = new frmOperacaoManual();
|
||||
OperacaoCarregar.Controle = new OperacaoControleModel()
|
||||
{
|
||||
TiposControle = new List<OperacaoControleTipoModel>()
|
||||
|
|
@ -334,6 +336,17 @@ namespace AgroBase.Models
|
|||
}
|
||||
}
|
||||
|
||||
if (OperacaoCarregar.DispSen != null && OperacaoCarregar.DispSen.Dados.Conectado)
|
||||
{
|
||||
OperacaoCarregar.DispSen.Dados.Sinaleiros.ForEach(x => x.Comportamento = Variaveis.ComportamentoPorStatus(StatusOperacao.Concluida));
|
||||
|
||||
SensorSinaleiroModel Sinaleiro = OperacaoCarregar.DispSen.Dados.Sinaleiros.First(x => x.ID == (Modo == ModoOperacao.Manual ? "LEDMN" : "LEDAT"));
|
||||
Sinaleiro.Comportamento.statusLED = StatusLED.Aceso;
|
||||
|
||||
OperacaoCarregar.DispSen.Dados.Sinaleiros.ForEach(x => OperacaoCarregar.DispSen.EnviarDadosSerial(x.ProtocoloComando()));
|
||||
}
|
||||
|
||||
|
||||
return OperacaoCarregar;
|
||||
}
|
||||
|
||||
|
|
@ -418,14 +431,15 @@ namespace AgroBase.Models
|
|||
{
|
||||
Controle = controle;
|
||||
}
|
||||
if (DaIHM)
|
||||
{
|
||||
frmOperacao = new frmOperacaoMapaGPS();
|
||||
frmOperacao.Show();
|
||||
}
|
||||
|
||||
tmrLogs.Start();
|
||||
//tmrParametrizacao.Stop();
|
||||
|
||||
if (DispAtu.Dados.BombaPressurizadora.Inicializado)
|
||||
{
|
||||
DispAtu.Dados.BombaPressurizadora.BombaAtuada = true;
|
||||
string Protocolo = DispAtu.Dados.BombaPressurizadora.ProtocoloComando();
|
||||
DispAtu.EnviarDadosSerial(Protocolo);
|
||||
}
|
||||
}
|
||||
|
||||
public void FinalizarOperacao()
|
||||
|
|
@ -433,16 +447,24 @@ namespace AgroBase.Models
|
|||
Controle.Angulo = 0;
|
||||
Controle.RPM = 0;
|
||||
AtualizarDadosControle();
|
||||
if (DispAtu.Dados.BombaPressurizadora.Inicializado)
|
||||
{
|
||||
DispAtu.Dados.BombaPressurizadora.BombaAtuada = false;
|
||||
string Protocolo = DispAtu.Dados.BombaPressurizadora.ProtocoloComando();
|
||||
DispAtu.EnviarDadosSerial(Protocolo);
|
||||
}
|
||||
|
||||
Iniciado = false;
|
||||
TimestampFim = DateTime.Now.Ticks;
|
||||
|
||||
tmrLogs.Stop();
|
||||
//tmrLogs.Stop();
|
||||
//tmrParametrizacao.Start();
|
||||
|
||||
SalvarLog(true);
|
||||
|
||||
GPSService.PararRecepcaoDados();
|
||||
|
||||
AtualizarSinaleiroOperacao();
|
||||
}
|
||||
|
||||
public void AtualizarDadosControle()
|
||||
|
|
@ -756,10 +778,15 @@ namespace AgroBase.Models
|
|||
|
||||
|
||||
private void TmrLogs_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (Iniciado)
|
||||
{
|
||||
SalvarLog(false);
|
||||
}
|
||||
|
||||
AtualizarSinaleiroOperacao();
|
||||
}
|
||||
|
||||
public void AtualizarRuasSelecionadas()
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
|
|
@ -778,6 +805,15 @@ namespace AgroBase.Models
|
|||
}
|
||||
}
|
||||
|
||||
public void AtualizarSinaleiroOperacao()
|
||||
{
|
||||
if (DispSen != null && DispSen.Dados.Conectado)
|
||||
{
|
||||
var Sinaleiro = DispSen.Dados.Sinaleiros.FirstOrDefault(x => x.ID == "LEDOP");
|
||||
Sinaleiro.Comportamento = Variaveis.ComportamentoPorStatus();
|
||||
DispSen.EnviarDadosSerial(Sinaleiro.ProtocoloComando());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -904,6 +940,11 @@ namespace AgroBase.Models
|
|||
etapaAtual = _EtapaAnteriorParada;
|
||||
_EtapaAnteriorParada = StatusOperacao.Parado;
|
||||
}
|
||||
// Se o modo de operação for Manual, sempre estará no status CaminhandoRua
|
||||
else if (Variaveis.OperacaoEmAndamento.Modo == ModoOperacao.Manual)
|
||||
{
|
||||
etapaAtual = StatusOperacao.CaminhandoRua;
|
||||
}
|
||||
// Robô está manobrando para seguir a próxima rota do mapa
|
||||
else if (_EtapaAtual == StatusOperacao.Manobrando)
|
||||
{
|
||||
|
|
@ -972,14 +1013,22 @@ namespace AgroBase.Models
|
|||
public double AnguloCarro
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispSen._Porta.IsOpen && Variaveis.OperacaoEmAndamento.DispSen.Dados.Sensores.Any(x => x.Componente == S_Code.sMAG && x.Inicializado))
|
||||
{
|
||||
return Variaveis.OperacaoEmAndamento.Sensoriamento.AnguloCarroBussola;
|
||||
}
|
||||
else
|
||||
{
|
||||
return AnguloCarroGPS;
|
||||
}
|
||||
}
|
||||
}
|
||||
public double AnguloCarroGPS
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
double somaAngulo = 0;
|
||||
var Pontos = !Variaveis.OperacaoEmAndamento.GPSTrajetoriaRua.Any() ? new List<GPSModel>() :
|
||||
|
|
@ -995,7 +1044,6 @@ namespace AgroBase.Models
|
|||
|
||||
return (!(mediaAngulo >= 0 || mediaAngulo <= 0)) ? 0 : mediaAngulo;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using AgroBase.Comum;
|
||||
using AgroBase.Models.Modules;
|
||||
using AgroBase.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -16,6 +17,97 @@ namespace AgroBase.Models
|
|||
public static OperacaoModel OperacaoEmAndamento { get; set; } = new OperacaoModel(ModoOperacao.Manual);
|
||||
public static MqttService MqttService { get; set; } = new MqttService("localhost", 1883);
|
||||
public static List<T_Code> DispositivosConexaoInicial = new List<T_Code>() { T_Code.Dir, T_Code.Mov, T_Code.Atu, T_Code.Sen };
|
||||
public static SensorSinaleiroComportamentoModel ComportamentoPorStatus(StatusOperacao? _status = null)
|
||||
{
|
||||
if (_status == null)
|
||||
{
|
||||
_status = OperacaoEmAndamento.ReferencialRuaGPS.StatusAtual;
|
||||
}
|
||||
|
||||
SensorSinaleiroComportamentoModel comportamento = new SensorSinaleiroComportamentoModel()
|
||||
{
|
||||
statusLED = StatusLED.Apagado,
|
||||
QtdPiscadas = 0,
|
||||
TempoMs = 0,
|
||||
PausaMs = 0,
|
||||
};
|
||||
|
||||
switch (_status)
|
||||
{
|
||||
case StatusOperacao.Parametrizando:
|
||||
{
|
||||
comportamento = new SensorSinaleiroComportamentoModel()
|
||||
{
|
||||
statusLED = StatusLED.Aceso,
|
||||
QtdPiscadas = 0,
|
||||
TempoMs = 0,
|
||||
PausaMs = 0,
|
||||
};
|
||||
break;
|
||||
}
|
||||
case StatusOperacao.Concluida:
|
||||
{
|
||||
comportamento = new SensorSinaleiroComportamentoModel()
|
||||
{
|
||||
statusLED = StatusLED.Apagado,
|
||||
QtdPiscadas = 0,
|
||||
TempoMs = 0,
|
||||
PausaMs = 0,
|
||||
};
|
||||
break;
|
||||
}
|
||||
case StatusOperacao.Aguardando:
|
||||
case StatusOperacao.Retornando:
|
||||
{
|
||||
comportamento = new SensorSinaleiroComportamentoModel()
|
||||
{
|
||||
statusLED = StatusLED.Piscando,
|
||||
QtdPiscadas = 1,
|
||||
TempoMs = 1000,
|
||||
PausaMs = 0,
|
||||
};
|
||||
break;
|
||||
}
|
||||
case StatusOperacao.Parado:
|
||||
{
|
||||
comportamento = new SensorSinaleiroComportamentoModel()
|
||||
{
|
||||
statusLED = StatusLED.Piscando,
|
||||
QtdPiscadas = 1,
|
||||
TempoMs = 2000,
|
||||
PausaMs = 0,
|
||||
};
|
||||
break;
|
||||
}
|
||||
case StatusOperacao.CaminhandoRua:
|
||||
{
|
||||
comportamento = new SensorSinaleiroComportamentoModel()
|
||||
{
|
||||
statusLED = StatusLED.Piscando,
|
||||
QtdPiscadas = 3,
|
||||
TempoMs = 400,
|
||||
PausaMs = 1000,
|
||||
};
|
||||
break;
|
||||
}
|
||||
case StatusOperacao.EntrandoRua:
|
||||
case StatusOperacao.SaindoRua:
|
||||
case StatusOperacao.Manobrando:
|
||||
{
|
||||
comportamento = new SensorSinaleiroComportamentoModel()
|
||||
{
|
||||
statusLED = StatusLED.Piscando,
|
||||
QtdPiscadas = 2,
|
||||
TempoMs = 500,
|
||||
PausaMs = 1000,
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return comportamento;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class FuncoesGlobais
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace AgroBase.Services
|
|||
try
|
||||
{
|
||||
CamerasConectadas.Clear();
|
||||
CamerasConectadas.Add("Sem vídeo", "0");
|
||||
CamerasConectadas.Add("Sem vídeo", "Sem video");
|
||||
using (var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PnPEntity WHERE (PNPClass = 'Camera')")) // PNPClass = 'Image' OR PNPClass = 'Camera')
|
||||
{
|
||||
int i = 0;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ namespace AgroBase.Services
|
|||
|
||||
public static string ScriptAPI = "api.py";
|
||||
public static string ScriptWeedDetector = "weed-detector.py";
|
||||
public static string ScriptGreenDetector = "green-detector.py";
|
||||
public static string ScriptStreetDetector = "street-detector.py";
|
||||
public static string ScriptMapConverter = "map-load.py";
|
||||
public static string ScriptLineAngle = "line-angle2.py";
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":-22.339442335994335,"Longitude":-47.264067138109773,"DataHora":"2024-04-01T13:48:08.9379439-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339442335994335,"Longitude":-47.264067138109773,"DataHora":"2024-04-01T13:48:13.961568-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339566770425247,"Longitude":-47.263998524140789,"DataHora":"2024-04-01T13:48:19.0473246-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339649665078522,"Longitude":-47.263954035496013,"DataHora":"2024-04-01T13:48:24.0853291-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-01T13:48:29.092466-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-01T13:48:34.1179918-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-01T13:48:39.1345288-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-01T13:48:44.1566232-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-01T13:48:49.1789915-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-01T13:48:53.1966225-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":-22.339442335994335,"Longitude":-47.264067138109773,"DataHora":"2024-04-02T07:48:58.8226163-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339442335994335,"Longitude":-47.264067138109773,"DataHora":"2024-04-02T07:49:03.883148-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339442335994335,"Longitude":-47.264067138109773,"DataHora":"2024-04-02T07:49:08.8885708-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339583249992106,"Longitude":-47.26398959993972,"DataHora":"2024-04-02T07:49:13.9181611-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339689742622607,"Longitude":-47.26393281077209,"DataHora":"2024-04-02T07:49:18.9261227-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-02T07:49:23.9564228-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-02T07:49:28.964244-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-02T07:49:33.9919888-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-02T07:49:38.986174-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-02T07:49:38.986174-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":-22.339797742622608,"Longitude":-47.263905810772087,"DataHora":"2024-04-02T07:49:46.0362662-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T11:04:20.9480698-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T11:04:23.0989535-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":1,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T11:04:25.967947-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T11:04:27.5977386-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":1,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T11:06:24.8382992-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T11:06:29.8543603-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T11:06:34.6576021-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}],{"Momento":"2024-04-02T11:06:40.452662-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T11:09:11.2584509-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T11:09:16.2796536-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T11:09:21.2863504-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T11:09:21.3897964-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}],{"Momento":"2024-04-02T11:09:24.1786849-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T14:58:54.7265607-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T14:58:59.7314411-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T14:59:01.2349807-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}],{"Momento":"2024-04-02T14:59:03.9288262-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T14:59:47.1549117-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T14:59:52.174832-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T14:59:54.9045611-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}],{"Momento":"2024-04-02T15:00:01.0143222-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T15:04:56.9923018-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:05:01.9935843-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:05:07.0023018-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:05:07.1285254-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}],{"Momento":"2024-04-02T15:05:11.3727128-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":8,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Momento":"2024-04-02T15:11:12.1041616-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:17.1235188-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":2,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:22.1316916-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":4,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:27.1313767-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":4,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:32.1408251-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":4,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:37.1492714-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":4,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:42.1517313-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":4,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:47.1490688-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":4,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0},{"Momento":"2024-04-02T15:11:51.3569864-03:00","ErvasNoRadar":0,"VelocidadeMedia":0.0,"HerbicidaConsumido":0.0,"HerbicidaPorErva":0.0,"PorcentagemBateria":0.0,"BateriaConsumida":0.0,"ErvasIdentificadas":0,"AtuacoesPorBico":[0,0,0,0],"DistanciaPercorrida":[0.0],"ProgressoTrajeto":0.0,"ProgressoRua":0.0,"DistanciaEsquerda":0.0,"DistanciaDireita":0.0,"Status":1,"AnguloCarro":0.0,"AnguloCarroBussola":0.0,"AnguloRua":0.0,"AnguloRuaCamera":0.0,"AnguloDif":0.0,"Direcao":1,"DentroDaRua":false,"IdxPontoAproximadoRua":0,"IdxRuaAtual":0}]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
[{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0},{"Latitude":0.0,"Longitude":0.0,"DataHora":"0001-01-01T00:00:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
[{"Latitude":-22.339442335994335,"Longitude":-47.264067138109773,"DataHora":"2024-04-02T12:57:46.0553822-03:00","Altitude":0.0,"Velocidade":0.0,"NumeroSatelites":0,"PrecisaoHorizontal":0.0,"Orientacao":0.0}]
|
||||
|
|
@ -1,60 +1,60 @@
|
|||
[
|
||||
{
|
||||
"timestamp": 1711461153.3726723,
|
||||
"timestamp": 1711990136.7687936,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.4061275,
|
||||
"timestamp": 1711990136.800209,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.4376273,
|
||||
"timestamp": 1711990136.8321404,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.4692657,
|
||||
"timestamp": 1711990136.8643074,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.5010042,
|
||||
"timestamp": 1711990136.8960402,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.533227,
|
||||
"timestamp": 1711990136.9282334,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.5645604,
|
||||
"timestamp": 1711990136.9605372,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.5972886,
|
||||
"timestamp": 1711990137.0078733,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.629527,
|
||||
"timestamp": 1711990137.0399024,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461153.673727,
|
||||
"timestamp": 1711990137.0724075,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
|
|
|
|||
|
|
@ -1,60 +1,60 @@
|
|||
[
|
||||
{
|
||||
"timestamp": 1711461130.4628296,
|
||||
"timestamp": 1712054997.1174629,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.4952347,
|
||||
"timestamp": 1712054997.1501505,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.543707,
|
||||
"timestamp": 1712054997.181207,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.5755272,
|
||||
"timestamp": 1712054997.2131634,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.6068747,
|
||||
"timestamp": 1712054997.2630584,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.6381526,
|
||||
"timestamp": 1712054997.2929704,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.6703184,
|
||||
"timestamp": 1712054997.3254137,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.7022097,
|
||||
"timestamp": 1712054997.357529,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.7363334,
|
||||
"timestamp": 1712054997.3892317,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
},
|
||||
{
|
||||
"timestamp": 1711461130.766867,
|
||||
"timestamp": 1712054997.421826,
|
||||
"x_max": 640.0,
|
||||
"y_max": 480.0,
|
||||
"objetos": []
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_70e636f4a8ced6e9b5e05eeaa5305e16 {
|
||||
#map_fa3092bd5f54a448ff2b356082bf923c {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -39,14 +39,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_70e636f4a8ced6e9b5e05eeaa5305e16" ></div>
|
||||
<div class="folium-map" id="map_fa3092bd5f54a448ff2b356082bf923c" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_70e636f4a8ced6e9b5e05eeaa5305e16 = L.map(
|
||||
"map_70e636f4a8ced6e9b5e05eeaa5305e16",
|
||||
var map_fa3092bd5f54a448ff2b356082bf923c = L.map(
|
||||
"map_fa3092bd5f54a448ff2b356082bf923c",
|
||||
{
|
||||
center: [0.0, 0.0],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -60,13 +60,13 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_4bde257ec25fe71bb2cdd06d86be29a2 = L.tileLayer(
|
||||
var tile_layer_987a7aa74a0681e371a97f8ecaea09a6 = L.tileLayer(
|
||||
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
{"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors", "detectRetina": false, "maxNativeZoom": 19, "maxZoom": 19, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
|
||||
);
|
||||
|
||||
|
||||
tile_layer_4bde257ec25fe71bb2cdd06d86be29a2.addTo(map_70e636f4a8ced6e9b5e05eeaa5305e16);
|
||||
tile_layer_987a7aa74a0681e371a97f8ecaea09a6.addTo(map_fa3092bd5f54a448ff2b356082bf923c);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_70e636f4a8ced6e9b5e05eeaa5305e16);
|
||||
trajeto_json.addTo(map_fa3092bd5f54a448ff2b356082bf923c);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -135,10 +135,10 @@
|
|||
markerColor: 'red',
|
||||
prefix: 'glyphicon'
|
||||
})
|
||||
}).addTo(map_70e636f4a8ced6e9b5e05eeaa5305e16);
|
||||
}).addTo(map_fa3092bd5f54a448ff2b356082bf923c);
|
||||
|
||||
function atualizarMarcador() {
|
||||
fetch('http://localhost:5001/servir-coordenadas/1')
|
||||
fetch('coordenadas_gps')
|
||||
.then(function(response) {
|
||||
return response.json();
|
||||
})
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
{"Conectado":false,"QuantidadeBicos":4,"DensidadeHerbicida":1.0473705439684133,"CapacidadeReservatorio":30.0,"AtuacaoNivelAlto":true,"BicosPulverizadores":[{"ID":"B01","Posicao":1,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":13.43999906834482},{"ID":"B02","Posicao":2,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":8.7743276142532789},{"ID":"B03","Posicao":3,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":8.7743276142532789},{"ID":"B04","Posicao":4,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":6.54738843715332},{"ID":"B05","Posicao":5,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B06","Posicao":6,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B07","Posicao":7,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B08","Posicao":8,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B09","Posicao":9,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B10","Posicao":10,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0}],"BombaPressurizadora":{"ID":"BOMBA","BombaAtuada":false,"Ligado":true,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[14,35,36,37,5],"PressaoSP":120.0,"Pressao":101.53,"Potencia":0.0},"Sensores":[{"LogGrafico":[],"ID":"FLXLN","Prioridade":23,"Descricao":"Fluxo na linha principal","Componente":198,"Aferir":true,"DelayAmostragem":300,"Inicializado":false,"Testando":false,"Funcoes":[25],"Parametros":[],"UnidadeMedida":"mL/s","Leituras":[0.0,0.0],"ValorMinimo":0.0,"ValorMaximo":1820.0,"LimiteMaximo":0.0,"LimiteMinimo":0.0},{"LogGrafico":[],"ID":"MASRS","Prioridade":3,"Descricao":"Massa do reservatório de herbicida","Componente":532,"Aferir":true,"DelayAmostragem":1000,"Inicializado":false,"Testando":false,"Funcoes":[22,23],"Parametros":[],"UnidadeMedida":"Kg","Leituras":[1196478.5],"ValorMinimo":0.0,"ValorMaximo":2015214.5,"LimiteMaximo":50.0,"LimiteMinimo":5.0},{"LogGrafico":[],"ID":"PRSLN","Prioridade":3,"Descricao":"Pressão na linha principal","Componente":333,"Aferir":true,"DelayAmostragem":1000,"Inicializado":false,"Testando":false,"Funcoes":[24],"Parametros":[["Vmin","000.00"],["Vmax","004.50"],["Pmax","174.04"]],"UnidadeMedida":"psi","Leituras":[101.53],"ValorMinimo":0.0,"ValorMaximo":127.63,"LimiteMaximo":120.0,"LimiteMinimo":60.0}],"PercentualInicioPulverizacao":0.3,"_MassaRef":0.8,"_MassaLeituraRef":40876.37,"_MassaLeituraExtra":1895800.0,"_MassaLeitura":1196478.5,"MassaReservatorio":13.686567569478406,"VolumeReservatorio":13.067550589709125,"PercentualReservatorio":43.558501965697083,"VolumeVazaoAferido":102.0,"_FluxoMlRef":102.0,"_FluxoPulsoRef":80.0,"_LeituraPulsos":0,"_LeituraPeriodo":0,"VazaoFluxoMLpS":0.0,"VolumeVazaoML":27669.860995913026,"_PressaoVmin":0.0,"_PressaoVmax":4.5,"_PressaoMax":174.045,"_LeituraPressao":3257.0,"PressaoLinha":101.53,"PressaoLinhaCalc":101.51420781440781}
|
||||
{"Conectado":false,"QuantidadeBicos":4,"DensidadeHerbicida":1.05,"CapacidadeReservatorio":30.0,"AtuacaoNivelAlto":true,"BicosPulverizadores":[{"ID":"B01","Posicao":1,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":13.43999906834482},{"ID":"B02","Posicao":2,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":8.7743276142532789},{"ID":"B03","Posicao":3,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":8.7743276142532789},{"ID":"B04","Posicao":4,"Atuado":false,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":6.54738843715332},{"ID":"B05","Posicao":5,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B06","Posicao":6,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B07","Posicao":7,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B08","Posicao":8,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B09","Posicao":9,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0},{"ID":"B10","Posicao":10,"Atuado":false,"Comandar":false,"Inicializado":false,"Testando":false,"Funcoes":[21],"StatusBico":false,"MediaNivelFluxo":0.0}],"BombaPressurizadora":{"ID":"BOMBA","BombaAtuada":false,"Ligado":true,"Comandar":true,"Inicializado":false,"Testando":false,"Funcoes":[14,35,36,37,5],"PressaoSP":118.0,"Pressao":101.53,"Potencia":0.0},"Sensores":[{"LogGrafico":[],"ID":"FLXLN","Prioridade":23,"Descricao":"Fluxo na linha principal","Componente":198,"Aferir":true,"DelayAmostragem":300,"Inicializado":false,"Testando":false,"Funcoes":[25],"Parametros":[],"UnidadeMedida":"mL/s","Leituras":[0.0,0.0],"ValorMinimo":0.0,"ValorMaximo":1820.0,"LimiteMaximo":0.0,"LimiteMinimo":0.0},{"LogGrafico":[],"ID":"MASRS","Prioridade":3,"Descricao":"Massa do reservatório de herbicida","Componente":532,"Aferir":true,"DelayAmostragem":1000,"Inicializado":false,"Testando":false,"Funcoes":[22,23],"Parametros":[],"UnidadeMedida":"Kg","Leituras":[1196478.5],"ValorMinimo":0.0,"ValorMaximo":2015214.5,"LimiteMaximo":50.0,"LimiteMinimo":5.0},{"LogGrafico":[],"ID":"PRSLN","Prioridade":3,"Descricao":"Pressão na linha principal","Componente":333,"Aferir":true,"DelayAmostragem":1000,"Inicializado":false,"Testando":false,"Funcoes":[24],"Parametros":[["Vmin","000.00"],["Vmax","004.50"],["Pmax","174.04"]],"UnidadeMedida":"psi","Leituras":[101.53],"ValorMinimo":0.0,"ValorMaximo":127.63,"LimiteMaximo":120.0,"LimiteMinimo":60.0}],"PercentualInicioPulverizacao":0.3,"ScriptDeteccaoErvas":"green-detector.py","_MassaRef":0.8,"_MassaLeituraRef":40876.37,"_MassaLeituraExtra":1895800.0,"_MassaLeitura":1196478.5,"MassaReservatorio":13.686567569478406,"VolumeReservatorio":13.0348262566461,"PercentualReservatorio":43.449420855487006,"VolumeVazaoAferido":102.0,"_FluxoMlRef":102.0,"_FluxoPulsoRef":80.0,"_LeituraPulsos":0,"_LeituraPeriodo":0,"VazaoFluxoMLpS":0.0,"VolumeVazaoML":0.0,"_PressaoVmin":0.0,"_PressaoVmax":4.5,"_PressaoMax":174.045,"_LeituraPressao":3257.0,"PressaoLinha":101.53,"PressaoLinhaCalc":101.51420781440781}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
[{"Tipo":1,"Pino":99,"Descricao":"1","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":98,"Descricao":"2","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":36,"Descricao":"3","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":39,"Descricao":"4","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":34,"Descricao":"5","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":35,"Descricao":"6","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":32,"Descricao":"7","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":33,"Descricao":"8","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":25,"Descricao":"9","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":26,"Descricao":"10","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":27,"Descricao":"11","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":14,"Descricao":"12","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":12,"Descricao":"13","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":97,"Descricao":"14","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":13,"Descricao":"15","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":9,"Descricao":"16","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":10,"Descricao":"17","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":11,"Descricao":"18","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":96,"Descricao":"19","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":6,"Descricao":"26","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":7,"Descricao":"27","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":8,"Descricao":"28","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":15,"Descricao":"29","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":2,"Descricao":"30","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":0,"Descricao":"31","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":4,"Descricao":"32","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":16,"Descricao":"33","Funcao":12,"Habilitado":true,"ComponenteID":"TMVET"},{"Tipo":1,"Pino":17,"Descricao":"34","Funcao":12,"Habilitado":true,"ComponenteID":"TMVEF"},{"Tipo":1,"Pino":5,"Descricao":"35","Funcao":12,"Habilitado":true,"ComponenteID":"TMVDT"},{"Tipo":1,"Pino":18,"Descricao":"36","Funcao":12,"Habilitado":true,"ComponenteID":"TMVDF"},{"Tipo":1,"Pino":19,"Descricao":"37","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":95,"Descricao":"38","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":21,"Descricao":"39","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":3,"Descricao":"40","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":1,"Descricao":"41","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":22,"Descricao":"42","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":23,"Descricao":"43","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":94,"Descricao":"44","Funcao":0,"Habilitado":false,"ComponenteID":""}]
|
||||
[{"Tipo":1,"Pino":99,"Descricao":"1","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":98,"Descricao":"2","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":36,"Descricao":"3","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":39,"Descricao":"4","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":34,"Descricao":"5","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":35,"Descricao":"6","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":32,"Descricao":"7","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":33,"Descricao":"8","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":25,"Descricao":"9","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":26,"Descricao":"10","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":27,"Descricao":"11","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":14,"Descricao":"12","Funcao":38,"Habilitado":true,"ComponenteID":"LEDOP"},{"Tipo":1,"Pino":12,"Descricao":"13","Funcao":38,"Habilitado":true,"ComponenteID":"LEDAT"},{"Tipo":1,"Pino":97,"Descricao":"14","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":13,"Descricao":"15","Funcao":38,"Habilitado":true,"ComponenteID":"LEDMN"},{"Tipo":1,"Pino":9,"Descricao":"16","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":10,"Descricao":"17","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":11,"Descricao":"18","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":96,"Descricao":"19","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":6,"Descricao":"26","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":7,"Descricao":"27","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":8,"Descricao":"28","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":15,"Descricao":"29","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":2,"Descricao":"30","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":0,"Descricao":"31","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":4,"Descricao":"32","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":16,"Descricao":"33","Funcao":12,"Habilitado":true,"ComponenteID":"TMVET"},{"Tipo":1,"Pino":17,"Descricao":"34","Funcao":12,"Habilitado":true,"ComponenteID":"TMVEF"},{"Tipo":1,"Pino":5,"Descricao":"35","Funcao":12,"Habilitado":true,"ComponenteID":"TMVDT"},{"Tipo":1,"Pino":18,"Descricao":"36","Funcao":12,"Habilitado":true,"ComponenteID":"TMVDF"},{"Tipo":1,"Pino":19,"Descricao":"37","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":95,"Descricao":"38","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":21,"Descricao":"39","Funcao":33,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":3,"Descricao":"40","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":1,"Descricao":"41","Funcao":0,"Habilitado":false,"ComponenteID":""},{"Tipo":1,"Pino":22,"Descricao":"42","Funcao":34,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":23,"Descricao":"43","Funcao":0,"Habilitado":true,"ComponenteID":""},{"Tipo":1,"Pino":94,"Descricao":"44","Funcao":0,"Habilitado":false,"ComponenteID":""}]
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
953f8999a754e37f88b27d67ffc351a97b4df4f97b143b09fc5a17239fb13cff
|
||||
ea3af4a0fea218ee14c28362247a70061534e4641b40091896eee80e55264981
|
||||
|
|
|
|||
|
|
@ -410,3 +410,5 @@ C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\Debug\Python\Output\folium\mqtt
|
|||
C:\ZendionINC\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.csproj.Up2Date
|
||||
C:\ZendionINC\agrobot_base\AgroBase\AgroBase\bin\Debug\Python\Scripts\pzem.py
|
||||
C:\ZendionINC\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.Forms.Atuador.frmAtuCalibragem.resources
|
||||
C:\ZendionINC\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.Forms.Operacoes.frmInicioOperacao.resources
|
||||
C:\ZendionINC\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.Forms.Operacoes.frmOperacaoManual.resources
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -687,6 +687,23 @@ SensorPressao* SPPorID(String ID) {
|
|||
return _sensor;
|
||||
}
|
||||
|
||||
static bool ExisteBicoAtuado() {
|
||||
if (B_01.Iniciado && ((AtuacaoNivelAlto && B_01.StatusBico) || (!AtuacaoNivelAlto && !B_01.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_02.Iniciado && ((AtuacaoNivelAlto && B_02.StatusBico) || (!AtuacaoNivelAlto && !B_02.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_03.Iniciado && ((AtuacaoNivelAlto && B_03.StatusBico) || (!AtuacaoNivelAlto && !B_03.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_04.Iniciado && ((AtuacaoNivelAlto && B_04.StatusBico) || (!AtuacaoNivelAlto && !B_04.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ZerarPinos() {
|
||||
//const int gpios[] = {2, 4, 5, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33};
|
||||
const int gpios[] = {4, 5, 6, 7, 15, 16, 17, 18, 8, 3, 46, 9, 10, 11, 12, 13, 14, 19, 20, 21, 47, 48, 45, 0, 35, 36, 37, 38, 39, 40, 41, 42, 2, 1};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,907 @@
|
|||
// Dispositivo: Atuador
|
||||
// Versão Firmware: 4
|
||||
// Ultima atualização: 01/04/2024
|
||||
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\SerialService.h"
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\Utils.h"
|
||||
#include "HX711.h"
|
||||
#include <PID_v1.h>
|
||||
#include <SimpleKalmanFilter.h>
|
||||
#define D_Code Atu
|
||||
|
||||
#define _pinoLED RGB_BUILTIN
|
||||
|
||||
long _baudRate = 115200;
|
||||
|
||||
bool Conectado = false;
|
||||
|
||||
int _TaxaAmostragem = 500;
|
||||
int BicosAtivos = 10;
|
||||
bool AtuacaoNivelAlto = true;
|
||||
|
||||
static double _PressaoAtual = 0.0;
|
||||
|
||||
class BicoPulverizador {
|
||||
public:
|
||||
// Construtor
|
||||
BicoPulverizador(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
int _posicao;
|
||||
int _pinoSolenoide;
|
||||
|
||||
bool Iniciado = false;
|
||||
bool Testando = false;
|
||||
|
||||
// Consumo
|
||||
bool StatusBico;
|
||||
|
||||
// Entrada de dados
|
||||
bool _BicoAtuado = !AtuacaoNivelAlto;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pinoSolenoide > -1) {
|
||||
pinMode(_pinoSolenoide, OUTPUT);
|
||||
_BicoAtuado = !AtuacaoNivelAlto;
|
||||
digitalWrite(_pinoSolenoide, _BicoAtuado);
|
||||
StatusBico = digitalRead(_pinoSolenoide) == (AtuacaoNivelAlto ? 1 : 0);
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&BicoPulverizador::SensorTaskWrapper, "SensorTask", 5000, this, 25 - _posicao, &SensorTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SensorTaskHandle);
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pinoSolenoide, INPUT);
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void AlterarStatusBico() {
|
||||
digitalWrite(_pinoSolenoide, _BicoAtuado);
|
||||
StatusBico = digitalRead(_pinoSolenoide) == (AtuacaoNivelAlto ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TaskHandle_t SensorTaskHandle = NULL;
|
||||
static void SensorTaskWrapper(void *pvParameters) {
|
||||
BicoPulverizador *bico = static_cast<BicoPulverizador*>(pvParameters);
|
||||
bico->SensorTask();
|
||||
}
|
||||
|
||||
void SensorTask() {
|
||||
unsigned long previousMillisLeitura = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
unsigned long currentMillis = millis();
|
||||
if ((currentMillis - previousMillisLeitura) >= _TaxaAmostragem) {
|
||||
previousMillisLeitura = currentMillis;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sBIC, _ID, MontarDadosProtocoloBicoPulverizador(StatusBico)));
|
||||
}
|
||||
|
||||
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class BombaPressurizadora {
|
||||
public:
|
||||
// Construtor
|
||||
BombaPressurizadora(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
int _pinoEN;
|
||||
int _pinoCS;
|
||||
int _pinoINA;
|
||||
int _pinoINB;
|
||||
int _pinoPWM;
|
||||
|
||||
double _Kp = 3.0;
|
||||
double _Ki = 2.2;
|
||||
double _Kd = 0.5;
|
||||
PID* _PID = nullptr;
|
||||
|
||||
int ZeroRampa = 0;
|
||||
int RampaMax = 1023;
|
||||
|
||||
bool Iniciado = false;
|
||||
bool Testando = false;
|
||||
int _canal = 0;
|
||||
|
||||
// Consumo
|
||||
bool Ligado;
|
||||
double PotenciaAtual = 0;
|
||||
|
||||
// Entrada de dados
|
||||
double _PressaoSP = 0;
|
||||
bool _BombaAtuada = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pinoEN > -1) {
|
||||
_BombaAtuada = false;
|
||||
pinMode(_pinoEN, OUTPUT);
|
||||
digitalWrite(_pinoEN, _BombaAtuada);
|
||||
Ligado = digitalRead(_pinoEN) == 1;
|
||||
}
|
||||
if (_pinoCS > -1) {
|
||||
pinMode(_pinoEN, INPUT);
|
||||
}
|
||||
if (_pinoINA > -1) {
|
||||
pinMode(_pinoINA, OUTPUT);
|
||||
digitalWrite(_pinoINA, LOW);
|
||||
}
|
||||
if (_pinoINB > -1) {
|
||||
pinMode(_pinoINB, OUTPUT);
|
||||
digitalWrite(_pinoINB, HIGH);
|
||||
}
|
||||
if (_pinoPWM > -1) {
|
||||
ledcSetup(_canal, 1000, 10);
|
||||
ledcAttachPin(_pinoPWM, _canal);
|
||||
PotenciaAtual = 0;
|
||||
_PressaoSP = 0;
|
||||
ledcWrite(_canal, PotenciaAtual);
|
||||
}
|
||||
|
||||
_PID = new PID(&_PressaoAtual, &PotenciaAtual, &_PressaoSP, _Kp, _Ki, _Kd, DIRECT);
|
||||
_PID->SetOutputLimits(ZeroRampa, RampaMax);
|
||||
_PID->SetMode(AUTOMATIC);
|
||||
|
||||
xTaskCreatePinnedToCore(&BombaPressurizadora::SensorTaskWrapper, "SensorTask", 15000, this, 25, &SensorTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SensorTaskHandle);
|
||||
|
||||
// Desanexar o canal PWM
|
||||
if (_pinoPWM > -1) {
|
||||
ledcDetachPin(_pinoPWM);
|
||||
}
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pinoEN, INPUT);
|
||||
pinMode(_pinoCS, INPUT);
|
||||
pinMode(_pinoINA, INPUT);
|
||||
pinMode(_pinoINB, INPUT);
|
||||
pinMode(_pinoPWM, INPUT);
|
||||
|
||||
// Outras redefinições de variáveis de estado, se necessário
|
||||
delete _PID;
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void AlterarStatusBomba() {
|
||||
digitalWrite(_pinoEN, _BombaAtuada);
|
||||
Ligado = digitalRead(_pinoEN) == 1;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TaskHandle_t SensorTaskHandle = NULL;
|
||||
static void SensorTaskWrapper(void *pvParameters) {
|
||||
BombaPressurizadora *bomba = static_cast<BombaPressurizadora*>(pvParameters);
|
||||
bomba->SensorTask();
|
||||
}
|
||||
|
||||
void SensorTask() {
|
||||
unsigned long previousMillisLeitura = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_BombaAtuada && (_PressaoAtual - 10) < _PressaoSP && ExisteBicoAtuado()) {
|
||||
_PID->Compute();
|
||||
//PotenciaAtual = RampaMax * 0.5;
|
||||
}
|
||||
else {
|
||||
PotenciaAtual = ZeroRampa;
|
||||
}
|
||||
ledcWrite(_canal, PotenciaAtual);
|
||||
|
||||
unsigned long currentMillis = millis();
|
||||
if ((currentMillis - previousMillisLeitura) >= _TaxaAmostragem) {
|
||||
previousMillisLeitura = currentMillis;
|
||||
|
||||
AtualizarStatusSensor();
|
||||
}
|
||||
|
||||
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AtualizarStatusSensor() {
|
||||
Ligado = digitalRead(_pinoEN) == 1;
|
||||
|
||||
float PercentualPotencia = (PotenciaAtual / RampaMax) * 100;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sBMB, _ID, MontarDadosProtocoloBombaPressurizadora(Ligado, PercentualPotencia)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorFluxo {
|
||||
public:
|
||||
SensorFluxo(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sFLX;
|
||||
int _pino;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
float _calibragem;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
// Consumo
|
||||
volatile int ultimaLeitura = 0;
|
||||
volatile unsigned int tempoAnterior = 0;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pino > -1) {
|
||||
pinMode(_pino, INPUT);
|
||||
ultimaLeitura = digitalRead(_pino);
|
||||
tempoAnterior = 0;
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorFluxo::SFTaskWrapper, "SFTask", 10000, this, _prioridade, &SFTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SFTaskHandle);
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pino, INPUT);
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
TaskHandle_t SFTaskHandle = NULL;
|
||||
static void SFTaskWrapper(void *pvParameters) {
|
||||
SensorFluxo *sensor = static_cast<SensorFluxo*>(pvParameters);
|
||||
sensor->SFTask();
|
||||
}
|
||||
|
||||
void SFTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
volatile int pulsos = 0;
|
||||
volatile int pulsosA = 0;
|
||||
volatile float periodo = 0;
|
||||
volatile float periodoTotal = 0;
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
bool Leitura = digitalRead(_pino) == 1;
|
||||
if (Leitura != ultimaLeitura) {
|
||||
ultimaLeitura = Leitura;
|
||||
pulsos++;
|
||||
|
||||
// Calcular o período em microssegundos
|
||||
unsigned long tempoAtual = micros();
|
||||
unsigned long periodoUs = pulsos == 1 ? 0 : (tempoAtual - tempoAnterior);
|
||||
periodo = periodoUs / 1000.0; // Converte de us para ms (2300 us para 2,3 ms)
|
||||
periodoTotal += periodo;
|
||||
|
||||
//CalcularFluxo(periodo);
|
||||
|
||||
tempoAnterior = tempoAtual;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
int Tempo = _TaxaAmostragem + _delayAmostragem;
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= Tempo) {
|
||||
if (pulsos == pulsosA) {
|
||||
periodoTotal = 0;
|
||||
pulsos = 0;
|
||||
}
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sFLX, _ID, MontarDadosProtocoloFluxo(pulsos, periodoTotal)));
|
||||
|
||||
pulsosA = pulsos;
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorMassa {
|
||||
public:
|
||||
SensorMassa(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sMAS;
|
||||
int _pinoDT;
|
||||
int _pinoSCK;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
|
||||
HX711* balanca = nullptr;
|
||||
SimpleKalmanFilter* filtro = nullptr;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pinoDT > -1 && _pinoSCK > -1) {
|
||||
balanca = new HX711();
|
||||
filtro = new SimpleKalmanFilter(2, 2, 0.01);
|
||||
balanca->begin(_pinoDT, _pinoSCK);
|
||||
balanca->set_scale();
|
||||
//balanca->tare();
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorMassa::SMTaskWrapper, "SMTask", 5000, this, _prioridade, &SMTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
delete balanca;
|
||||
delete filtro;
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SMTaskHandle);
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pinoDT, INPUT);
|
||||
pinMode(_pinoSCK, INPUT);
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
TaskHandle_t SMTaskHandle = NULL;
|
||||
static void SMTaskWrapper(void *pvParameters) {
|
||||
SensorMassa *sensor = static_cast<SensorMassa*>(pvParameters);
|
||||
sensor->SMTask();
|
||||
}
|
||||
|
||||
void SMTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
AferirMassa();
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AferirMassa() {
|
||||
float leitura = balanca->get_units(5);
|
||||
double leituraNormalizada = filtro->updateEstimate(leitura);
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sMAS, _ID, MontarDadosProtocoloMassa(leituraNormalizada)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorPressao {
|
||||
public:
|
||||
SensorPressao(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sPRS;
|
||||
int _pino;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
|
||||
double _Vmin = 0.0;
|
||||
double _Vmax = 4.5;
|
||||
double _Pmax = 174.045;
|
||||
|
||||
SimpleKalmanFilter* filtro = nullptr;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pino > -1) {
|
||||
pinMode(_pino, INPUT);
|
||||
filtro = new SimpleKalmanFilter(2, 2, 0.01);
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorPressao::SPTaskWrapper, "SPTask", 5000, this, _prioridade, &SPTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
delete filtro;
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SPTaskHandle);
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pino, INPUT);
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
double leituraNormalizada = 0.0;
|
||||
|
||||
TaskHandle_t SPTaskHandle = NULL;
|
||||
static void SPTaskWrapper(void *pvParameters) {
|
||||
SensorPressao *sensor = static_cast<SensorPressao*>(pvParameters);
|
||||
sensor->SPTask();
|
||||
}
|
||||
|
||||
void SPTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
AferirPressao();
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sPRS, _ID, MontarDadosProtocoloPressao(_PressaoAtual, leituraNormalizada)));
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AferirPressao() {
|
||||
int leitura = analogRead(_pino);
|
||||
leituraNormalizada = filtro->updateEstimate(leitura);
|
||||
|
||||
double tensao = fmap(leituraNormalizada, 0.0, 4095.0, 0.0, 3300.0) / 1000.0;
|
||||
_PressaoAtual = fmap(tensao, _Vmin, _Vmax, 0.0, _Pmax);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
BicoPulverizador B_01("B01 ");
|
||||
BicoPulverizador B_02("B02 ");
|
||||
BicoPulverizador B_03("B03 ");
|
||||
BicoPulverizador B_04("B04 ");
|
||||
BicoPulverizador B_05("B05 ");
|
||||
BicoPulverizador B_06("B06 ");
|
||||
BicoPulverizador B_07("B07 ");
|
||||
BicoPulverizador B_08("B08 ");
|
||||
BicoPulverizador B_09("B09 ");
|
||||
BicoPulverizador B_10("B10 ");
|
||||
BombaPressurizadora BOMBA("BOMBA");
|
||||
SensorFluxo SenFlx("FLXLN");
|
||||
SensorMassa SenMas("MASRS");
|
||||
SensorPressao SenPrs("PRSLN");
|
||||
|
||||
BicoPulverizador* BicoPorID(String ID) {
|
||||
BicoPulverizador* _bico =
|
||||
ID == "B01 " ? &B_01 :
|
||||
ID == "B02 " ? &B_02 :
|
||||
ID == "B03 " ? &B_03 :
|
||||
ID == "B04 " ? &B_04 :
|
||||
ID == "B05 " ? &B_05 :
|
||||
ID == "B06 " ? &B_06 :
|
||||
ID == "B07 " ? &B_07 :
|
||||
ID == "B08 " ? &B_08 :
|
||||
ID == "B09 " ? &B_09 :
|
||||
ID == "B10 " ? &B_10 :
|
||||
nullptr;
|
||||
return _bico;
|
||||
}
|
||||
|
||||
BombaPressurizadora* BombaPorID(String ID) {
|
||||
BombaPressurizadora* _bomba =
|
||||
ID == "BOMBA" ? &BOMBA :
|
||||
nullptr;
|
||||
return _bomba;
|
||||
}
|
||||
|
||||
SensorFluxo* SFPorID(String ID) {
|
||||
SensorFluxo* _sensor =
|
||||
ID == "FLXLN" ? &SenFlx :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
SensorMassa* SMPorID(String ID) {
|
||||
SensorMassa* _sensor =
|
||||
ID == "MASRS" ? &SenMas :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
SensorPressao* SPPorID(String ID) {
|
||||
SensorPressao* _sensor =
|
||||
ID == "PRSLN" ? &SenPrs :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
static bool ExisteBicoAtuado() {
|
||||
if (B_01.Iniciado && ((AtuacaoNivelAlto && B_01.StatusBico) || (!AtuacaoNivelAlto && !B_01.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_02.Iniciado && ((AtuacaoNivelAlto && B_02.StatusBico) || (!AtuacaoNivelAlto && !B_02.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_03.Iniciado && ((AtuacaoNivelAlto && B_03.StatusBico) || (!AtuacaoNivelAlto && !B_03.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_04.Iniciado && ((AtuacaoNivelAlto && B_04.StatusBico) || (!AtuacaoNivelAlto && !B_04.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ZerarPinos() {
|
||||
//const int gpios[] = {2, 4, 5, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33};
|
||||
const int gpios[] = {4, 5, 6, 7, 15, 16, 17, 18, 8, 3, 46, 9, 10, 11, 12, 13, 14, 19, 20, 21, 47, 48, 45, 0, 35, 36, 37, 38, 39, 40, 41, 42, 2, 1};
|
||||
|
||||
for (int i = 0; i < sizeof(gpios) / sizeof(gpios[0]); i++) {
|
||||
pinMode(gpios[i], OUTPUT);
|
||||
digitalWrite(gpios[i], !AtuacaoNivelAlto);
|
||||
}
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(_baudRate);
|
||||
|
||||
ZerarPinos();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (Serial.available() > 3) {
|
||||
String Protocolo = "";
|
||||
F_Code _funcao = Nda;
|
||||
while (Serial.available()) {
|
||||
char Entrada = (char)Serial.read();
|
||||
if (Entrada == EndLine) {
|
||||
break;
|
||||
}
|
||||
Protocolo += Entrada;
|
||||
if (Protocolo.length() == 3) {
|
||||
if (_funcao == Nda) {
|
||||
_funcao = (F_Code)((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2]).toInt();
|
||||
Protocolo = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EnviarDadosSerial("OK");
|
||||
|
||||
if (_funcao == Chk) {
|
||||
EnviarDadosSerial(MontarProtocoloVerificacao(D_Code));
|
||||
}
|
||||
else if (_funcao == Cfg) {
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2] + (String)Protocolo[3] + (String)Protocolo[4]);
|
||||
bool Conectar = (String)Protocolo[6] == "1";
|
||||
if (ID == "MD ") {
|
||||
_TaxaAmostragem = ((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10] + (String)Protocolo[11] + (String)Protocolo[12]).toInt();
|
||||
int pinoReleGeral = ((String)Protocolo[14] + (String)Protocolo[15]).toInt();
|
||||
bool _AtuaNivelAlto = (String)Protocolo[17] == "1";
|
||||
|
||||
AtuacaoNivelAlto = _AtuaNivelAlto;
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
Conectado = Conectar;
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, "MD ", Conectado ? "1" : "0"));
|
||||
}
|
||||
else {
|
||||
BicoPulverizador* _bico = BicoPorID(ID);
|
||||
BombaPressurizadora* _bomba = BombaPorID(ID);
|
||||
|
||||
if (_bico != nullptr) {
|
||||
bool bico_ativado = (String)Protocolo[8] == "1";
|
||||
int posicao = ((String)Protocolo[10] + (String)Protocolo[11]).toInt();
|
||||
int solenoide = ((String)Protocolo[13] + (String)Protocolo[14]).toInt();
|
||||
if (bico_ativado) {
|
||||
if (Conectar) {
|
||||
_bico->_posicao = posicao;
|
||||
_bico->_pinoSolenoide = solenoide;
|
||||
|
||||
_bico->Inicializar();
|
||||
}
|
||||
else {
|
||||
_bico->Desligar();
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
}
|
||||
}
|
||||
else if (_bomba != nullptr) {
|
||||
bool bomba_ativada = (String)Protocolo[8] == "1";
|
||||
double pressaoSP = ((String)Protocolo[10] + (String)Protocolo[11] + (String)Protocolo[12]).toDouble();
|
||||
int pinoEN = ((String)Protocolo[14] + (String)Protocolo[15]).toInt();
|
||||
int pinoCS = ((String)Protocolo[17] + (String)Protocolo[18]).toInt();
|
||||
int pinoINA = ((String)Protocolo[20] + (String)Protocolo[21]).toInt();
|
||||
int pinoINB = ((String)Protocolo[23] + (String)Protocolo[24]).toInt();
|
||||
int pinoPWM = ((String)Protocolo[26] + (String)Protocolo[27]).toInt();
|
||||
if (bomba_ativada) {
|
||||
if (Conectar) {
|
||||
_bomba->_PressaoSP = pressaoSP;
|
||||
_bomba->_pinoEN = pinoEN;
|
||||
_bomba->_pinoCS = pinoCS;
|
||||
_bomba->_pinoINA = pinoINA;
|
||||
_bomba->_pinoINB = pinoINB;
|
||||
_bomba->_pinoPWM = pinoPWM;
|
||||
|
||||
_bomba->Inicializar();
|
||||
}
|
||||
else {
|
||||
_bomba->Desligar();
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
}
|
||||
}
|
||||
else {
|
||||
S_Code componente = (S_Code)((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10]).toInt();
|
||||
bool sensor_ativado = (String)Protocolo[12] == "1";
|
||||
int delayAmostragem = ((String)Protocolo[14] + (String)Protocolo[15] + (String)Protocolo[16] + (String)Protocolo[17] + (String)Protocolo[18]).toInt();
|
||||
int prioridade = ((String)Protocolo[20] + (String)Protocolo[21]).toInt();
|
||||
int pino = ((String)Protocolo[23] + (String)Protocolo[24]).toInt();
|
||||
int pino2 = ((String)Protocolo[26] + (String)Protocolo[27]).toInt();
|
||||
|
||||
switch (componente) {
|
||||
case sFLX: {
|
||||
SensorFluxo* _sensor = SFPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
if (Conectar) {
|
||||
_sensor->_pino = pino;
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case sMAS: {
|
||||
SensorMassa* _sensor = SMPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
if (Conectar) {
|
||||
_sensor->_pinoDT = pino;
|
||||
_sensor->_pinoSCK = pino2;
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case sPRS: {
|
||||
SensorPressao* _sensor = SPPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
double Vmin = ((String)Protocolo[29] + (String)Protocolo[30] + (String)Protocolo[31] + (String)Protocolo[32] + (String)Protocolo[33] + (String)Protocolo[34]).toDouble();
|
||||
double Vmax = ((String)Protocolo[36] + (String)Protocolo[37] + (String)Protocolo[38] + (String)Protocolo[39] + (String)Protocolo[40] + (String)Protocolo[41]).toDouble();
|
||||
double Pmax = ((String)Protocolo[43] + (String)Protocolo[44] + (String)Protocolo[45] + (String)Protocolo[46] + (String)Protocolo[47] + (String)Protocolo[48]).toDouble();
|
||||
if (Conectar) {
|
||||
_sensor->_Vmin = Vmin;
|
||||
_sensor->_Vmax = Vmax;
|
||||
_sensor->_Pmax = Pmax;
|
||||
|
||||
_sensor->_pino = pino;
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (_funcao == Cmd) {
|
||||
//canal;potencia;sentido;rampa;precisao;rpm
|
||||
//0;000;0;000;000;000
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2] + (String)Protocolo[3] + (String)Protocolo[4]);
|
||||
|
||||
BicoPulverizador* _bico = BicoPorID(ID);
|
||||
BombaPressurizadora* _bomba = BombaPorID(ID);
|
||||
|
||||
if (_bico != nullptr) {
|
||||
_bico->_BicoAtuado = (String)Protocolo[6] == (AtuacaoNivelAlto ? "1" : "0");
|
||||
_bico->AlterarStatusBico();
|
||||
}
|
||||
else if (_bomba != nullptr) {
|
||||
_bomba->_BombaAtuada = (String)Protocolo[6] == "1";
|
||||
_bomba->_PressaoSP = ((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10]).toDouble();
|
||||
_bomba->AlterarStatusBomba();
|
||||
}
|
||||
}
|
||||
else if (_funcao == Tst) {
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2]);
|
||||
|
||||
BicoPulverizador* _bico = BicoPorID(ID);
|
||||
|
||||
bool EmTeste = _bico->Testando;
|
||||
if (!EmTeste) {
|
||||
//_motor->Testar();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
// Dispositivo: Atuador
|
||||
// Versão Firmware: 2
|
||||
// Ultima atualização: 11/03/2024
|
||||
// Versão Firmware: 3
|
||||
// Ultima atualização: 28/03/2024
|
||||
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\SerialService.h"
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\Utils.h"
|
||||
#include "HX711.h"
|
||||
#include <PID_v1.h>
|
||||
#include <SimpleKalmanFilter.h>
|
||||
#define D_Code Atu
|
||||
|
||||
#define _pinoLED RGB_BUILTIN
|
||||
int _pinoReleGeral = -1;
|
||||
|
||||
long _baudRate = 115200;
|
||||
|
||||
|
|
@ -17,6 +19,8 @@ int _TaxaAmostragem = 500;
|
|||
int BicosAtivos = 10;
|
||||
bool AtuacaoNivelAlto = true;
|
||||
|
||||
static double _PressaoAtual = 0.0;
|
||||
|
||||
class BicoPulverizador {
|
||||
public:
|
||||
// Construtor
|
||||
|
|
@ -110,7 +114,7 @@ class BicoPulverizador {
|
|||
if ((currentMillis - previousMillisLeitura) >= _TaxaAmostragem) {
|
||||
previousMillisLeitura = currentMillis;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sFLX, _ID, MontarDadosProtocoloBicoPulverizador(StatusBico)));
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sBIC, _ID, MontarDadosProtocoloBicoPulverizador(StatusBico)));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -120,6 +124,173 @@ class BicoPulverizador {
|
|||
|
||||
};
|
||||
|
||||
class BombaPressurizadora {
|
||||
public:
|
||||
// Construtor
|
||||
BombaPressurizadora(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
int _pinoEN;
|
||||
int _pinoCS;
|
||||
int _pinoINA;
|
||||
int _pinoINB;
|
||||
int _pinoPWM;
|
||||
|
||||
double _Kp = 3.0;
|
||||
double _Ki = 2.2;
|
||||
double _Kd = 0.5;
|
||||
PID* _PID = nullptr;
|
||||
|
||||
int ZeroRampa = 0;
|
||||
int RampaMax = 1023;
|
||||
|
||||
bool Iniciado = false;
|
||||
bool Testando = false;
|
||||
int _canal = 0;
|
||||
|
||||
// Consumo
|
||||
bool Ligado;
|
||||
double PotenciaAtual = 0;
|
||||
|
||||
// Entrada de dados
|
||||
double _PressaoSP = 0;
|
||||
bool _BombaAtuada = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pinoEN > -1) {
|
||||
_BombaAtuada = false;
|
||||
pinMode(_pinoEN, OUTPUT);
|
||||
digitalWrite(_pinoEN, _BombaAtuada);
|
||||
Ligado = digitalRead(_pinoEN) == 1;
|
||||
}
|
||||
if (_pinoCS > -1) {
|
||||
pinMode(_pinoEN, INPUT);
|
||||
}
|
||||
if (_pinoINA > -1) {
|
||||
pinMode(_pinoINA, OUTPUT);
|
||||
digitalWrite(_pinoINA, LOW);
|
||||
}
|
||||
if (_pinoINB > -1) {
|
||||
pinMode(_pinoINB, OUTPUT);
|
||||
digitalWrite(_pinoINB, HIGH);
|
||||
}
|
||||
if (_pinoPWM > -1) {
|
||||
ledcSetup(_canal, 1000, 10);
|
||||
ledcAttachPin(_pinoPWM, _canal);
|
||||
PotenciaAtual = 0;
|
||||
_PressaoSP = 0;
|
||||
ledcWrite(_canal, PotenciaAtual);
|
||||
}
|
||||
|
||||
_PID = new PID(&_PressaoAtual, &PotenciaAtual, &_PressaoSP, _Kp, _Ki, _Kd, DIRECT);
|
||||
_PID->SetOutputLimits(ZeroRampa, RampaMax);
|
||||
_PID->SetMode(AUTOMATIC);
|
||||
|
||||
xTaskCreatePinnedToCore(&BombaPressurizadora::SensorTaskWrapper, "SensorTask", 15000, this, 25, &SensorTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SensorTaskHandle);
|
||||
|
||||
// Desanexar o canal PWM
|
||||
if (_pinoPWM > -1) {
|
||||
ledcDetachPin(_pinoPWM);
|
||||
}
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pinoEN, INPUT);
|
||||
pinMode(_pinoCS, INPUT);
|
||||
pinMode(_pinoINA, INPUT);
|
||||
pinMode(_pinoINB, INPUT);
|
||||
pinMode(_pinoPWM, INPUT);
|
||||
|
||||
// Outras redefinições de variáveis de estado, se necessário
|
||||
delete _PID;
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void AlterarStatusBomba() {
|
||||
digitalWrite(_pinoEN, _BombaAtuada);
|
||||
Ligado = digitalRead(_pinoEN) == 1;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TaskHandle_t SensorTaskHandle = NULL;
|
||||
static void SensorTaskWrapper(void *pvParameters) {
|
||||
BombaPressurizadora *bomba = static_cast<BombaPressurizadora*>(pvParameters);
|
||||
bomba->SensorTask();
|
||||
}
|
||||
|
||||
void SensorTask() {
|
||||
unsigned long previousMillisLeitura = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_BombaAtuada/* && _PressaoAtual < _PressaoSP*/) {
|
||||
_PID->Compute();
|
||||
//PotenciaAtual = RampaMax * 0.5;
|
||||
}
|
||||
else {
|
||||
PotenciaAtual = ZeroRampa;
|
||||
}
|
||||
ledcWrite(_canal, PotenciaAtual);
|
||||
|
||||
unsigned long currentMillis = millis();
|
||||
if ((currentMillis - previousMillisLeitura) >= _TaxaAmostragem) {
|
||||
previousMillisLeitura = currentMillis;
|
||||
|
||||
AtualizarStatusSensor();
|
||||
}
|
||||
|
||||
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AtualizarStatusSensor() {
|
||||
Ligado = digitalRead(_pinoEN) == 1;
|
||||
|
||||
float PercentualPotencia = (PotenciaAtual / RampaMax) * 100;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sBMB, _ID, MontarDadosProtocoloBombaPressurizadora(Ligado, PercentualPotencia)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorFluxo {
|
||||
public:
|
||||
SensorFluxo(String desc) {
|
||||
|
|
@ -139,8 +310,6 @@ class SensorFluxo {
|
|||
// Consumo
|
||||
volatile int ultimaLeitura = 0;
|
||||
volatile unsigned int tempoAnterior = 0;
|
||||
volatile float periodo = 0;
|
||||
volatile float fluxo = 0;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
|
|
@ -153,10 +322,9 @@ class SensorFluxo {
|
|||
pinMode(_pino, INPUT);
|
||||
ultimaLeitura = digitalRead(_pino);
|
||||
tempoAnterior = 0;
|
||||
periodo = 0;
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorFluxo::SFTaskWrapper, "SFTask", 5000, this, _prioridade, &SFTaskHandle, tskNO_AFFINITY);
|
||||
xTaskCreatePinnedToCore(&SensorFluxo::SFTaskWrapper, "SFTask", 10000, this, _prioridade, &SFTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
|
|
@ -194,7 +362,10 @@ class SensorFluxo {
|
|||
|
||||
void SFTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
int pulsos = 0;
|
||||
volatile int pulsos = 0;
|
||||
volatile int pulsosA = 0;
|
||||
volatile float periodo = 0;
|
||||
volatile float periodoTotal = 0;
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
|
|
@ -210,10 +381,11 @@ class SensorFluxo {
|
|||
|
||||
// Calcular o período em microssegundos
|
||||
unsigned long tempoAtual = micros();
|
||||
unsigned long periodoUs = tempoAtual - tempoAnterior;
|
||||
unsigned long periodoUs = pulsos == 1 ? 0 : (tempoAtual - tempoAnterior);
|
||||
periodo = periodoUs / 1000.0; // Converte de us para ms (2300 us para 2,3 ms)
|
||||
periodoTotal += periodo;
|
||||
|
||||
CalcularFluxo(periodo);
|
||||
//CalcularFluxo(periodo);
|
||||
|
||||
tempoAnterior = tempoAtual;
|
||||
}
|
||||
|
|
@ -223,14 +395,14 @@ class SensorFluxo {
|
|||
int Tempo = _TaxaAmostragem + _delayAmostragem;
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= Tempo) {
|
||||
if (pulsos == 0) {
|
||||
periodo = 0;
|
||||
fluxo = 0;
|
||||
}
|
||||
if (pulsos == pulsosA) {
|
||||
periodoTotal = 0;
|
||||
pulsos = 0;
|
||||
}
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sFLX, _ID, MontarDadosProtocoloFluxo(fluxo, periodo)));
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sFLX, _ID, MontarDadosProtocoloFluxo(pulsos, periodoTotal)));
|
||||
|
||||
pulsosA = pulsos;
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
|
|
@ -239,11 +411,6 @@ class SensorFluxo {
|
|||
}
|
||||
}
|
||||
|
||||
void CalcularFluxo(float periodo) {
|
||||
// Supondo que calibracao seja o número de pulsos por litro (450 pulsos/litro neste exemplo)
|
||||
fluxo = (1.0 / _calibragem) * (60 * 1000 / periodo); // Calcula o fluxo em L/min
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorMassa {
|
||||
|
|
@ -261,6 +428,7 @@ class SensorMassa {
|
|||
int _prioridade;
|
||||
|
||||
HX711* balanca = nullptr;
|
||||
SimpleKalmanFilter* filtro = nullptr;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
|
|
@ -273,9 +441,10 @@ class SensorMassa {
|
|||
|
||||
if (_pinoDT > -1 && _pinoSCK > -1) {
|
||||
balanca = new HX711();
|
||||
filtro = new SimpleKalmanFilter(2, 2, 0.01);
|
||||
balanca->begin(_pinoDT, _pinoSCK);
|
||||
balanca->set_scale();
|
||||
balanca->tare();
|
||||
//balanca->tare();
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorMassa::SMTaskWrapper, "SMTask", 5000, this, _prioridade, &SMTaskHandle, tskNO_AFFINITY);
|
||||
|
|
@ -295,6 +464,7 @@ class SensorMassa {
|
|||
}
|
||||
|
||||
delete balanca;
|
||||
delete filtro;
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SMTaskHandle);
|
||||
|
|
@ -342,8 +512,9 @@ class SensorMassa {
|
|||
}
|
||||
|
||||
void AferirMassa() {
|
||||
float Massa = balanca->get_units(5);
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sMAS, _ID, MontarDadosProtocoloMassa(Massa)));
|
||||
float leitura = balanca->get_units(5);
|
||||
double leituraNormalizada = filtro->updateEstimate(leitura);
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sMAS, _ID, MontarDadosProtocoloMassa(leituraNormalizada)));
|
||||
}
|
||||
|
||||
};
|
||||
|
|
@ -361,6 +532,12 @@ class SensorPressao {
|
|||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
|
||||
double _Vmin = 0.0;
|
||||
double _Vmax = 4.5;
|
||||
double _Pmax = 174.045;
|
||||
|
||||
SimpleKalmanFilter* filtro = nullptr;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
void Inicializar() {
|
||||
|
|
@ -372,6 +549,7 @@ class SensorPressao {
|
|||
|
||||
if (_pino > -1) {
|
||||
pinMode(_pino, INPUT);
|
||||
filtro = new SimpleKalmanFilter(2, 2, 0.01);
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorPressao::SPTaskWrapper, "SPTask", 5000, this, _prioridade, &SPTaskHandle, tskNO_AFFINITY);
|
||||
|
|
@ -390,6 +568,8 @@ class SensorPressao {
|
|||
return;
|
||||
}
|
||||
|
||||
delete filtro;
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SPTaskHandle);
|
||||
|
||||
|
|
@ -404,6 +584,8 @@ class SensorPressao {
|
|||
}
|
||||
|
||||
private:
|
||||
double leituraNormalizada = 0.0;
|
||||
|
||||
TaskHandle_t SPTaskHandle = NULL;
|
||||
static void SPTaskWrapper(void *pvParameters) {
|
||||
SensorPressao *sensor = static_cast<SensorPressao*>(pvParameters);
|
||||
|
|
@ -420,11 +602,13 @@ class SensorPressao {
|
|||
continue;
|
||||
}
|
||||
|
||||
AferirPressao();
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
AferirPressao();
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sPRS, _ID, MontarDadosProtocoloPressao(_PressaoAtual, leituraNormalizada)));
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
|
@ -435,13 +619,11 @@ class SensorPressao {
|
|||
}
|
||||
|
||||
void AferirPressao() {
|
||||
int valorSensor = analogRead(_pino);
|
||||
// Converte o valor lido (0 a 1023) para tensão (0.5 a 4.5V)
|
||||
float tensao = map(valorSensor, 0, 1023, 500, 4500) / 1000.0;
|
||||
// Converte a tensão para pressão em MPa
|
||||
// A tensão de 0,5V corresponde a 0 MPa e 4,5V corresponde a 1,2 MPa
|
||||
float pressao = (tensao - 0.5) * (1.2 / (4.5 - 0.5));
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sPRS, _ID, MontarDadosProtocoloPressao(pressao, valorSensor)));
|
||||
int leitura = analogRead(_pino);
|
||||
leituraNormalizada = filtro->updateEstimate(leitura);
|
||||
|
||||
double tensao = fmap(leituraNormalizada, 0.0, 4095.0, 0.0, 3300.0) / 1000.0;
|
||||
_PressaoAtual = fmap(tensao, _Vmin, _Vmax, 0.0, _Pmax);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
@ -456,6 +638,7 @@ BicoPulverizador B_07("B07 ");
|
|||
BicoPulverizador B_08("B08 ");
|
||||
BicoPulverizador B_09("B09 ");
|
||||
BicoPulverizador B_10("B10 ");
|
||||
BombaPressurizadora BOMBA("BOMBA");
|
||||
SensorFluxo SenFlx("FLXLN");
|
||||
SensorMassa SenMas("MASRS");
|
||||
SensorPressao SenPrs("PRSLN");
|
||||
|
|
@ -476,6 +659,13 @@ BicoPulverizador* BicoPorID(String ID) {
|
|||
return _bico;
|
||||
}
|
||||
|
||||
BombaPressurizadora* BombaPorID(String ID) {
|
||||
BombaPressurizadora* _bomba =
|
||||
ID == "BOMBA" ? &BOMBA :
|
||||
nullptr;
|
||||
return _bomba;
|
||||
}
|
||||
|
||||
SensorFluxo* SFPorID(String ID) {
|
||||
SensorFluxo* _sensor =
|
||||
ID == "FLXLN" ? &SenFlx :
|
||||
|
|
@ -497,6 +687,23 @@ SensorPressao* SPPorID(String ID) {
|
|||
return _sensor;
|
||||
}
|
||||
|
||||
static bool ExisteBicoAtuado() {
|
||||
if (B_01.Iniciado && ((AtuacaoNivelAlto && B_01.StatusBico) || (!AtuacaoNivelAlto && !B_01.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_02.Iniciado && ((AtuacaoNivelAlto && B_02.StatusBico) || (!AtuacaoNivelAlto && !B_02.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_03.Iniciado && ((AtuacaoNivelAlto && B_03.StatusBico) || (!AtuacaoNivelAlto && !B_03.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
else if (B_04.Iniciado && ((AtuacaoNivelAlto && B_04.StatusBico) || (!AtuacaoNivelAlto && !B_04.StatusBico))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ZerarPinos() {
|
||||
//const int gpios[] = {2, 4, 5, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33};
|
||||
const int gpios[] = {4, 5, 6, 7, 15, 16, 17, 18, 8, 3, 46, 9, 10, 11, 12, 13, 14, 19, 20, 21, 47, 48, 45, 0, 35, 36, 37, 38, 39, 40, 41, 42, 2, 1};
|
||||
|
|
@ -511,11 +718,6 @@ void setup() {
|
|||
Serial.begin(_baudRate);
|
||||
|
||||
ZerarPinos();
|
||||
|
||||
if (_pinoReleGeral > -1) {
|
||||
pinMode(_pinoReleGeral, OUTPUT);
|
||||
digitalWrite(_pinoReleGeral, LOW);
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
|
@ -551,19 +753,13 @@ void loop() {
|
|||
|
||||
AtuacaoNivelAlto = _AtuaNivelAlto;
|
||||
|
||||
if (pinoReleGeral > -1) {
|
||||
pinMode(_pinoReleGeral, INPUT);
|
||||
_pinoReleGeral = pinoReleGeral;
|
||||
pinMode(_pinoReleGeral, OUTPUT);
|
||||
digitalWrite(_pinoReleGeral, Conectar);
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
Conectado = Conectar;
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, "MD ", Conectado ? "1" : "0"));
|
||||
}
|
||||
else {
|
||||
BicoPulverizador* _bico = BicoPorID(ID);
|
||||
BombaPressurizadora* _bomba = BombaPorID(ID);
|
||||
|
||||
if (_bico != nullptr) {
|
||||
bool bico_ativado = (String)Protocolo[8] == "1";
|
||||
|
|
@ -582,6 +778,31 @@ void loop() {
|
|||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
}
|
||||
}
|
||||
else if (_bomba != nullptr) {
|
||||
bool bomba_ativada = (String)Protocolo[8] == "1";
|
||||
double pressaoSP = ((String)Protocolo[10] + (String)Protocolo[11] + (String)Protocolo[12]).toDouble();
|
||||
int pinoEN = ((String)Protocolo[14] + (String)Protocolo[15]).toInt();
|
||||
int pinoCS = ((String)Protocolo[17] + (String)Protocolo[18]).toInt();
|
||||
int pinoINA = ((String)Protocolo[20] + (String)Protocolo[21]).toInt();
|
||||
int pinoINB = ((String)Protocolo[23] + (String)Protocolo[24]).toInt();
|
||||
int pinoPWM = ((String)Protocolo[26] + (String)Protocolo[27]).toInt();
|
||||
if (bomba_ativada) {
|
||||
if (Conectar) {
|
||||
_bomba->_PressaoSP = pressaoSP;
|
||||
_bomba->_pinoEN = pinoEN;
|
||||
_bomba->_pinoCS = pinoCS;
|
||||
_bomba->_pinoINA = pinoINA;
|
||||
_bomba->_pinoINB = pinoINB;
|
||||
_bomba->_pinoPWM = pinoPWM;
|
||||
|
||||
_bomba->Inicializar();
|
||||
}
|
||||
else {
|
||||
_bomba->Desligar();
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
}
|
||||
}
|
||||
else {
|
||||
S_Code componente = (S_Code)((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10]).toInt();
|
||||
bool sensor_ativado = (String)Protocolo[12] == "1";
|
||||
|
|
@ -594,8 +815,6 @@ void loop() {
|
|||
case sFLX: {
|
||||
SensorFluxo* _sensor = SFPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
double calibragem = ((String)Protocolo[29] + (String)Protocolo[30] + (String)Protocolo[31] + (String)Protocolo[32] + (String)Protocolo[33] + (String)Protocolo[34]).toDouble();
|
||||
_sensor->_calibragem = (float)calibragem;
|
||||
if (Conectar) {
|
||||
_sensor->_pino = pino;
|
||||
_sensor->_prioridade = prioridade;
|
||||
|
|
@ -629,7 +848,14 @@ void loop() {
|
|||
case sPRS: {
|
||||
SensorPressao* _sensor = SPPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
double Vmin = ((String)Protocolo[29] + (String)Protocolo[30] + (String)Protocolo[31] + (String)Protocolo[32] + (String)Protocolo[33] + (String)Protocolo[34]).toDouble();
|
||||
double Vmax = ((String)Protocolo[36] + (String)Protocolo[37] + (String)Protocolo[38] + (String)Protocolo[39] + (String)Protocolo[40] + (String)Protocolo[41]).toDouble();
|
||||
double Pmax = ((String)Protocolo[43] + (String)Protocolo[44] + (String)Protocolo[45] + (String)Protocolo[46] + (String)Protocolo[47] + (String)Protocolo[48]).toDouble();
|
||||
if (Conectar) {
|
||||
_sensor->_Vmin = Vmin;
|
||||
_sensor->_Vmax = Vmax;
|
||||
_sensor->_Pmax = Pmax;
|
||||
|
||||
_sensor->_pino = pino;
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
|
@ -651,13 +877,21 @@ void loop() {
|
|||
else if (_funcao == Cmd) {
|
||||
//canal;potencia;sentido;rampa;precisao;rpm
|
||||
//0;000;0;000;000;000
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2] + " ");
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2] + (String)Protocolo[3] + (String)Protocolo[4]);
|
||||
|
||||
BicoPulverizador* _bico = BicoPorID(ID);
|
||||
BombaPressurizadora* _bomba = BombaPorID(ID);
|
||||
|
||||
_bico->_BicoAtuado = (String)Protocolo[4] == (AtuacaoNivelAlto ? "1" : "0");
|
||||
if (_bico != nullptr) {
|
||||
_bico->_BicoAtuado = (String)Protocolo[6] == (AtuacaoNivelAlto ? "1" : "0");
|
||||
_bico->AlterarStatusBico();
|
||||
}
|
||||
else if (_bomba != nullptr) {
|
||||
_bomba->_BombaAtuada = (String)Protocolo[6] == "1";
|
||||
_bomba->_PressaoSP = ((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10]).toDouble();
|
||||
_bomba->AlterarStatusBomba();
|
||||
}
|
||||
}
|
||||
else if (_funcao == Tst) {
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2]);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ enum S_Code {
|
|||
sPRS = 333,
|
||||
sMAG = 855,
|
||||
sBMB = 325,
|
||||
sLED = 445,
|
||||
};
|
||||
|
||||
enum Sentido {
|
||||
|
|
@ -53,4 +54,11 @@ enum StatusMotor {
|
|||
Desacelerando,
|
||||
};
|
||||
|
||||
enum StatusLED
|
||||
{
|
||||
Apagado = 0,
|
||||
Aceso = 1,
|
||||
Piscando = 2
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// Dispositivo: Sensoriamento
|
||||
// Versão Firmware: 6
|
||||
// Ultima atualização: 13/03/2024
|
||||
// Ultima atualização: 26/03/2024
|
||||
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\SerialService.h"
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\Utils.h"
|
||||
|
|
@ -21,8 +21,8 @@ bool Conectado = false;
|
|||
int _TaxaAmostragem;
|
||||
int FrequenciaMaxima = 10000;
|
||||
|
||||
#define _pinoSDA 19
|
||||
#define _pinoSCL 20
|
||||
int _pinoSDA = 32;
|
||||
int _pinoSCL = 33;
|
||||
|
||||
|
||||
class SensorTemperatura {
|
||||
|
|
@ -654,6 +654,14 @@ void loop() {
|
|||
bool Conectar = (String)Protocolo[6] == "1";
|
||||
if (ID == "MD ") {
|
||||
_TaxaAmostragem = ((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10] + (String)Protocolo[11] + (String)Protocolo[12]).toInt();
|
||||
int pinoSDA = ((String)Protocolo[14] + (String)Protocolo[15]).toInt();
|
||||
int pinoSCL = ((String)Protocolo[17] + (String)Protocolo[18]).toInt();
|
||||
|
||||
if (pinoSDA > -1 && pinoSCL > -1) {
|
||||
_pinoSDA = pinoSDA;
|
||||
_pinoSCL = pinoSCL;
|
||||
Wire.begin(_pinoSDA, _pinoSCL);
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
Conectado = Conectar;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,923 @@
|
|||
// Dispositivo: Sensoriamento
|
||||
// Versão Firmware: 7
|
||||
// Ultima atualização: 01/04/2024
|
||||
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\SerialService.h"
|
||||
#include "C:\ZendionInc\agrobot_base\Firmware\Modulos\Utils.h"
|
||||
|
||||
#include <SimpleKalmanFilter.h>
|
||||
#include <INA226.h>
|
||||
#include <MechaQMC5883.h>
|
||||
#include <Wire.h>
|
||||
|
||||
#define D_Code Sen
|
||||
|
||||
#define _pinoLED RGB_BUILTIN
|
||||
|
||||
long _baudRate = 115200;
|
||||
|
||||
bool Conectado = false;
|
||||
|
||||
int _TaxaAmostragem;
|
||||
int FrequenciaMaxima = 10000;
|
||||
|
||||
int _pinoSDA = 32;
|
||||
int _pinoSCL = 33;
|
||||
|
||||
|
||||
class SensorTemperatura {
|
||||
public:
|
||||
SensorTemperatura(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sTMP;
|
||||
int _pino;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
float Voffset = 0.0;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
SimpleKalmanFilter* tempKalman;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pino > -1) {
|
||||
pinMode(_pino, INPUT);
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorTemperatura::STTaskWrapper, "STTask", 5000, this, _prioridade, &STTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
tempKalman = new SimpleKalmanFilter(2, 2, 0.01);
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(STTaskHandle);
|
||||
|
||||
delete tempKalman;
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pino, INPUT);
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// Variáveis
|
||||
double Vs = 3.3; // TENSÃO DE SAIDA DO ESP32
|
||||
double R1 = 10000; //RESISTOR UTILIZADO NO DIVISOR DE TENSÃO
|
||||
double Beta = 3950; // VALOR DE BETA
|
||||
double To = 298.15; // VALOR EM KELVIN REFERENTE A 25° CELSIUS
|
||||
double Ro = 10000;
|
||||
double adcMax = 4095.0;
|
||||
|
||||
TaskHandle_t STTaskHandle = NULL;
|
||||
static void STTaskWrapper(void *pvParameters) {
|
||||
SensorTemperatura *sensor = static_cast<SensorTemperatura*>(pvParameters);
|
||||
sensor->STTask();
|
||||
}
|
||||
|
||||
void STTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
AferirTemperatura();
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AferirTemperatura() {
|
||||
double Vout, Rt = 0;
|
||||
double T, Tc, Tf, adc = 0;
|
||||
adc = analogRead(_pino); // VARIÁVEL QUE RECEBE A LEITURA DO NTC10K
|
||||
float adcValue = tempKalman->updateEstimate(adc);
|
||||
//CALCULOS PARA CONVERSÃO DA LEITURA RECEBIDA PELO ESP32 EM TEMPERATURA EM °C
|
||||
Vout = (adcValue * Vs / adcMax) + Voffset;
|
||||
Rt = R1 * Vout / (Vs - Vout);
|
||||
T = 1 / (1 / To + log(Rt / Ro) / Beta);
|
||||
Tc = T - 273.15;
|
||||
Tf = Tc * 9 / 5 + 32;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sTMP, _ID, MontarDadosProtocoloNTC10K(Tc)));
|
||||
}
|
||||
};
|
||||
|
||||
class SensorTensao {
|
||||
public:
|
||||
SensorTensao(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Variáveis
|
||||
const float Vcc = 3.3; // Tensão de alimentação
|
||||
float Voffset = 0.85;
|
||||
int R1 = 47000;
|
||||
int R2 = 10000;
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sTEN;
|
||||
int _pino;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
|
||||
SimpleKalmanFilter* kalmanTEN;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pino > -1) {
|
||||
pinMode(_pino, INPUT);
|
||||
}
|
||||
|
||||
kalmanTEN = new SimpleKalmanFilter(2, 2, 0.01);
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorTensao::SVTaskWrapper, "SVTask", 5000, this, _prioridade, &SVTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SVTaskHandle);
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pino, INPUT);
|
||||
|
||||
delete kalmanTEN;
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
TaskHandle_t SVTaskHandle = NULL;
|
||||
static void SVTaskWrapper(void *pvParameters) {
|
||||
SensorTensao *sensor = static_cast<SensorTensao*>(pvParameters);
|
||||
sensor->SVTask();
|
||||
}
|
||||
|
||||
void SVTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
AferirTensao();
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AferirTensao() {
|
||||
float Razao = (R1 + R2) / (float)R2;
|
||||
int adcV = analogRead(_pino);
|
||||
float adcValueV = adcV; //float adcValueV = kalmanTEN->updateEstimate(adcV);
|
||||
|
||||
float voltageV = (adcValueV * (Vcc / 4095.0)) + (Voffset / Razao); // Convertendo o valor ADC para tensão
|
||||
float realVoltage = voltageV * Razao;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sTEN, _ID, MontarDadosProtocoloTensao(adcValueV, voltageV, realVoltage)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorCorrente {
|
||||
public:
|
||||
SensorCorrente(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Variáveis
|
||||
INA226* INA = nullptr;
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sCOR;
|
||||
byte _Endereco;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
INA = new INA226(_Endereco);
|
||||
Iniciado = INA->begin();
|
||||
if (Iniciado) {
|
||||
INA->setMaxCurrentShunt(1, 0.002);
|
||||
xTaskCreatePinnedToCore(&SensorCorrente::SATaskWrapper, "SATask", 5000, this, _prioridade, &SATaskHandle, tskNO_AFFINITY);
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
}
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SATaskHandle);
|
||||
|
||||
delete INA;
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
TaskHandle_t SATaskHandle = NULL;
|
||||
static void SATaskWrapper(void *pvParameters) {
|
||||
SensorCorrente *sensor = static_cast<SensorCorrente*>(pvParameters);
|
||||
sensor->SATask();
|
||||
}
|
||||
|
||||
void SATask() {
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
AferirCorrente();
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AferirCorrente() {
|
||||
float busVoltage = INA->getBusVoltage();
|
||||
float shuntVoltage = INA->getShuntVoltage_mV();
|
||||
float current = INA->getCurrent();
|
||||
float power = INA->getPower();
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCOR, _ID, MontarDadosProtocoloINA226(busVoltage, shuntVoltage, current, power)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorUltrassom {
|
||||
public:
|
||||
SensorUltrassom(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Variáveis
|
||||
#define SOUND_SPEED 0.034
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sULT;
|
||||
int _pinoE;
|
||||
int _pinoT;
|
||||
int _pino;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pinoE > -1) {
|
||||
pinMode(_pinoE, INPUT);
|
||||
}
|
||||
if (_pinoT > -1) {
|
||||
pinMode(_pinoT, OUTPUT);
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorUltrassom::SUTaskWrapper, "SUTask", 5000, this, _prioridade, &SUTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SUTaskHandle);
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pinoE, INPUT);
|
||||
pinMode(_pinoT, INPUT);
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
TaskHandle_t SUTaskHandle = NULL;
|
||||
static void SUTaskWrapper(void *pvParameters) {
|
||||
SensorUltrassom *sensor = static_cast<SensorUltrassom*>(pvParameters);
|
||||
sensor->SUTask();
|
||||
}
|
||||
|
||||
void SUTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
AferirDistancia();
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AferirDistancia() {
|
||||
digitalWrite(_pinoT, LOW);
|
||||
delayMicroseconds(2);
|
||||
digitalWrite(_pinoT, HIGH);
|
||||
delayMicroseconds(10);
|
||||
digitalWrite(_pinoT, LOW);
|
||||
long duration = pulseIn(_pinoE, HIGH);
|
||||
float distanceCm = duration * SOUND_SPEED / 2;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sULT, _ID, MontarDadosProtocoloUltrassom(distanceCm, duration)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class SensorMagnetometro {
|
||||
public:
|
||||
SensorMagnetometro(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
// Variáveis
|
||||
MechaQMC5883* qmc = nullptr;
|
||||
|
||||
// Definições
|
||||
String _ID;
|
||||
S_Code _componente = sMAG;
|
||||
byte _Endereco;
|
||||
int _delayAmostragem;
|
||||
int _prioridade;
|
||||
|
||||
bool Iniciado = false;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
qmc = new MechaQMC5883();
|
||||
qmc->init();
|
||||
|
||||
xTaskCreatePinnedToCore(&SensorMagnetometro::SMTaskWrapper, "SMTask", 5000, this, _prioridade, &SMTaskHandle, tskNO_AFFINITY);
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(SMTaskHandle);
|
||||
|
||||
delete qmc;
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
TaskHandle_t SMTaskHandle = NULL;
|
||||
static void SMTaskWrapper(void *pvParameters) {
|
||||
SensorMagnetometro *sensor = static_cast<SensorMagnetometro*>(pvParameters);
|
||||
sensor->SMTask();
|
||||
}
|
||||
|
||||
void SMTask() {
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
// A cada _TaxaAmostragem, enviar os dados para o software
|
||||
if (intMillis >= (_TaxaAmostragem + _delayAmostragem)) {
|
||||
AferirOrientacao();
|
||||
|
||||
firstMilis = millis();
|
||||
}
|
||||
|
||||
// Aguarda metade do menor período possível entre leituras
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void AferirOrientacao() {
|
||||
int x, y, z;
|
||||
float orientacao;
|
||||
qmc->read(&x, &y, &z,&orientacao);
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sMAG, _ID, MontarDadosProtocoloMagnetometro(x, y, z, orientacao)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class Sinaleiro {
|
||||
public:
|
||||
Sinaleiro(String desc) {
|
||||
_ID = desc;
|
||||
}
|
||||
|
||||
String _ID;
|
||||
int _pino;
|
||||
bool Iniciado = false;
|
||||
|
||||
StatusLED _Status = Apagado;
|
||||
int _Qtd = 0;
|
||||
int _TempoMs = 0;
|
||||
int _PausaMs = 0;
|
||||
|
||||
void Inicializar() {
|
||||
if (Iniciado) {
|
||||
EnviarDadosSerial(_ID + " ja inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pino > -1) {
|
||||
pinMode(_pino, OUTPUT);
|
||||
digitalWrite(_pino, LOW);
|
||||
}
|
||||
|
||||
xTaskCreatePinnedToCore(&Sinaleiro::LEDTaskWrapper, "LEDTask", 5000, this, 6, &LEDTaskHandle, tskNO_AFFINITY);
|
||||
|
||||
EnviarDadosSerial(_ID + " Iniciado");
|
||||
|
||||
Iniciado = true;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
void Desligar() {
|
||||
if (!Iniciado) {
|
||||
EnviarDadosSerial(_ID + " nao esta inicializado");
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Parar a execução das tarefas
|
||||
vTaskDelete(LEDTaskHandle);
|
||||
|
||||
// Redefinir as configurações para os valores iniciais
|
||||
pinMode(_pino, INPUT);
|
||||
|
||||
EnviarDadosSerial(_ID + " Desligado");
|
||||
|
||||
Iniciado = false;
|
||||
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, _ID, Iniciado ? "1" : "0"));
|
||||
}
|
||||
|
||||
private:
|
||||
TaskHandle_t LEDTaskHandle = NULL;
|
||||
static void LEDTaskWrapper(void *pvParameters) {
|
||||
Sinaleiro *led = static_cast<Sinaleiro*>(pvParameters);
|
||||
led->LEDTask();
|
||||
}
|
||||
|
||||
void LEDTask() {
|
||||
int Piscadas = 0;
|
||||
unsigned long firstMilis = millis();
|
||||
while (1)
|
||||
{
|
||||
if (!Conectado) {
|
||||
// Caso não esteja conectado, aguarda 1 segundo até a próxima verificação, liberando uso de CPU
|
||||
vTaskDelay(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
long intMillis = (millis() - firstMilis);
|
||||
|
||||
if (_Status != Piscando) {
|
||||
digitalWrite(_pino, _Status == Aceso ? HIGH : LOW);
|
||||
}
|
||||
else {
|
||||
int TempoComparar = 0;
|
||||
bool StatusAplicar = false;
|
||||
bool Fim = false;
|
||||
|
||||
if (Piscadas < _Qtd) {
|
||||
TempoComparar = _TempoMs;
|
||||
StatusAplicar = !digitalRead(_pino);
|
||||
Fim = false;
|
||||
}
|
||||
else {
|
||||
TempoComparar = _PausaMs;
|
||||
StatusAplicar = false;
|
||||
Fim = true;
|
||||
}
|
||||
if (intMillis >= TempoComparar) {
|
||||
digitalWrite(_pino, StatusAplicar);
|
||||
firstMilis = millis();
|
||||
Piscadas = Fim ? 0 : Piscadas++;
|
||||
}
|
||||
}
|
||||
|
||||
vTaskDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
SensorTemperatura TM1("TMVET");
|
||||
SensorTemperatura TM2("TMVEF");
|
||||
SensorTemperatura TM3("TMVDT");
|
||||
SensorTemperatura TM4("TMVDF");
|
||||
SensorTemperatura TBAT("TBAT ");
|
||||
SensorTensao VBAT("VBAT ");
|
||||
SensorCorrente AM1("AMVET");
|
||||
SensorCorrente AM2("AMVEF");
|
||||
SensorCorrente AM3("AMVDT");
|
||||
SensorCorrente AM4("AMVDF");
|
||||
SensorCorrente AMP("AMP ");
|
||||
SensorCorrente AAT("AAT ");
|
||||
SensorCorrente APC("APC ");
|
||||
SensorUltrassom SUESQ("SUESQ");
|
||||
SensorUltrassom SUDIR("SUDIR");
|
||||
SensorMagnetometro SMAG("SMAG ");
|
||||
Sinaleiro LED_AT("LEDAT");
|
||||
Sinaleiro LED_MN("LEDMN");
|
||||
Sinaleiro LED_OP("LEDOP");
|
||||
|
||||
|
||||
SensorTemperatura* STPorID(String ID) {
|
||||
SensorTemperatura* _sensor =
|
||||
ID == "TMVET" ? &TM1 :
|
||||
ID == "TMVEF" ? &TM2 :
|
||||
ID == "TMVDT" ? &TM3 :
|
||||
ID == "TMVDF" ? &TM4 :
|
||||
ID == "TBAT " ? &TBAT :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
SensorTensao* SVPorID(String ID) {
|
||||
SensorTensao* _sensor =
|
||||
ID == "VBAT " ? &VBAT :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
SensorCorrente* SAPorID(String ID) {
|
||||
SensorCorrente* _sensor =
|
||||
ID == "AMVET" ? &AM1 :
|
||||
ID == "AMVEF" ? &AM2 :
|
||||
ID == "AMVDT" ? &AM3 :
|
||||
ID == "AMVDF" ? &AM4 :
|
||||
ID == "AMP " ? & :
|
||||
ID == "AAT " ? &AAT :
|
||||
ID == "APC " ? &APC :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
SensorUltrassom* SUPorID(String ID) {
|
||||
SensorUltrassom* _sensor =
|
||||
ID == "SUESQ" ? &SUESQ :
|
||||
ID == "SUDIR" ? &SUDIR :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
SensorMagnetometro* SMPorID(String ID) {
|
||||
SensorMagnetometro* _sensor =
|
||||
ID == "SMAG " ? &SMAG :
|
||||
nullptr;
|
||||
return _sensor;
|
||||
}
|
||||
|
||||
Sinaleiro* SinaleiroPorID(String ID) {
|
||||
Sinaleiro* _led =
|
||||
ID == "LEDAT" ? &LED_AT :
|
||||
ID == "LEDMN" ? &LED_MN :
|
||||
ID == "LEDOP" ? &LED_OP :
|
||||
nullptr;
|
||||
return _led;
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(_baudRate);
|
||||
Wire.begin(_pinoSDA, _pinoSCL);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (Serial.available() > 3) {
|
||||
String Protocolo = "";
|
||||
F_Code _funcao = Nda;
|
||||
while (Serial.available()) {
|
||||
char Entrada = (char)Serial.read();
|
||||
if (Entrada == EndLine) {
|
||||
break;
|
||||
}
|
||||
Protocolo += Entrada;
|
||||
if (Protocolo.length() == 3) {
|
||||
if (_funcao == Nda) {
|
||||
_funcao = (F_Code)((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2]).toInt();
|
||||
Protocolo = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EnviarDadosSerial("OK");
|
||||
|
||||
if (_funcao == Chk) {
|
||||
EnviarDadosSerial(MontarProtocoloVerificacao(D_Code));
|
||||
} else if (_funcao == Cfg) {
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2] + (String)Protocolo[3] + (String)Protocolo[4]);
|
||||
bool Conectar = (String)Protocolo[6] == "1";
|
||||
if (ID == "MD ") {
|
||||
_TaxaAmostragem = ((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10] + (String)Protocolo[11] + (String)Protocolo[12]).toInt();
|
||||
int pinoSDA = ((String)Protocolo[14] + (String)Protocolo[15]).toInt();
|
||||
int pinoSCL = ((String)Protocolo[17] + (String)Protocolo[18]).toInt();
|
||||
|
||||
if (pinoSDA > -1 && pinoSCL > -1) {
|
||||
_pinoSDA = pinoSDA;
|
||||
_pinoSCL = pinoSCL;
|
||||
Wire.begin(_pinoSDA, _pinoSCL);
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
Conectado = Conectar;
|
||||
EnviarDadosSerial(MontarProtocoloSensor(sCFG, "MD", Conectado ? "1" : "0"));
|
||||
}
|
||||
else {
|
||||
Sinaleiro* _led = SinaleiroPorID(ID);
|
||||
|
||||
if (_led != nullptr) {
|
||||
int pino = ((String)Protocolo[8] + (String)Protocolo[9]).toInt();
|
||||
if (pino > -1) {
|
||||
if (Conectar) {
|
||||
_led->_pino = pino;
|
||||
_led->Inicializar();
|
||||
}
|
||||
else {
|
||||
_led->Desligar();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
S_Code componente = (S_Code)((String)Protocolo[8] + (String)Protocolo[9] + (String)Protocolo[10]).toInt();
|
||||
bool sensor_ativado = (String)Protocolo[12] == "1";
|
||||
int delayAmostragem = ((String)Protocolo[14] + (String)Protocolo[15] + (String)Protocolo[16] + (String)Protocolo[17] + (String)Protocolo[18]).toInt();
|
||||
int prioridade = ((String)Protocolo[20] + (String)Protocolo[21]).toInt();
|
||||
int pino = ((String)Protocolo[23] + (String)Protocolo[24]).toInt();
|
||||
int pino2 = ((String)Protocolo[26] + (String)Protocolo[27]).toInt();
|
||||
|
||||
switch (componente) {
|
||||
case sTMP: {
|
||||
SensorTemperatura* _sensor = STPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
double _voffset = ((String)Protocolo[29] + (String)Protocolo[30] + (String)Protocolo[31] + (String)Protocolo[32] + (String)Protocolo[33] + (String)Protocolo[34]).toDouble();
|
||||
_sensor->Voffset = (float)_voffset;
|
||||
if (Conectar) {
|
||||
_sensor->_pino = pino;
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case sTEN: {
|
||||
SensorTensao* _sensor = SVPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
double _voffset = ((String)Protocolo[29] + (String)Protocolo[30] + (String)Protocolo[31] + (String)Protocolo[32] + (String)Protocolo[33] + (String)Protocolo[34]).toDouble();
|
||||
double _r1 = ((String)Protocolo[36] + (String)Protocolo[37] + (String)Protocolo[38] + (String)Protocolo[39] + (String)Protocolo[40] + (String)Protocolo[41]).toDouble();
|
||||
double _r2 = ((String)Protocolo[43] + (String)Protocolo[44] + (String)Protocolo[45] + (String)Protocolo[46] + (String)Protocolo[47] + (String)Protocolo[48]).toDouble();
|
||||
_sensor->Voffset = (float)_voffset;
|
||||
_sensor->R1 = (int)_r1;
|
||||
_sensor->R2 = (int)_r2;
|
||||
if (Conectar) {
|
||||
_sensor->_pino = pino;
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case sCOR: {
|
||||
SensorCorrente* _sensor = SAPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
String _endereco = ((String)Protocolo[29] + (String)Protocolo[30] + (String)Protocolo[31] + (String)Protocolo[32] + (String)Protocolo[33] + (String)Protocolo[34]);
|
||||
if (Conectar) {
|
||||
_sensor->_Endereco = stringToByte(_endereco);
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case sULT: {
|
||||
SensorUltrassom* _sensor = SUPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
if (Conectar) {
|
||||
_sensor->_pinoE = pino;
|
||||
_sensor->_pinoT = pino2;
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case sMAG: {
|
||||
SensorMagnetometro* _sensor = SMPorID(ID);
|
||||
if (sensor_ativado) {
|
||||
if (Conectar) {
|
||||
_sensor->_prioridade = prioridade;
|
||||
_sensor->_delayAmostragem = delayAmostragem;
|
||||
|
||||
_sensor->Inicializar();
|
||||
}
|
||||
else {
|
||||
_sensor->Desligar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (_funcao == Cmd) {
|
||||
String ID = ((String)Protocolo[0] + (String)Protocolo[1] + (String)Protocolo[2] + (String)Protocolo[3] + (String)Protocolo[4]);
|
||||
|
||||
Sinaleiro* _led = SinaleiroPorID(ID);
|
||||
|
||||
if (_led != nullptr) {
|
||||
_led->_Status = (StatusLED)((String)Protocolo[6]).toInt();
|
||||
_led->_Qtd = ((String)Protocolo[8]).toInt();
|
||||
_led->_TempoMs = ((String)Protocolo[10] + (String)Protocolo[11] + (String)Protocolo[12] + (String)Protocolo[13]).toInt();
|
||||
_led->_PausaMs = ((String)Protocolo[15] + (String)Protocolo[16] + (String)Protocolo[17] + (String)Protocolo[18]).toInt();
|
||||
}
|
||||
} else if (_funcao == Tst) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue