primeiros ajustes no sistema da base
This commit is contained in:
parent
a24c16ca67
commit
923036f0da
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.
|
|
@ -1,18 +1,14 @@
|
|||
using AForge.Video.DirectShow;
|
||||
using AForge.Video;
|
||||
using AgroBase.Models;
|
||||
using AgroBase.Models.Modules;
|
||||
using AgroBase.Services;
|
||||
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 Emgu.Util;
|
||||
|
||||
namespace AgroBase.Forms.IHM
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ namespace AgroBase.Forms
|
|||
public partial class frmInstancial : Form
|
||||
{
|
||||
public static bool DebugMode = true;
|
||||
|
||||
public static bool Fechando = false;
|
||||
|
||||
public static frmPrincipal frmPrincipal = new frmPrincipal();
|
||||
|
|
@ -40,6 +39,7 @@ namespace AgroBase.Forms
|
|||
{
|
||||
if (DebugMode)
|
||||
{
|
||||
frmIHM.FormClosing += FrmIHM_FormClosing;
|
||||
frmPrincipal.FormClosing += frmPrincipal_FormClosing;
|
||||
frmPrincipal.Show();
|
||||
}
|
||||
|
|
@ -52,6 +52,8 @@ namespace AgroBase.Forms
|
|||
this.Hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void frmInstancial_Load(object sender, EventArgs e)
|
||||
{
|
||||
FuncoesGlobais.AddApplicationToStartup();
|
||||
|
|
@ -114,5 +116,11 @@ namespace AgroBase.Forms
|
|||
e.Cancel = true;
|
||||
}
|
||||
|
||||
private void FrmIHM_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
e.Cancel = true;
|
||||
frmIHM.Hide();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
using AgroBase.Models;
|
||||
using AgroBase.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
|
@ -15,16 +11,14 @@ namespace AgroBase.Forms
|
|||
{
|
||||
public partial class frmLoraConfig : Form
|
||||
{
|
||||
LoRaService loraService;
|
||||
LoRaService loraService = Variaveis.ConexaoLoRa;
|
||||
LoRaParametrosModel Parametros = null;
|
||||
Timer tmrLeitura = new Timer() { Interval = 1000 };
|
||||
|
||||
public frmLoraConfig(LoRaService lora)
|
||||
public frmLoraConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
loraService = lora;
|
||||
|
||||
tmrLeitura.Tick += tmrLeitura_Tick;
|
||||
tmrLeitura.Start();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,8 +337,7 @@ namespace AgroBase
|
|||
{
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
|
||||
frmIHM frmIHM = new frmIHM();
|
||||
frmIHM.ShowDialog();
|
||||
frmInstancial.frmIHM.ShowDialog();
|
||||
}
|
||||
|
||||
private void btnContornos_Click(object sender, EventArgs e)
|
||||
|
|
@ -388,7 +387,7 @@ namespace AgroBase
|
|||
{
|
||||
if (LoRaService.Iniciado)
|
||||
{
|
||||
frmLoraConfig frm = new frmLoraConfig(Variaveis.ConexaoLoRa);
|
||||
frmLoraConfig frm = new frmLoraConfig();
|
||||
frm.Show();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -58,11 +58,17 @@ namespace AgroBase
|
|||
|
||||
public static void AtualizaDispositivo()
|
||||
{
|
||||
DispCon = Variaveis.DispositivosConectados.Where(x => x._Porta.IsOpen).ToList();
|
||||
frmInstancial.frmJoystick.lblDispositivo.Text = "Dispositivos: " + (DispCon.Count == 0 ? "N/A" : string.Join(", ", DispCon.Select(x => x._Descricao + " (" + Enum.GetName(typeof(T_Code), x.Dispositivo) + ")").ToArray()));
|
||||
frmInstancial.frmPrincipal.cmbJoysticks.Items.Clear();
|
||||
Func<bool> funcAtt = new Func<bool>(() =>
|
||||
{
|
||||
DispCon = Variaveis.DispositivosConectados.Where(x => x._Porta.IsOpen).ToList();
|
||||
frmInstancial.frmJoystick.lblDispositivo.Text = "Dispositivos: " + (DispCon.Count == 0 ? "N/A" : string.Join(", ", DispCon.Select(x => x._Descricao + " (" + Enum.GetName(typeof(T_Code), x.Dispositivo) + ")").ToArray()));
|
||||
frmInstancial.frmPrincipal.cmbJoysticks.Items.Clear();
|
||||
|
||||
InicializarJoysticksConectados();
|
||||
InicializarJoysticksConectados();
|
||||
|
||||
return true;
|
||||
});
|
||||
FuncoesGlobais.ExecutarMetodoComVerificacaoCrossThread(frmInstancial.frmPrincipal.cmbJoysticks, funcAtt);
|
||||
}
|
||||
|
||||
public static void InicializarJoysticksConectados()
|
||||
|
|
@ -164,6 +170,10 @@ namespace AgroBase
|
|||
|
||||
private static void TmrJoystick_Tick(object sendder, EventArgs e)
|
||||
{
|
||||
if (JoystickConectado == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
JoystickUpdate[] datas;
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2133,21 +2133,25 @@ namespace AgroBase.Models
|
|||
|
||||
bool _camerasSoloConectadas =
|
||||
!_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.CameraSolo) ||
|
||||
_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.CameraSolo && !x.Mandatorio) ||
|
||||
(_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.CameraSolo && x.Mandatorio) &&
|
||||
Variaveis.OperacaoEmAndamento.CamerasSolo.Count(y => y.Iniciada) == Variaveis.OperacaoEmAndamento.QuantidadeCamerasSolo);
|
||||
|
||||
bool _kinectConectado =
|
||||
!_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Kinect) ||
|
||||
_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Kinect && !x.Mandatorio) ||
|
||||
(_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Kinect && x.Mandatorio) &&
|
||||
(_sensoriamento.SonarFrontal_Kinect != null && _sensoriamento.SonarFrontal_Kinect.Iniciado));
|
||||
|
||||
bool _mapaIniciado =
|
||||
!_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Mapa) ||
|
||||
_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Mapa && !x.Mandatorio) ||
|
||||
(_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Mapa && x.Mandatorio) &&
|
||||
Variaveis.OperacaoEmAndamento.Mapa.mapaService.Carregado);
|
||||
|
||||
bool _joystickConectado =
|
||||
!_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Joystick) ||
|
||||
_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Joystick && !x.Mandatorio) ||
|
||||
(_parametrosMandatorios.Any(x => x.Parametro == ParametrosOperacao.Joystick && x.Mandatorio) &&
|
||||
GeneralJoystick.JoystickConectado != null);
|
||||
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ namespace AgroBase.Services
|
|||
{
|
||||
((System.Timers.Timer)sender).Stop();
|
||||
|
||||
if (!Iniciado)
|
||||
if (!Iniciado && SerialService.DispositivosMapeados.Any(x => x.Dispositivo == T_Code.Bld))
|
||||
{
|
||||
foreach (var Leitura in DadosLeitura.Where(x => x.UltimoComandoRecebido.AddSeconds(10) < DateTime.Now))
|
||||
{
|
||||
|
|
@ -706,6 +706,11 @@ namespace AgroBase.Services
|
|||
|
||||
private static void RegisrarErrosComunicacao(byte addr, string mensagem)
|
||||
{
|
||||
if (_PortaBLD == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var Caminho = Variaveis.CaminhoLogsDispositivos;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ namespace AgroBase.Comum
|
|||
public RichTextBox txaConsole { get; set; }
|
||||
public int _index { get; set; }
|
||||
public List<DispositivoLogModel> Logs { get; set; } = new List<DispositivoLogModel>();
|
||||
public readonly object _logsLock = new object();
|
||||
public T Dados { get; set; } = new T();
|
||||
DispositivoBaseModel IDispositivosService.Dados
|
||||
{
|
||||
|
|
@ -217,12 +218,15 @@ namespace AgroBase.Comum
|
|||
{
|
||||
_Porta.Write(Dados);
|
||||
//Console.WriteLine("Dados enviados: " + Dados);
|
||||
Logs.Add(new DispositivoLogModel()
|
||||
lock (_logsLock)
|
||||
{
|
||||
Momento = DateTime.Now,
|
||||
Enviado = true,
|
||||
Protocolo = Dados,
|
||||
});
|
||||
Logs.Add(new DispositivoLogModel()
|
||||
{
|
||||
Momento = DateTime.Now,
|
||||
Enviado = true,
|
||||
Protocolo = Dados,
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -613,35 +617,38 @@ namespace AgroBase.Comum
|
|||
|
||||
private void SalvarLog()
|
||||
{
|
||||
if (Logs.Count == 0)
|
||||
lock (_logsLock)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Logs.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string Caminho = Variaveis.CaminhoLogsDispositivos + Dispositivo;
|
||||
string NomeLog = _CriadoEm.ToString("dd_MM_yyyy_mm_ss") + ".json";
|
||||
if (!Directory.Exists(Caminho))
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(Caminho);
|
||||
string Caminho = Variaveis.CaminhoLogsDispositivos + Dispositivo;
|
||||
string NomeLog = _CriadoEm.ToString("dd_MM_yyyy_mm_ss") + ".json";
|
||||
if (!Directory.Exists(Caminho))
|
||||
{
|
||||
Directory.CreateDirectory(Caminho);
|
||||
}
|
||||
if (!File.Exists(Caminho + "/" + NomeLog))
|
||||
{
|
||||
string jsonLog = JsonConvert.SerializeObject(Logs, Formatting.None);
|
||||
File.WriteAllText(Caminho + "/" + NomeLog, jsonLog.Substring(0, jsonLog.Length - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
string jsonLog = JsonConvert.SerializeObject(Logs, Formatting.None);
|
||||
jsonLog = jsonLog.Substring(1, jsonLog.Length - 2);
|
||||
File.AppendAllText(Caminho + "/" + NomeLog, "," + jsonLog);
|
||||
}
|
||||
Logs = new List<DispositivoLogModel>();
|
||||
}
|
||||
if (!File.Exists(Caminho + "/" + NomeLog))
|
||||
catch (Exception ex)
|
||||
{
|
||||
string jsonLog = JsonConvert.SerializeObject(Logs, Formatting.None);
|
||||
File.WriteAllText(Caminho + "/" + NomeLog, jsonLog.Substring(0, jsonLog.Length - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
string jsonLog = JsonConvert.SerializeObject(Logs, Formatting.None);
|
||||
jsonLog = jsonLog.Substring(1, jsonLog.Length - 2);
|
||||
File.AppendAllText(Caminho + "/" + NomeLog, "," + jsonLog);
|
||||
}
|
||||
Logs = new List<DispositivoLogModel>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -845,12 +852,15 @@ namespace AgroBase.Comum
|
|||
}
|
||||
}
|
||||
|
||||
Logs.Add(new DispositivoLogModel()
|
||||
lock (_logsLock)
|
||||
{
|
||||
Momento = DateTime.Now,
|
||||
Enviado = false,
|
||||
Protocolo = Recebido,
|
||||
});
|
||||
Logs.Add(new DispositivoLogModel()
|
||||
{
|
||||
Momento = DateTime.Now,
|
||||
Enviado = false,
|
||||
Protocolo = Recebido,
|
||||
});
|
||||
}
|
||||
|
||||
AtualizarConsole("< " + DateTime.Now.ToString("HH:mm:ss:fff") + " - " + Recebido);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using AgroBase.Forms;
|
||||
using AgroBase.Models;
|
||||
using Emgu.CV.Features2D;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -8,9 +7,6 @@ using System.Globalization;
|
|||
using System.IO;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static AgroBase.Models.Enums;
|
||||
using static AgroBase.Services.SerialService;
|
||||
|
|
@ -591,10 +587,16 @@ namespace AgroBase.Services
|
|||
|
||||
public static void AtualizarCoordenadasGPS()
|
||||
{
|
||||
if (Variaveis.IsAgroMonitor)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
frmInstancial.frmAcompanhamento.AtualizarOrientacao();
|
||||
|
||||
int ID = Convert.ToInt32(Variaveis.IsAgroMonitor ? Variaveis.OperacaoEmAndamento.DispSen.Dados.LoRaParametrosBase.address : Variaveis.ConexaoLoRa.parametros.address);
|
||||
EnviarCoordenadasParaMapa(UltimaLeitura.Latitude, UltimaLeitura.Longitude, ((Variaveis.OperacaoEmAndamento.Sensoriamento?.AnguloCarro ?? 0) - 180), true, ID);
|
||||
int ID = Convert.ToInt32(Variaveis.ConexaoLoRa.parametros.address);
|
||||
double angulo = ((Variaveis.OperacaoEmAndamento.Sensoriamento?.AnguloCarro ?? 0) - 180);
|
||||
EnviarCoordenadasParaMapa(UltimaLeitura.Latitude, UltimaLeitura.Longitude, angulo, true, ID);
|
||||
|
||||
if (Variaveis.OperacaoEmAndamento.Iniciado)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ namespace AgroBase.Services
|
|||
|
||||
|
||||
public static int MensagensEnviadas { get; set; } = 0;
|
||||
public static readonly object _dadosOperacaoLock = new object();
|
||||
public static List<LoRaProtocoloTransmissaoModel> LeituraDadosOperacao = new List<LoRaProtocoloTransmissaoModel>();
|
||||
|
||||
|
||||
|
|
@ -423,7 +424,10 @@ namespace AgroBase.Services
|
|||
byte[] bufferDados = new byte[resposta.Buffer.Length - 4];
|
||||
Array.Copy(resposta.Buffer, 4, bufferDados, 0, bufferDados.Length);
|
||||
LoRaProtocoloTransmissaoModel Dados = LoRaSerializer.DeserializeLoRaProtocoloTransmissaoModel(bufferDados);
|
||||
LeituraDadosOperacao.Add(Dados);
|
||||
lock (_dadosOperacaoLock)
|
||||
{
|
||||
LeituraDadosOperacao.Add(Dados);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LoRaTipoProtocolo.PosicaoGPS:
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ namespace AgroBase.Services
|
|||
{
|
||||
((System.Timers.Timer)sender).Stop();
|
||||
|
||||
if (!Iniciado)
|
||||
if (!Iniciado && SerialService.DispositivosMapeados.Any(x => x.Dispositivo == T_Code.Mks))
|
||||
{
|
||||
foreach (var Leitura in DadosLeitura.Where(x => x.UltimoComandoRecebido.AddSeconds(10) < DateTime.Now))
|
||||
{
|
||||
|
|
@ -159,7 +159,7 @@ namespace AgroBase.Services
|
|||
AdicionarComandoNaFila(MontarComandoRequisicaoPulsos(AddrRef));
|
||||
AdicionarComandoNaFila(MontarComandoRequisicaoIO(AddrRef));
|
||||
}
|
||||
else
|
||||
else if (Variaveis.OperacaoEmAndamento.DispMvd != null)
|
||||
{
|
||||
foreach (var Modulo in Variaveis.OperacaoEmAndamento.DispMvd.Dados.Modulos.Where(x => x.DirMotor.MKS_Inicializado))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,16 +4,12 @@ using AgroBase.Services;
|
|||
using MQTTnet;
|
||||
using MQTTnet.Client;
|
||||
using MQTTnet.Client.Options;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public class MqttService
|
||||
{
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ namespace AgroBase.Services
|
|||
|
||||
try
|
||||
{
|
||||
ProcurarDispositivoKinect();
|
||||
ProcurarDispositivosUSB();
|
||||
|
||||
var dispositivosMapeados = DispositivosMapeados.ToList();
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ namespace AgroBase.Services
|
|||
{
|
||||
DispositivoMvd = await ProcuraDispositivoMvd(_Porta);
|
||||
}
|
||||
else
|
||||
else if (DispositivoSen)
|
||||
{
|
||||
AtualizarConsole("Dispositivo SEN encontrado");
|
||||
}
|
||||
|
|
@ -490,38 +490,42 @@ namespace AgroBase.Services
|
|||
|
||||
private static async Task<bool> ProcuraDispositivoModbus(SerialPort porta, bool PararAoEncontrar)
|
||||
{
|
||||
if (ModbusService.Iniciado && porta.PortName != ModbusService._PortaModbus.PortName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
AtualizarConsole("Procurando dispositivos Modbus");
|
||||
bool Encontrado = false;
|
||||
|
||||
if (!PZEMService.Iniciado || !DispositivosMapeados.Any(x => x.Dispositivo == T_Code.Pzm))
|
||||
{
|
||||
AtualizarConsole("Procurando dispositivo PZM");
|
||||
Encontrado = await PZEMService.VerificaPortaPZEM(ModbusService.Iniciado ? ModbusService._PortaModbus : porta);
|
||||
bool _encontrado = await PZEMService.VerificaPortaPZEM(ModbusService.Iniciado ? ModbusService._PortaModbus : porta);
|
||||
|
||||
if (Encontrado && PararAoEncontrar)
|
||||
if (_encontrado && PararAoEncontrar)
|
||||
{
|
||||
AtualizarConsole("Dispositivo PZM encontrado");
|
||||
return Encontrado;
|
||||
return _encontrado;
|
||||
}
|
||||
}
|
||||
if (!WT901CService.Iniciado || !DispositivosMapeados.Any(x => x.Dispositivo == T_Code.Wit))
|
||||
{
|
||||
AtualizarConsole("Procurando dispositivo WIT");
|
||||
Encontrado = await WT901CService.VerificaPortaWT901C(ModbusService.Iniciado ? ModbusService._PortaModbus : porta);
|
||||
if (Encontrado && PararAoEncontrar)
|
||||
bool _encontrado = await WT901CService.VerificaPortaWT901C(ModbusService.Iniciado ? ModbusService._PortaModbus : porta);
|
||||
if (_encontrado && PararAoEncontrar)
|
||||
{
|
||||
AtualizarConsole("Dispositivo WIT encontrado");
|
||||
return Encontrado;
|
||||
return _encontrado;
|
||||
}
|
||||
}
|
||||
if (!UltrasonicA05Service.Iniciado || !DispositivosMapeados.Any(x => x.Dispositivo == T_Code.A05))
|
||||
{
|
||||
AtualizarConsole("Procurando dispositivo A05");
|
||||
Encontrado = await UltrasonicA05Service.VerificaPortaA05(ModbusService.Iniciado ? ModbusService._PortaModbus : porta);
|
||||
if (Encontrado && PararAoEncontrar)
|
||||
bool _encontrado = await UltrasonicA05Service.VerificaPortaA05(ModbusService.Iniciado ? ModbusService._PortaModbus : porta);
|
||||
if (_encontrado && PararAoEncontrar)
|
||||
{
|
||||
AtualizarConsole("Dispositivo A05 encontrado");
|
||||
return Encontrado;
|
||||
return _encontrado;
|
||||
}
|
||||
}
|
||||
/*if (Variaveis.OperacaoEmAndamento.DispMvd != null && Variaveis.OperacaoEmAndamento.DispMvd.Dados.Modulos.Any(x => !x.MovMotor.DadosDriver.Iniciado))
|
||||
|
|
@ -540,7 +544,7 @@ namespace AgroBase.Services
|
|||
}
|
||||
}*/
|
||||
|
||||
return Encontrado;
|
||||
return ModbusService.Iniciado;
|
||||
}
|
||||
|
||||
private static async Task<bool> ProcuraDispositivoBLD(SerialPort porta)
|
||||
|
|
@ -603,11 +607,19 @@ namespace AgroBase.Services
|
|||
}
|
||||
}
|
||||
|
||||
private static void ProcurarDispositivoKinect()
|
||||
private static void ProcurarDispositivosUSB()
|
||||
{
|
||||
if (!Variaveis.IsAgroMonitor && !KinectService.Iniciado)
|
||||
if (!Variaveis.IsAgroMonitor)
|
||||
{
|
||||
KinectService.InicializarKinect();
|
||||
if (!KinectService.Iniciado)
|
||||
{
|
||||
KinectService.InicializarKinect();
|
||||
}
|
||||
|
||||
if (GeneralJoystick.JoystickConectado == null)
|
||||
{
|
||||
GeneralJoystick.AtualizaDispositivo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
using AgroBase.Forms;
|
||||
using AgroBase.Models;
|
||||
using AgroBase.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static AgroBase.Models.Enums;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AgroBase.Services
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -27196,3 +27196,165 @@
|
|||
03/10/2024 15:14:10:822 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:14:11:826 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:14:11:826 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:17:144 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:17:145 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:18:161 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:18:161 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:19:165 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:19:165 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:20:179 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:20:179 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:21:194 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:21:196 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:22:197 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:22:198 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:23:212 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:23:214 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:24:226 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:24:226 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:25:233 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:25:233 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:26:266 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:26:266 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:27:271 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:27:271 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:28:275 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:28:275 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:29:280 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:29:280 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:30:284 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:30:286 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:31:289 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:31:289 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:32:290 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:25:32:294 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:25:32:340 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:25:33:308 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:25:33:310 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:25:33:352 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:25:34:320 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:25:34:322 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:25:34:351 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:25:35:324 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:25:35:329 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:25:35:355 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:26:36:675 - Porta COM70 - 3: Resposta inválida.
|
||||
03/10/2024 15:26:37:706 - Porta COM70 - 3: Timeout ao receber resposta. GET=True, Parametro=Versao, Valor=0
|
||||
03/10/2024 15:26:47:402 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:47:403 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:48:415 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:48:415 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:49:417 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:49:417 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:50:444 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:50:446 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:51:459 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:51:460 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:52:464 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:52:465 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:53:474 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:53:475 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:54:478 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:54:479 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:55:506 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:55:508 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:56:524 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:56:525 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:57:538 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:57:538 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:58:542 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:58:543 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:59:544 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:59:545 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:00:550 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:27:00:552 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:01:568 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:27:01:570 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:27:01:617 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:27:02:590 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:27:02:594 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:27:02:618 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:27:03:605 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:27:03:609 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:27:03:619 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:27:04:618 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:27:04:619 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:27:04:680 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:28:59:784 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:28:59:785 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:00:789 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:00:789 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:01:803 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:01:805 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:02:820 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:02:820 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:03:821 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:03:822 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:04:836 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:04:836 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:05:850 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:05:851 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:06:866 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:06:867 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:07:869 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:07:870 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:08:897 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:08:897 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:09:898 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:09:898 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:10:914 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:10:915 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:11:929 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:11:930 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:12:945 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:12:945 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:14:885 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:29:15:909 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:29:16:960 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:29:17:968 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:31:26:582 - Porta COM70 - 4: Resposta inválida.
|
||||
03/10/2024 15:31:27:187 - Porta COM70 - 4: Timeout ao receber resposta. GET=True, Parametro=Versao, Valor=0
|
||||
03/10/2024 15:33:19:600 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:33:20:617 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:33:21:634 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:33:22:649 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:34:46:754 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:34:47:816 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:34:48:821 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:34:49:828 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:36:51:296 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:36:52:354 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:36:53:414 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:36:54:478 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:38:34:120 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:38:35:181 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:38:36:241 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:38:37:256 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:39:56:366 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:39:57:412 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:39:58:451 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:39:59:455 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:44:25:263 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:44:26:323 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:44:27:331 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:44:28:376 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 15:50:11:847 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 15:50:12:900 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 15:50:13:962 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 15:50:15:023 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 16:36:11:997 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 16:36:13:056 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 16:36:14:070 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 16:36:15:084 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 16:36:38:050 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 16:36:39:114 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 16:36:40:116 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 16:36:41:131 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 16:44:26:118 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 16:44:27:120 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 16:44:28:122 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 16:44:29:179 - Porta COM68 - 4: Resposta inválida.
|
||||
03/10/2024 16:44:53:462 - Porta COM68 - 1: Resposta inválida.
|
||||
03/10/2024 16:44:54:480 - Porta COM68 - 3: Resposta inválida.
|
||||
03/10/2024 16:44:55:486 - Porta COM68 - 2: Resposta inválida.
|
||||
03/10/2024 16:44:56:494 - Porta COM68 - 4: Resposta inválida.
|
||||
|
|
|
|||
|
|
@ -72387,3 +72387,133 @@
|
|||
03/10/2024 15:15:10:269 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:15:11:282 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:15:11:284 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:17:144 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:17:145 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:18:161 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:18:161 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:19:165 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:19:165 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:20:179 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:20:179 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:21:194 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:21:196 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:22:197 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:22:198 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:23:212 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:23:214 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:24:226 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:24:226 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:25:233 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:25:233 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:26:266 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:26:266 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:27:271 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:27:271 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:28:275 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:28:275 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:29:280 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:29:280 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:30:284 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:30:286 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:31:289 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:31:289 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:32:290 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:32:291 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:33:305 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:33:306 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:34:320 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:34:320 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:25:35:324 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:25:35:326 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:13:302 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:26:14:050 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:26:16:018 - Porta COM68 - 2: Porta serial não está aberta
|
||||
03/10/2024 15:26:17:298 - Porta COM68 - 4: Porta serial não está aberta
|
||||
03/10/2024 15:26:17:314 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:26:47:402 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:47:403 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:48:415 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:48:415 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:49:417 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:49:417 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:50:444 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:50:446 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:51:459 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:51:460 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:52:464 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:52:465 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:53:474 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:53:475 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:54:478 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:54:479 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:55:506 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:55:508 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:56:524 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:56:525 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:57:538 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:57:538 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:58:542 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:58:543 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:26:59:544 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:26:59:545 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:00:550 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:27:00:552 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:01:567 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:27:01:569 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:02:571 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:27:02:573 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:03:588 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:27:03:589 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:04:602 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:27:04:602 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:27:05:617 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:27:05:619 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:28:59:784 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:28:59:785 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:00:789 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:00:789 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:01:803 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:01:805 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:02:820 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:02:820 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:03:821 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:03:822 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:04:836 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:04:836 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:05:850 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:05:851 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:06:866 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:06:881 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:07:885 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:07:886 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:08:897 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:08:897 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:09:898 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:09:898 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:10:914 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:10:914 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:11:929 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:11:930 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:12:945 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:12:946 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:13:957 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:13:957 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:14:960 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:14:960 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:15:975 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:15:977 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:16:992 - Porta COM1 - 0: Reiniciando conexão com a porta COM1...
|
||||
03/10/2024 15:29:16:993 - Porta COM1 - 0: Erro ao reestabelecer conexão com a porta COM1
|
||||
03/10/2024 15:29:29:387 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:29:30:018 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:30:02:740 - Porta COM68 - 1: Porta serial não está aberta
|
||||
03/10/2024 15:30:03:757 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:30:05:539 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:30:05:539 - Porta COM68 - 3: Porta serial não está aberta
|
||||
03/10/2024 15:30:10:880 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:30:10:883 - Porta COM68 - 2: Porta serial não está aberta
|
||||
03/10/2024 15:30:10:886 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:30:11:898 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:30:11:900 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
03/10/2024 15:30:12:912 - Porta COM68 - 0: Reiniciando conexão com a porta COM68...
|
||||
03/10/2024 15:30:12:913 - Porta COM68 - 0: Erro ao reestabelecer conexão com a porta COM68
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -25,7 +25,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_f7cf9b1d703905dc42af2562c43228c7 {
|
||||
#map_254746023e723b11db94504e9793a478 {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -39,14 +39,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_f7cf9b1d703905dc42af2562c43228c7" ></div>
|
||||
<div class="folium-map" id="map_254746023e723b11db94504e9793a478" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_f7cf9b1d703905dc42af2562c43228c7 = L.map(
|
||||
"map_f7cf9b1d703905dc42af2562c43228c7",
|
||||
var map_254746023e723b11db94504e9793a478 = L.map(
|
||||
"map_254746023e723b11db94504e9793a478",
|
||||
{
|
||||
center: [0.0, 0.0],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -60,13 +60,13 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_bd1db720aa858e8b1a4444ca4570e080 = L.tileLayer(
|
||||
var tile_layer_c28f7dbc21dcb3982bcbc94ae97f0fa2 = 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_bd1db720aa858e8b1a4444ca4570e080.addTo(map_f7cf9b1d703905dc42af2562c43228c7);
|
||||
tile_layer_c28f7dbc21dcb3982bcbc94ae97f0fa2.addTo(map_254746023e723b11db94504e9793a478);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_f7cf9b1d703905dc42af2562c43228c7);
|
||||
trajeto_json.addTo(map_254746023e723b11db94504e9793a478);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
|
||||
var marcadorDinamico = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_f7cf9b1d703905dc42af2562c43228c7);
|
||||
}).addTo(map_254746023e723b11db94504e9793a478);
|
||||
|
||||
// Conectar ao broker MQTT
|
||||
const client = mqtt.connect('ws://localhost:9001'); // Use wss para conexão segura
|
||||
|
|
@ -183,7 +183,7 @@
|
|||
marcadorDinamico.setRotationAngle(angulo);
|
||||
|
||||
adicionarCoordenada("Tj", [novaLongitude, novaLatitude]);
|
||||
map_f7cf9b1d703905dc42af2562c43228c7.setView(novaPosicao, map_f7cf9b1d703905dc42af2562c43228c7.getZoom());
|
||||
map_254746023e723b11db94504e9793a478.setView(novaPosicao, map_254746023e723b11db94504e9793a478.getZoom());
|
||||
});
|
||||
|
||||
function calcularOrientacao(P1latitude, P1longitude, P2latitude, P2longitude) {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -63,10 +63,10 @@
|
|||
<Compile Include="Forms\frmMonitoramento.Designer.cs">
|
||||
<DependentUpon>frmMonitoramento.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmInicial.cs">
|
||||
<Compile Include="Forms\frmInicial.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmInicial.Designer.cs">
|
||||
<Compile Include="Forms\frmInicial.Designer.cs">
|
||||
<DependentUpon>frmInicial.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
<EmbeddedResource Include="Forms\frmMonitoramento.resx">
|
||||
<DependentUpon>frmMonitoramento.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmInicial.resx">
|
||||
<EmbeddedResource Include="Forms\frmInicial.resx">
|
||||
<DependentUpon>frmInicial.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using AgroBase.Forms;
|
||||
using AgroBase.Forms.Operacoes;
|
||||
using AgroBase.Models;
|
||||
using AgroBase.Services;
|
||||
using AgroMonitor.Forms;
|
||||
|
|
@ -11,7 +10,7 @@ namespace AgroMonitor
|
|||
{
|
||||
public partial class frmInicial : Form
|
||||
{
|
||||
System.Timers.Timer tmrDispositivos = new System.Timers.Timer() { Interval = 5000, Enabled = false };
|
||||
Timer tmrDispositivos = new Timer() { Interval = 1000, Enabled = false };
|
||||
|
||||
public frmInicial()
|
||||
{
|
||||
|
|
@ -29,7 +28,7 @@ namespace AgroMonitor
|
|||
{
|
||||
if (LoRaService.Iniciado)
|
||||
{
|
||||
frmLoraConfig frm = new frmLoraConfig(VariaveisMonitoramento.ComunicacaoLoRa);
|
||||
frmLoraConfig frm = new frmLoraConfig();
|
||||
frm.ShowDialog();
|
||||
}
|
||||
else
|
||||
|
|
@ -43,22 +42,18 @@ namespace AgroMonitor
|
|||
frmMonitoramento frm = new frmMonitoramento();
|
||||
frm.ShowDialog();
|
||||
}, true);
|
||||
|
||||
tmrDispositivos.Elapsed += TmrDispositivos_Elapsed;
|
||||
tmrDispositivos.Start();
|
||||
}
|
||||
|
||||
private void IniciarDependencias()
|
||||
{
|
||||
tmrDispositivos.Elapsed += TmrDispositivos_Elapsed;
|
||||
tmrDispositivos.Tick += TmrDispositivos_Elapsed;
|
||||
tmrDispositivos.Start();
|
||||
}
|
||||
|
||||
private async void TmrDispositivos_Elapsed(object sender, EventArgs e)
|
||||
{
|
||||
((System.Timers.Timer)sender).Stop();
|
||||
|
||||
//SerialService.RealizarVarreduraPortasUSB().ConfigureAwait(false);
|
||||
var tmr = ((Timer)sender);
|
||||
tmr.Stop();
|
||||
|
||||
Func<bool> funcao = new Func<bool>(() =>
|
||||
{
|
||||
|
|
@ -76,9 +71,17 @@ namespace AgroMonitor
|
|||
|
||||
FuncoesGlobais.ExecutarMetodoComVerificacaoCrossThread(this, funcao);
|
||||
|
||||
await SerialService.RealizarVarreduraPortasUSB(tmrDispositivos);
|
||||
if (!GPSService.Iniciado || !LoRaService.Iniciado)
|
||||
{
|
||||
await SerialService.RealizarVarreduraPortasUSB(new System.Timers.Timer());
|
||||
tmr.Interval = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmr.Interval = 10000;
|
||||
}
|
||||
|
||||
((System.Timers.Timer)sender).Start();
|
||||
tmr.Start();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -34,15 +34,20 @@
|
|||
this.txtLatitude = new System.Windows.Forms.TextBox();
|
||||
this.txtLongitude = new System.Windows.Forms.TextBox();
|
||||
this.pnlDados = new System.Windows.Forms.Panel();
|
||||
this.chbFoco = new System.Windows.Forms.CheckBox();
|
||||
this.txtCodigoFalha = new System.Windows.Forms.TextBox();
|
||||
this.lblCodigoFalha = new System.Windows.Forms.Label();
|
||||
this.btnVerFalha = new System.Windows.Forms.Button();
|
||||
this.pnlControle = new System.Windows.Forms.Panel();
|
||||
this.tkbAnguloMP = new System.Windows.Forms.TrackBar();
|
||||
this.tkbVelocidadeSP = new System.Windows.Forms.TrackBar();
|
||||
this.lblAngulo = new System.Windows.Forms.Label();
|
||||
this.lblVelocidadeSP = new System.Windows.Forms.Label();
|
||||
this.lblTipoMovimento = new System.Windows.Forms.Label();
|
||||
this.cmbTipoMovimento = new System.Windows.Forms.ComboBox();
|
||||
this.btnParar = new System.Windows.Forms.Button();
|
||||
this.lblAngulo = new System.Windows.Forms.Label();
|
||||
this.lblVelocidadeSP = new System.Windows.Forms.Label();
|
||||
this.btnControle = new System.Windows.Forms.Button();
|
||||
this.lblControle = new System.Windows.Forms.Label();
|
||||
this.chbFoco = new System.Windows.Forms.CheckBox();
|
||||
this.txtTempoEstimado = new System.Windows.Forms.TextBox();
|
||||
this.lblTempoEstimado = new System.Windows.Forms.Label();
|
||||
this.lblTempoDecorrido = new System.Windows.Forms.Label();
|
||||
|
|
@ -82,19 +87,13 @@
|
|||
this.lblLeitura = new System.Windows.Forms.Label();
|
||||
this.txtLeitura = new System.Windows.Forms.TextBox();
|
||||
this.pnlMapa = new System.Windows.Forms.Panel();
|
||||
this.tvwFalhas = new System.Windows.Forms.TreeView();
|
||||
this.lblMapa = new System.Windows.Forms.Label();
|
||||
this.btnCarregar = new System.Windows.Forms.Button();
|
||||
this.btnVerFalha = new System.Windows.Forms.Button();
|
||||
this.lblCodigoFalha = new System.Windows.Forms.Label();
|
||||
this.txtCodigoFalha = new System.Windows.Forms.TextBox();
|
||||
this.tkbVelocidadeSP = new System.Windows.Forms.TrackBar();
|
||||
this.tkbAnguloMP = new System.Windows.Forms.TrackBar();
|
||||
this.tvwFalhas = new System.Windows.Forms.TreeView();
|
||||
this.pnlDados.SuspendLayout();
|
||||
this.pnlControle.SuspendLayout();
|
||||
this.pnlMapa.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tkbVelocidadeSP)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tkbAnguloMP)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tkbVelocidadeSP)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cmbEquipamento
|
||||
|
|
@ -204,6 +203,45 @@
|
|||
this.pnlDados.Size = new System.Drawing.Size(274, 594);
|
||||
this.pnlDados.TabIndex = 6;
|
||||
//
|
||||
// chbFoco
|
||||
//
|
||||
this.chbFoco.AutoSize = true;
|
||||
this.chbFoco.Location = new System.Drawing.Point(9, 13);
|
||||
this.chbFoco.Name = "chbFoco";
|
||||
this.chbFoco.Size = new System.Drawing.Size(151, 17);
|
||||
this.chbFoco.TabIndex = 7;
|
||||
this.chbFoco.Text = "Acompanhar Equipamento";
|
||||
this.chbFoco.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtCodigoFalha
|
||||
//
|
||||
this.txtCodigoFalha.Location = new System.Drawing.Point(113, 49);
|
||||
this.txtCodigoFalha.Name = "txtCodigoFalha";
|
||||
this.txtCodigoFalha.ReadOnly = true;
|
||||
this.txtCodigoFalha.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtCodigoFalha.TabIndex = 52;
|
||||
this.txtCodigoFalha.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblCodigoFalha
|
||||
//
|
||||
this.lblCodigoFalha.AutoSize = true;
|
||||
this.lblCodigoFalha.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F);
|
||||
this.lblCodigoFalha.Location = new System.Drawing.Point(6, 49);
|
||||
this.lblCodigoFalha.Name = "lblCodigoFalha";
|
||||
this.lblCodigoFalha.Size = new System.Drawing.Size(91, 17);
|
||||
this.lblCodigoFalha.TabIndex = 51;
|
||||
this.lblCodigoFalha.Text = "Código Falha";
|
||||
//
|
||||
// btnVerFalha
|
||||
//
|
||||
this.btnVerFalha.Location = new System.Drawing.Point(219, 46);
|
||||
this.btnVerFalha.Name = "btnVerFalha";
|
||||
this.btnVerFalha.Size = new System.Drawing.Size(35, 23);
|
||||
this.btnVerFalha.TabIndex = 50;
|
||||
this.btnVerFalha.Text = "Ver";
|
||||
this.btnVerFalha.UseVisualStyleBackColor = true;
|
||||
this.btnVerFalha.Click += new System.EventHandler(this.btnVerFalha_Click);
|
||||
//
|
||||
// pnlControle
|
||||
//
|
||||
this.pnlControle.Controls.Add(this.tkbAnguloMP);
|
||||
|
|
@ -216,9 +254,45 @@
|
|||
this.pnlControle.Controls.Add(this.btnControle);
|
||||
this.pnlControle.Location = new System.Drawing.Point(11, 638);
|
||||
this.pnlControle.Name = "pnlControle";
|
||||
this.pnlControle.Size = new System.Drawing.Size(233, 276);
|
||||
this.pnlControle.Size = new System.Drawing.Size(233, 292);
|
||||
this.pnlControle.TabIndex = 49;
|
||||
//
|
||||
// tkbAnguloMP
|
||||
//
|
||||
this.tkbAnguloMP.Location = new System.Drawing.Point(8, 179);
|
||||
this.tkbAnguloMP.Maximum = 100;
|
||||
this.tkbAnguloMP.Name = "tkbAnguloMP";
|
||||
this.tkbAnguloMP.Size = new System.Drawing.Size(215, 45);
|
||||
this.tkbAnguloMP.TabIndex = 19;
|
||||
this.tkbAnguloMP.TickFrequency = 10;
|
||||
//
|
||||
// tkbVelocidadeSP
|
||||
//
|
||||
this.tkbVelocidadeSP.Location = new System.Drawing.Point(8, 115);
|
||||
this.tkbVelocidadeSP.Maximum = 100;
|
||||
this.tkbVelocidadeSP.Name = "tkbVelocidadeSP";
|
||||
this.tkbVelocidadeSP.Size = new System.Drawing.Size(215, 45);
|
||||
this.tkbVelocidadeSP.TabIndex = 18;
|
||||
this.tkbVelocidadeSP.TickFrequency = 10;
|
||||
//
|
||||
// lblAngulo
|
||||
//
|
||||
this.lblAngulo.AutoSize = true;
|
||||
this.lblAngulo.Location = new System.Drawing.Point(5, 163);
|
||||
this.lblAngulo.Name = "lblAngulo";
|
||||
this.lblAngulo.Size = new System.Drawing.Size(56, 13);
|
||||
this.lblAngulo.TabIndex = 13;
|
||||
this.lblAngulo.Text = "Angulo: 0°";
|
||||
//
|
||||
// lblVelocidadeSP
|
||||
//
|
||||
this.lblVelocidadeSP.AutoSize = true;
|
||||
this.lblVelocidadeSP.Location = new System.Drawing.Point(5, 99);
|
||||
this.lblVelocidadeSP.Name = "lblVelocidadeSP";
|
||||
this.lblVelocidadeSP.Size = new System.Drawing.Size(132, 13);
|
||||
this.lblVelocidadeSP.TabIndex = 12;
|
||||
this.lblVelocidadeSP.Text = "Velocidade: 0% 0,00 km/h";
|
||||
//
|
||||
// lblTipoMovimento
|
||||
//
|
||||
this.lblTipoMovimento.AutoSize = true;
|
||||
|
|
@ -248,24 +322,6 @@
|
|||
this.btnParar.UseVisualStyleBackColor = true;
|
||||
this.btnParar.Click += new System.EventHandler(this.btnParar_Click);
|
||||
//
|
||||
// lblAngulo
|
||||
//
|
||||
this.lblAngulo.AutoSize = true;
|
||||
this.lblAngulo.Location = new System.Drawing.Point(5, 163);
|
||||
this.lblAngulo.Name = "lblAngulo";
|
||||
this.lblAngulo.Size = new System.Drawing.Size(56, 13);
|
||||
this.lblAngulo.TabIndex = 13;
|
||||
this.lblAngulo.Text = "Angulo: 0°";
|
||||
//
|
||||
// lblVelocidadeSP
|
||||
//
|
||||
this.lblVelocidadeSP.AutoSize = true;
|
||||
this.lblVelocidadeSP.Location = new System.Drawing.Point(5, 99);
|
||||
this.lblVelocidadeSP.Name = "lblVelocidadeSP";
|
||||
this.lblVelocidadeSP.Size = new System.Drawing.Size(132, 13);
|
||||
this.lblVelocidadeSP.TabIndex = 12;
|
||||
this.lblVelocidadeSP.Text = "Velocidade: 0% 0,00 km/h";
|
||||
//
|
||||
// btnControle
|
||||
//
|
||||
this.btnControle.Location = new System.Drawing.Point(8, 33);
|
||||
|
|
@ -286,16 +342,6 @@
|
|||
this.lblControle.TabIndex = 48;
|
||||
this.lblControle.Text = "Controle";
|
||||
//
|
||||
// chbFoco
|
||||
//
|
||||
this.chbFoco.AutoSize = true;
|
||||
this.chbFoco.Location = new System.Drawing.Point(9, 13);
|
||||
this.chbFoco.Name = "chbFoco";
|
||||
this.chbFoco.Size = new System.Drawing.Size(151, 17);
|
||||
this.chbFoco.TabIndex = 7;
|
||||
this.chbFoco.Text = "Acompanhar Equipamento";
|
||||
this.chbFoco.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtTempoEstimado
|
||||
//
|
||||
this.txtTempoEstimado.Location = new System.Drawing.Point(119, 234);
|
||||
|
|
@ -653,13 +699,23 @@
|
|||
this.pnlMapa.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlMapa.Controls.Add(this.tvwFalhas);
|
||||
this.pnlMapa.Location = new System.Drawing.Point(11, 11);
|
||||
this.pnlMapa.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pnlMapa.Name = "pnlMapa";
|
||||
this.pnlMapa.Size = new System.Drawing.Size(786, 542);
|
||||
this.pnlMapa.TabIndex = 7;
|
||||
//
|
||||
// tvwFalhas
|
||||
//
|
||||
this.tvwFalhas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tvwFalhas.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tvwFalhas.Location = new System.Drawing.Point(422, 8);
|
||||
this.tvwFalhas.Name = "tvwFalhas";
|
||||
this.tvwFalhas.Size = new System.Drawing.Size(371, 575);
|
||||
this.tvwFalhas.TabIndex = 0;
|
||||
this.tvwFalhas.Visible = false;
|
||||
//
|
||||
// lblMapa
|
||||
//
|
||||
this.lblMapa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
|
|
@ -683,68 +739,12 @@
|
|||
this.btnCarregar.UseVisualStyleBackColor = true;
|
||||
this.btnCarregar.Click += new System.EventHandler(this.btnCarregar_Click);
|
||||
//
|
||||
// btnVerFalha
|
||||
//
|
||||
this.btnVerFalha.Location = new System.Drawing.Point(219, 46);
|
||||
this.btnVerFalha.Name = "btnVerFalha";
|
||||
this.btnVerFalha.Size = new System.Drawing.Size(35, 23);
|
||||
this.btnVerFalha.TabIndex = 50;
|
||||
this.btnVerFalha.Text = "Ver";
|
||||
this.btnVerFalha.UseVisualStyleBackColor = true;
|
||||
this.btnVerFalha.Click += new System.EventHandler(this.btnVerFalha_Click);
|
||||
//
|
||||
// lblCodigoFalha
|
||||
//
|
||||
this.lblCodigoFalha.AutoSize = true;
|
||||
this.lblCodigoFalha.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F);
|
||||
this.lblCodigoFalha.Location = new System.Drawing.Point(6, 49);
|
||||
this.lblCodigoFalha.Name = "lblCodigoFalha";
|
||||
this.lblCodigoFalha.Size = new System.Drawing.Size(91, 17);
|
||||
this.lblCodigoFalha.TabIndex = 51;
|
||||
this.lblCodigoFalha.Text = "Código Falha";
|
||||
//
|
||||
// txtCodigoFalha
|
||||
//
|
||||
this.txtCodigoFalha.Location = new System.Drawing.Point(113, 49);
|
||||
this.txtCodigoFalha.Name = "txtCodigoFalha";
|
||||
this.txtCodigoFalha.ReadOnly = true;
|
||||
this.txtCodigoFalha.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtCodigoFalha.TabIndex = 52;
|
||||
this.txtCodigoFalha.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// tkbVelocidadeSP
|
||||
//
|
||||
this.tkbVelocidadeSP.Location = new System.Drawing.Point(8, 115);
|
||||
this.tkbVelocidadeSP.Maximum = 100;
|
||||
this.tkbVelocidadeSP.Name = "tkbVelocidadeSP";
|
||||
this.tkbVelocidadeSP.Size = new System.Drawing.Size(215, 45);
|
||||
this.tkbVelocidadeSP.TabIndex = 18;
|
||||
this.tkbVelocidadeSP.TickFrequency = 10;
|
||||
//
|
||||
// tkbAnguloMP
|
||||
//
|
||||
this.tkbAnguloMP.Location = new System.Drawing.Point(8, 179);
|
||||
this.tkbAnguloMP.Maximum = 100;
|
||||
this.tkbAnguloMP.Name = "tkbAnguloMP";
|
||||
this.tkbAnguloMP.Size = new System.Drawing.Size(215, 45);
|
||||
this.tkbAnguloMP.TabIndex = 19;
|
||||
this.tkbAnguloMP.TickFrequency = 10;
|
||||
//
|
||||
// tvwFalhas
|
||||
//
|
||||
this.tvwFalhas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tvwFalhas.Location = new System.Drawing.Point(421, 3);
|
||||
this.tvwFalhas.Name = "tvwFalhas";
|
||||
this.tvwFalhas.Size = new System.Drawing.Size(362, 536);
|
||||
this.tvwFalhas.TabIndex = 0;
|
||||
this.tvwFalhas.Visible = false;
|
||||
//
|
||||
// frmMonitoramento
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1076, 594);
|
||||
this.Controls.Add(this.tvwFalhas);
|
||||
this.Controls.Add(this.btnCarregar);
|
||||
this.Controls.Add(this.lblMapa);
|
||||
this.Controls.Add(this.pnlMapa);
|
||||
|
|
@ -757,9 +757,8 @@
|
|||
this.pnlDados.PerformLayout();
|
||||
this.pnlControle.ResumeLayout(false);
|
||||
this.pnlControle.PerformLayout();
|
||||
this.pnlMapa.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.tkbVelocidadeSP)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tkbAnguloMP)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tkbVelocidadeSP)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ namespace AgroMonitor.Forms
|
|||
tmrLeituras.Tick += tmrLeituras_Tick;
|
||||
tmrLeituras.Start();
|
||||
|
||||
cmbTipoMovimento.Items.Clear();
|
||||
cmbTipoMovimento.Items.AddRange(Enum.GetNames(typeof(TipoMovimentoDirecional)));
|
||||
cmbTipoMovimento.SelectedIndex = 0;
|
||||
|
||||
Mapa = new MapasModel()
|
||||
{
|
||||
pnlMapa = pnlMapa,
|
||||
|
|
@ -58,9 +62,9 @@ namespace AgroMonitor.Forms
|
|||
// Verifica atualizações nos equipamentos conectados
|
||||
VerificarAtualizacoesEquipamentos();
|
||||
|
||||
if (ticks % (tmrLeituras.Interval * VariaveisEquipamento.TempoEntrePingsConexao) == 0)
|
||||
if (ticks % (VariaveisEquipamento.TempoEntrePingsConexao / tmrLeituras.Interval) == 0)
|
||||
{
|
||||
byte EnderecoBase = VariaveisMonitoramento.ComunicacaoLoRa.parametros.address;
|
||||
byte EnderecoBase = Variaveis.ConexaoLoRa.parametros.address;
|
||||
GPSService.EnviarCoordenadasParaMapa(GPSService.UltimaLeitura.Latitude, GPSService.UltimaLeitura.Longitude, GPSService.UltimaLeitura.Orientacao, chbFoco.Checked, Convert.ToInt32(EnderecoBase));
|
||||
foreach (var Equipamento in VariaveisMonitoramento.EquipamentosConectados.Where(x => x.Key != EnderecoBase))
|
||||
{
|
||||
|
|
@ -99,7 +103,12 @@ namespace AgroMonitor.Forms
|
|||
{
|
||||
var ultimoLog = equipamento[equipamento.Count - 1];
|
||||
|
||||
GPSService.EnviarCoordenadasParaMapa(ultimoLog.Coordenadas.Latitude, ultimoLog.Coordenadas.Longitude, ultimoLog.Coordenadas.Orientacao, chbFoco.Checked, Convert.ToInt32(ultimoLog.EnderecoCarro));
|
||||
int enderecoEquipamentoEmFoco = Convert.ToInt32(cmbEquipamento.Text);
|
||||
int enderecoEquipamentoLog = Convert.ToInt32(ultimoLog.EnderecoCarro);
|
||||
|
||||
bool foco = enderecoEquipamentoEmFoco == enderecoEquipamentoLog && chbFoco.Checked;
|
||||
|
||||
GPSService.EnviarCoordenadasParaMapa(ultimoLog.Coordenadas.Latitude, ultimoLog.Coordenadas.Longitude, ultimoLog.Coordenadas.Orientacao, foco, enderecoEquipamentoLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +122,7 @@ namespace AgroMonitor.Forms
|
|||
{
|
||||
byte Endereco = Convert.ToByte(cmbEquipamento.Text);
|
||||
|
||||
if (Endereco == VariaveisMonitoramento.ComunicacaoLoRa.parametros.address)
|
||||
if (Endereco == Variaveis.ConexaoLoRa.parametros.address)
|
||||
{
|
||||
MomentoLog = DateTime.Now;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,34 +3,35 @@ using AgroBase.Services;
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AgroMonitor
|
||||
{
|
||||
public class VariaveisMonitoramento
|
||||
{
|
||||
public static LoRaService ComunicacaoLoRa = new LoRaService();
|
||||
//public static LoRaService ComunicacaoLoRa = new LoRaService();
|
||||
public static Dictionary<byte, LoRaProtocoloTransmissaoModel> EquipamentosConectados
|
||||
{
|
||||
get
|
||||
{
|
||||
var Equipamentos = new Dictionary<byte, LoRaProtocoloTransmissaoModel>()
|
||||
{
|
||||
{ ComunicacaoLoRa.parametros.address, new LoRaProtocoloTransmissaoModel() }
|
||||
{ Variaveis.ConexaoLoRa.parametros.address, new LoRaProtocoloTransmissaoModel() }
|
||||
};
|
||||
|
||||
if (LoRaService.Iniciado)
|
||||
{
|
||||
// Mensagens dos equipamentos conectados dentro dos ultimos 10 segundos
|
||||
var Mensagens = LoRaService.LeituraDadosOperacao.Where(x => x.Momento.AddMilliseconds(VariaveisEquipamento.TempoEntrePingsConexao) < DateTime.Now).ToList();
|
||||
var _equipamentos = Mensagens
|
||||
.GroupBy(x => x.EnderecoCarro)
|
||||
.OrderBy(x => x.Key)
|
||||
.ToDictionary(x => x.Key, x => x.OrderByDescending(y => y.Momento).FirstOrDefault());
|
||||
foreach (var item in _equipamentos)
|
||||
lock (LoRaService._dadosOperacaoLock)
|
||||
{
|
||||
Equipamentos.Add(item.Key, item.Value);
|
||||
// Mensagens dos equipamentos conectados dentro dos ultimos 10 segundos
|
||||
var Mensagens = LoRaService.LeituraDadosOperacao.Where(x => x.Momento.AddMilliseconds(VariaveisEquipamento.TempoEntrePingsConexao) < DateTime.Now).ToList();
|
||||
var _equipamentos = Mensagens
|
||||
.GroupBy(x => x.EnderecoCarro)
|
||||
.OrderBy(x => x.Key)
|
||||
.ToDictionary(x => x.Key, x => x.OrderByDescending(y => y.Momento).FirstOrDefault());
|
||||
foreach (var item in _equipamentos)
|
||||
{
|
||||
Equipamentos.Add(item.Key, item.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ namespace AgroMonitor
|
|||
{
|
||||
var Equipamentos = new Dictionary<byte, List<LoRaProtocoloTransmissaoModel>>()
|
||||
{
|
||||
{ ComunicacaoLoRa.parametros.address, new List<LoRaProtocoloTransmissaoModel>() }
|
||||
{ Variaveis.ConexaoLoRa.parametros.address, new List<LoRaProtocoloTransmissaoModel>() }
|
||||
};
|
||||
|
||||
if (LoRaService.Iniciado)
|
||||
|
|
|
|||
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
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
a26df5e4a1268d1063cdf4997bfc79861b35c96a8937ecbc805ddb4e827b2cd3
|
||||
8739affe5d4dd85e814121db2ceff29c387efa7cde9b3d9e6b985deb307f85bf
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue