ajustes lora e deteccao de obstaculos

This commit is contained in:
Diego Freitas 2025-09-16 10:31:32 -03:00
parent 85a77b8b25
commit e1c388f766
169 changed files with 13497 additions and 1426 deletions

Binary file not shown.

View File

@ -754,9 +754,10 @@ namespace AgroBase
private static bool VerificaComandoValidoSonar(Keys Comando)
{
List<Keys> ComandosImpedidos = new List<Keys>();
var Sonar = Variaveis.OperacaoEmAndamento.Sensoriamento.OperadorVisual;
if (Variaveis.OperacaoEmAndamento.Controle.SonarAtivado && Sonar.Iniciado && Sonar.Status == StatusModulo.Operante && (Sonar.Analises.matriz_confianca?.block?.decision?.parar ?? false))
Sonar?.Resumo?.AtualizarStatusBloqueio(false);
var DeveParar = Sonar?.Resumo?.DeveParar ?? false;
if (DeveParar)
{
ComandosImpedidos.Add(Keys.Up);
/*switch (Sonar.Resumo.DirecaoDesvio)

View File

@ -706,6 +706,7 @@ namespace AgroBase.Models.Modules
{
RequisitarDadosModulo(Variaveis.ID_Num_sTOD, CanMessagePosicaoDados.DadosAll, CanMessagePosicaoDados.DadosAll, true);
}
VerificaControleLeitura();
}
AtualizaComponentesIniciados();
@ -751,6 +752,32 @@ namespace AgroBase.Models.Modules
return (_atuadorOperante, ModsComFalha);
}
private void VerificaControleLeitura()
{
if (true) // !frmDiagnosticos.Diagnosticando
{
foreach (var bico in BicosPulverizadores.Where(x => x.Comandar && x.Inicializado))
{
Estado leituraEstado = (Estado?)(bico.ValoresLeituras.FirstOrDefault(x => x.funcao == FuncoesPinout.EstadoLeitura)?.atual?.valor) ?? Estado.Desligado;
Estado comandoEstado = bico.ComandoAtuar ? Estado.Ligado : Estado.Desligado;
if (leituraEstado != comandoEstado)
{
GeneralJoystick.EnviarComandoAtuador(bico.Componente, bico.ComandoAtuar, bico.ID);
}
}
var bomba = BombasPressurizadoras.FirstOrDefault(x => x.Comandar && x.Inicializado);
if (bomba != null)
{
bool leituraEstado = (bomba.ValoresLeituras?.FirstOrDefault(x => x.funcao == FuncoesPinout.Potencia)?.atual?.valor ?? 0) > 0;
if (bomba.ComandoAtuar != leituraEstado)
{
GeneralJoystick.EnviarComandoAtuador(bomba.Componente, bomba.ComandoAtuar, bomba.ID);
}
}
}
}
private void AtualizaComponentesIniciados()
{
DateTime Agora = DateTime.Now;
@ -782,7 +809,7 @@ namespace AgroBase.Models.Modules
var Bomba = BombasPressurizadoras.FirstOrDefault();
if (Bomba.Inicializado)
{
GeneralJoystick.EnviarComandoAtuador(S_Code.sBMB, true, Bomba.ID);
GeneralJoystick.EnviarComandoAtuador(Bomba.Componente, true, Bomba.ID);
bool AtingiuPressao() => PressaoLinha >= Variaveis.OperacaoEmAndamento.Controle.PressaoLinha;
@ -796,11 +823,11 @@ namespace AgroBase.Models.Modules
{
if (Bico.Inicializado)
{
GeneralJoystick.EnviarComandoAtuador(S_Code.sBIC, true, Bico.ID);
GeneralJoystick.EnviarComandoAtuador(Bico.Componente, true, Bico.ID);
await Task.Delay(200);
GeneralJoystick.EnviarComandoAtuador(S_Code.sBIC, false, Bico.ID);
GeneralJoystick.EnviarComandoAtuador(Bico.Componente, false, Bico.ID);
}
}

View File

@ -1660,6 +1660,7 @@ namespace AgroBase.Models.Modules
Componente = S_Code.sLRA,
Funcoes = new List<FuncoesPinout>()
{
FuncoesPinout.ENA,
FuncoesPinout.M0,
FuncoesPinout.M1,
FuncoesPinout.Aux,

View File

@ -137,7 +137,8 @@ namespace AgroBase.Models
int qtdCamerasSolo,
TiposControladorDirecional tipoControleDirecional,
bool movimentoAutomatico,
bool pulverizadorAutomatico)
bool pulverizadorAutomatico,
bool frenagemAutomatica)
{
if (string.IsNullOrEmpty(descricao))
{
@ -171,7 +172,8 @@ namespace AgroBase.Models
SonarAtivado = sonarAtivado,
QtdCamerasSolo = qtdCamerasSolo,
MovimentoAutomatico = movimentoAutomatico,
PulverizadorAutomatico = pulverizadorAutomatico
PulverizadorAutomatico = pulverizadorAutomatico,
FrenagemAtuomatica = frenagemAutomatica
};
Parametros.Mapa.LimparDados(true);
@ -231,6 +233,7 @@ namespace AgroBase.Models
TipoControleDirecional = Parametros.DirTipoMovimento,
PulverizadorAutomatico = Parametros.PulverizadorAutomatico,
MovimentoAutomatico = Parametros.MovimentoAutomatico,
FrenagemAutomatica = Parametros.FrenagemAtuomatica,
TipoMovimento = Variaveis.OperacaoEmAndamento.Controle.TipoMovimento,
heartbeat = 0,
SimulacaoMPC = new List<MPCSimulacaoModel>(),
@ -309,6 +312,7 @@ namespace AgroBase.Models
{
MovimentoAutomatico = false,
PulverizadorAutomatico = false,
FrenagemAutomatica = true,
RPM_Max = 100,
RPM_Min = 15,
Angulo_Max = 25,
@ -386,6 +390,7 @@ namespace AgroBase.Models
{
MovimentoAutomatico = true,
PulverizadorAutomatico = true,
FrenagemAutomatica = true,
RPM_Max = 50,
RPM_Min = 20,
Angulo_Max = 30,
@ -486,6 +491,7 @@ namespace AgroBase.Models
{
MovimentoAutomatico = true,
PulverizadorAutomatico = false,
FrenagemAutomatica = false,
RPM_Max = 100,
RPM_Min = 20,
Angulo_Max = 30,
@ -588,6 +594,7 @@ namespace AgroBase.Models
{
MovimentoAutomatico = true,
PulverizadorAutomatico = false,
FrenagemAutomatica = true,
RPM_Max = 40,
RPM_Min = 20,
Angulo_Max = 30,
@ -948,7 +955,11 @@ namespace AgroBase.Models
{
case T_Code.Mov:
{
if (_Controle.RPM_SP == 0)
if (_Controle.FrenagemAutomatica && _Controle.EmFreio)
{
_Controle.Direcao = Direcao.EmFreio;
}
else if (_Controle.RPM_SP == 0)
{
_Controle.Direcao = Direcao.Parado;
}
@ -976,6 +987,7 @@ namespace AgroBase.Models
_ControleAnterior.PercentualVelocidadeSP = _Controle.PercentualVelocidadeSP;
_ControleAnterior.Direcao = _Controle.Direcao;
_ControleAnterior.EmFreio = _Controle.EmFreio;
RedisService.AtualizarCampos(
CtxKey.DadosControle,
@ -1085,9 +1097,12 @@ namespace AgroBase.Models
if (Variaveis.OperacaoEmAndamento.Modo == ModoOperacao.Manual)
{
var Sonar = Variaveis.OperacaoEmAndamento.Sensoriamento.OperadorVisual;
bool deveParar = (Sonar.Analises.matriz_confianca?.block?.decision?.parar ?? false);
bool emMovimento = Variaveis.OperacaoEmAndamento.Controle.TiposControle.FirstOrDefault(x => x.Tipo == T_Code.Mov)?.UltimaDirecao != Direcao.Parado;
if (Variaveis.OperacaoEmAndamento.Controle.SonarAtivado && Sonar.Iniciado && Sonar.Status == StatusModulo.Operante && deveParar && emMovimento)
Sonar?.Resumo?.AtualizarStatusBloqueio(true);
if (Sonar?.Resumo?.EnviarComandoParada ?? false)
{
GeneralJoystick.EnviaComandoMotor(Keys.Space, T_Code.Mov);
}
else if (Sonar?.Resumo?.EnviarComandoRetomada ?? false)
{
GeneralJoystick.EnviaComandoMotor(Keys.Escape, T_Code.Mov);
}
@ -1528,6 +1543,7 @@ namespace AgroBase.Models
return FuncoesMatematicas.Map(RPM_Max, 0, VariaveisEquipamento.RPM_Max_Roda, 0, 100);
}
}
public bool EmFreio { get; set; } = false;
public Direcao Direcao { get; set; } = Direcao.Parado;
private TipoMovimentoDirecional _tipoMovimento = TipoMovimentoDirecional.Diagnostico;
public TipoMovimentoDirecional TipoMovimento
@ -1601,8 +1617,8 @@ namespace AgroBase.Models
_pulverizadorAutomatico = value;
}
}
//public bool MovimentoAutomatico { get; set; }
public bool MovimentoAutomatico { get; set; }
public bool FrenagemAutomatica { get; set; }
public TiposControladorDirecional TipoControleDirecional { get; set; } = TiposControladorDirecional.PID;
public List<MPCSimulacaoModel> SimulacaoMPC { get; set; } = new List<MPCSimulacaoModel>();
@ -1632,9 +1648,11 @@ namespace AgroBase.Models
SimulacaoMPC = new List<MPCSimulacaoModel>(SimulacaoMPC),
PulverizadorAutomatico = PulverizadorAutomatico,
MovimentoAutomatico = MovimentoAutomatico,
FrenagemAutomatica = FrenagemAutomatica,
heartbeat = heartbeat,
ticks_sem_resposta = ticks_sem_resposta,
Latencia = Latencia,
EmFreio = EmFreio,
};
}
}

View File

@ -24,5 +24,6 @@ namespace AgroBase.Models.Operacoes
public int QtdCamerasSolo { get; set; }
public bool MovimentoAutomatico { get; set; }
public bool PulverizadorAutomatico { get; set; }
public bool FrenagemAtuomatica { get; set; }
}
}

View File

@ -48,6 +48,7 @@ namespace AgroBase.Models.Operadores
public class ManagerWorkerMessageResponseComandoModel
{
public double percentual_velocidade { get; set; }
public bool em_freio { get; set; }
public double angulo { get; set; }
public TipoMovimentoDirecional tipo_movimento { get; set; }
public List<double[]> simulacao { get; set; }

View File

@ -17,6 +17,7 @@ namespace AgroBase.Models.Operadores
public VisualWorkerMessageAnaliseModel Analises { get; set; } = new VisualWorkerMessageAnaliseModel();
public VisualWorkerMessageIMUModel Imu { get; set; } = new VisualWorkerMessageIMUModel();
public StatusModulo Status { get; set; }
public VisualWorkerResumoModel Resumo { get; set; }
public VisualWorkerModel Clone()
{
@ -30,7 +31,8 @@ namespace AgroBase.Models.Operadores
Analises = Analises?.Clone(),
Imu = Imu?.Clone(),
UltimaMensagem = UltimaMensagem,
Status = Status
Status = Status,
Resumo = Resumo?.Clone()
};
}
@ -43,10 +45,65 @@ namespace AgroBase.Models.Operadores
CameraFrames = new Dictionary<CameraFrameType, OAKCameraFrameModel>();
Analises = new VisualWorkerMessageAnaliseModel();
Imu = new VisualWorkerMessageIMUModel();
Resumo = new VisualWorkerResumoModel();
Status = StatusModulo.Desconectado;
}
}
public class VisualWorkerResumoModel
{
public bool ObstaculoDetectado { get; set; } = false;
public bool DeveParar { get; set; } = false;
public bool EnviarComandoParada { get; set; } = false;
public bool EnviarComandoRetomada { get; set; } = false;
private bool _comandoParadaEnviado { get; set; } = false;
public void AtualizarStatusBloqueio(bool consideraEmMovimento)
{
var Sonar = Variaveis.OperacaoEmAndamento.Sensoriamento.OperadorVisual;
ObstaculoDetectado = (Sonar.Analises?.matriz_confianca?.block?.decision?.parar ?? false);
if (!Variaveis.OperacaoEmAndamento.Controle.SonarAtivado)
{
_comandoParadaEnviado = false;
DeveParar = false;
EnviarComandoParada = false;
EnviarComandoRetomada = false;
}
else
{
List<Direcao> _direcoesInterromperMovimento = new List<Direcao> { Direcao.Frente, Direcao.Tras };
Direcao _ultimaDirecaoControle = Variaveis.OperacaoEmAndamento.Controle.TiposControle.FirstOrDefault(x => x.Tipo == T_Code.Mov)?.UltimaDirecao ?? Direcao.Parado;
bool _carroEmMovimento = _direcoesInterromperMovimento.Contains(_ultimaDirecaoControle);
bool emMovimento = consideraEmMovimento ? _carroEmMovimento : true;
DeveParar = Sonar.Status == StatusModulo.Operante && ObstaculoDetectado;
EnviarComandoParada = DeveParar && emMovimento;
if (EnviarComandoParada)
{
_comandoParadaEnviado = true;
}
EnviarComandoRetomada = !ObstaculoDetectado && _comandoParadaEnviado;
if (EnviarComandoRetomada)
{
_comandoParadaEnviado = false;
}
}
}
public VisualWorkerResumoModel Clone()
{
return new VisualWorkerResumoModel()
{
ObstaculoDetectado = ObstaculoDetectado,
DeveParar = DeveParar,
EnviarComandoParada = EnviarComandoParada,
EnviarComandoRetomada = EnviarComandoRetomada,
_comandoParadaEnviado = _comandoParadaEnviado,
};
}
}
public class VisualWorkerDadosModel
{
public bool DesvioNecessario { get; set; }

View File

@ -696,6 +696,7 @@ namespace AgroBase.Models
var dictParams = JObject.Parse(controleStr);
dictParams.TryGetValue("angulo_sp", out var _angulo);
dictParams.TryGetValue("velocidade_sp", out var _velocidade);
dictParams.TryGetValue("em_freio", out var _em_freio);
dictParams.TryGetValue("tipo_movimento_direcional", out var _movimento);
dictParams.TryGetValue("simulacao", out var _simulacao);
dictParams.TryGetValue("heartbeat", out var _heartbeat);
@ -704,6 +705,7 @@ namespace AgroBase.Models
{
angulo = Convert.ToDouble(_angulo),
percentual_velocidade = Convert.ToDouble(_velocidade),
em_freio = Convert.ToBoolean(_em_freio),
tipo_movimento = (TipoMovimentoDirecional)Convert.ToInt32(_movimento),
simulacao = JsonConvert.DeserializeObject<List<double[]>>((_simulacao ?? "").ToString()),
heartbeat = Convert.ToInt32(_heartbeat),
@ -718,13 +720,14 @@ namespace AgroBase.Models
DateTime agora = DateTime.Now;
var _Controle = Variaveis.OperacaoEmAndamento.Controle;
bool comandoMudou = (_Controle.Angulo != novoComando.angulo || _Controle.PercentualVelocidadeSP != novoComando.percentual_velocidade || _Controle.TipoMovimento != novoComando.tipo_movimento);
bool comandoMudou = (_Controle.Angulo != novoComando.angulo || _Controle.PercentualVelocidadeSP != novoComando.percentual_velocidade || _Controle.TipoMovimento != novoComando.tipo_movimento || _Controle.EmFreio != novoComando.em_freio);
bool mangerDestravou = (_Controle.ticks_sem_resposta.AddMilliseconds(min_ticks_sem_resposta) < agora && novoComando.heartbeat != _Controle.heartbeat);
if (novoComando != null && (comandoMudou || mangerDestravou))
{
_Controle.Angulo = novoComando.angulo;
_Controle.TipoMovimento = novoComando.tipo_movimento;
_Controle.PercentualVelocidadeSP = novoComando.percentual_velocidade;
_Controle.EmFreio = novoComando.em_freio;
_Controle.SimulacaoMPC = novoComando.simulacao?.Select(x => new MPCSimulacaoModel() { latitude = x[0], longitude = x[1], orientacao = x[2] }).ToList() ?? new List<MPCSimulacaoModel>();
_Controle.Latencia = novoComando.latencia;
Variaveis.OperacaoEmAndamento.AtualizaInformacoesControleOperacao();

View File

@ -6,7 +6,7 @@ namespace AgroBase.Services
{
public class CanManager
{
public static bool UseCanSerial = false;
public static bool UseCanSerial = true;
private static CanServiceWaveshare CanWaveshare = new CanServiceWaveshare();
private static CanServiceSerial CanSerial = new CanServiceSerial();

View File

@ -8,7 +8,6 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using static AgroBase.Models.Enums;
using static AgroBase.Services.LoRaEspService;
namespace AgroBase.Services
{
@ -102,6 +101,7 @@ namespace AgroBase.Services
_PortaCAN.DiscardInBuffer();
_PortaCAN.DiscardOutBuffer();
}
UltimoRx = DateTime.Now;
UltimoTx = DateTime.Now;
@ -120,18 +120,23 @@ namespace AgroBase.Services
IsConnected = true;
}
}
lock (_lock)
{
if (_PortaCAN != null && !_PortaCAN.IsOpen)
{
_PortaCAN.Open();
}
}
return IsConnected;
}
catch (Exception ex)
{
lock (_lock)
{
_PortaCAN = null;
}
return false;
}
}
@ -433,6 +438,8 @@ namespace AgroBase.Services
}
private bool EnviarComando(string comando)
{
lock (_lock)
{
if (_PortaCAN?.IsOpen == true)
{
@ -443,6 +450,7 @@ namespace AgroBase.Services
}
return false;
}
}
private void LimparMensagensAntigas()
{
@ -473,16 +481,7 @@ namespace AgroBase.Services
UltimoRx = Agora;
UltimoTx = Agora;
MostrarLog("Muito tempo sem receber novos dados, reiniciando conexao CAN...", 0);
try { _PortaCAN?.Close(); } catch { }
try
{
_PortaCAN?.Open();
EnviarComando("C\r"); Thread.Sleep(50);
EnviarComando("Z0\r"); Thread.Sleep(50);
EnviarComando(ComandoBitRate(_bitRate)); Thread.Sleep(50);
EnviarComando("O\r"); Thread.Sleep(50);
}
catch { }
ReabrirPortaSegura();
}
}
@ -556,8 +555,6 @@ namespace AgroBase.Services
}
}
private string ComandoBitRate(int rate)
{
switch (rate)
@ -585,5 +582,37 @@ namespace AgroBase.Services
}
}
private void ReabrirPortaSegura()
{
tmrEnviarCAN?.Stop();
tmrOuvirCAN?.Stop();
tmrProcessarCAN?.Stop();
lock (_LockMensagens)
{
Mensagens.Clear();
}
lock (_lock)
{
try { _PortaCAN?.Close(); } catch { }
try
{
_PortaCAN?.Open();
_PortaCAN.DiscardInBuffer();
_PortaCAN.DiscardOutBuffer();
EnviarComando("C\r"); Thread.Sleep(50);
EnviarComando("Z0\r"); Thread.Sleep(50);
EnviarComando(ComandoBitRate(_bitRate)); Thread.Sleep(50);
EnviarComando("O\r"); Thread.Sleep(50);
}
catch { /* log */ }
}
tmrEnviarCAN?.Start();
tmrOuvirCAN?.Start();
tmrProcessarCAN?.Start();
}
}
}

View File

@ -39,10 +39,7 @@ namespace AgroBase.Services
public List<(int, CanMessagePosicaoDados, byte[])> ProtocoloConfiguracao(PinoutDataModel Pinout, bool conectar)
{
List<byte> config1 = new List<byte>()
{
Variaveis.LoraBaseParametros?.address ?? 0x01
};
List<byte> config1 = new List<byte>();
var _pinout = Pinout.Clone();
_pinout.Pinos = _pinout.Pinos.Where(x => x.ComponenteID == ID).ToList();
if (_pinout.Pinos.Count > 0)
@ -53,6 +50,7 @@ namespace AgroBase.Services
List<byte> config2 = new List<byte>
{
Variaveis.LoraBaseParametros?.address ?? 0x01,
ParametrosSet.address,
ParametrosSet.baudAndAirRate,
ParametrosSet.packetSizeAndPower,

View File

@ -271,7 +271,8 @@ namespace AgroBase.Services.Operadores
RedisService.AtualizarCampos(
CtxKey.DadosControle,
("pulverizador_automatico", Variaveis.OperacaoEmAndamento.Controle.PulverizadorAutomatico),
("movimento_automatico", Variaveis.OperacaoEmAndamento.Controle.MovimentoAutomatico)
("movimento_automatico", Variaveis.OperacaoEmAndamento.Controle.MovimentoAutomatico),
("frenagem_automatica", Variaveis.OperacaoEmAndamento.Controle.FrenagemAutomatica)
);
}

View File

@ -55,6 +55,7 @@ namespace AgroBase.Services.Operadores
{
dictParams.TryGetValue("angulo_sp", out object _angulo);
dictParams.TryGetValue("velocidade_sp", out object _velocidade);
dictParams.TryGetValue("em_freio", out object _em_freio);
dictParams.TryGetValue("tipo_movimento_direcional", out object _movimento);
dictParams.TryGetValue("simulacao", out object _simulacao);
dictParams.TryGetValue("heartbeat", out object _heartbeat);
@ -62,6 +63,7 @@ namespace AgroBase.Services.Operadores
{
angulo = Convert.ToDouble(_angulo),
percentual_velocidade = Convert.ToDouble(_velocidade),
em_freio = Convert.ToBoolean(_em_freio),
tipo_movimento = (Enums.TipoMovimentoDirecional)Convert.ToInt32(_movimento),
simulacao = JsonConvert.DeserializeObject<List<double[]>>((_simulacao ?? "").ToString()),
heartbeat = Convert.ToInt32(_heartbeat)
@ -73,12 +75,13 @@ namespace AgroBase.Services.Operadores
}
var _Controle = Variaveis.OperacaoEmAndamento.Controle;
bool comandoMudou = (_Controle.Angulo != novoComando.angulo || _Controle.PercentualVelocidadeSP != novoComando.percentual_velocidade || _Controle.TipoMovimento != novoComando.tipo_movimento);
bool comandoMudou = (_Controle.Angulo != novoComando.angulo || _Controle.PercentualVelocidadeSP != novoComando.percentual_velocidade || _Controle.TipoMovimento != novoComando.tipo_movimento || _Controle.EmFreio != novoComando.em_freio);
if (novoComando != null && comandoMudou)
{
_Controle.Angulo = novoComando.angulo;
_Controle.TipoMovimento = novoComando.tipo_movimento;
_Controle.PercentualVelocidadeSP = novoComando.percentual_velocidade;
_Controle.EmFreio = novoComando.em_freio;
_Controle.SimulacaoMPC = novoComando.simulacao?.Select(x => new MPCSimulacaoModel() { latitude = x[0], longitude = x[1], orientacao = x[2] }).ToList() ?? new List<MPCSimulacaoModel>();
Variaveis.OperacaoEmAndamento.AtualizaInformacoesControleOperacao();
}

View File

@ -39,6 +39,7 @@ namespace AgroBase.Services.Operadores
if (pronto())
{
MostrarLog("Processamento iniciado com sucesso");
DadosLeitura.Iniciado = true;
return true;
}

View File

@ -1,12 +1,5 @@
{
"epochs": [ {
"calculation_time": "13399827811771001",
"config_version": 0,
"model_version": "0",
"padded_top_topics_start_index": 0,
"taxonomy_version": 0,
"top_topics_and_observing_domains": [ ]
}, {
"calculation_time": "13400595140854297",
"config_version": 0,
"model_version": "0",
@ -27,7 +20,14 @@
"padded_top_topics_start_index": 0,
"taxonomy_version": 0,
"top_topics_and_observing_domains": [ ]
}, {
"calculation_time": "13402425506182172",
"config_version": 0,
"model_version": "0",
"padded_top_topics_start_index": 0,
"taxonomy_version": 0,
"top_topics_and_observing_domains": [ ]
} ],
"hex_encoded_hmac_key": "40F346D3248C3AFDF2BEE1FE496DBD32F7CED6E5AE98B881ABC421AA7E7B5642",
"next_scheduled_calculation_time": "13402424980889277"
"next_scheduled_calculation_time": "13403030306182389"
}

View File

@ -1,3 +1,3 @@
2025/09/09-15:46:04.235 680c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/09/09-15:46:04.241 680c Recovering log #3
2025/09/09-15:46:04.244 680c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
2025/09/15-17:35:19.244 585c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/09/15-17:35:19.253 585c Recovering log #3
2025/09/15-17:35:19.256 585c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log

View File

@ -1,3 +1,3 @@
2025/09/09-15:09:11.525 3c58 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/09/09-15:09:11.532 3c58 Recovering log #3
2025/09/09-15:09:11.536 3c58 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
2025/09/15-15:57:42.267 2cc0 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/09/15-15:57:42.276 2cc0 Recovering log #3
2025/09/15-15:57:42.279 2cc0 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log

View File

@ -1 +1 @@
{"net":{"http_server_properties":{"servers":[{"alternative_service":[{"advertised_alpns":["h3"],"expiration":"13402003564945866","port":443,"protocol_str":"quic"}],"anonymization":["DAAAAAcAAABmaWxlOi8vAA==",false,0],"network_stats":{"srtt":37908},"server":"https://tile.openstreetmap.org","supports_spdy":true}],"supports_quic":{"address":"2804:d78:6a8:5d00:593a:511a:74dd:807b","used_quic":true},"version":5},"network_qualities":{"CAASABiAgICA+P////8B":"4G","CAESABiAgICA+P////8B":"4G","CAISABiAgICA+P////8B":"4G","CAYSABiAgICA+P////8B":"Offline"}}}
{"net":{"http_server_properties":{"servers":[{"alternative_service":[{"advertised_alpns":["h3"],"expiration":"13402522885929406","port":443,"protocol_str":"quic"}],"anonymization":["DAAAAAcAAABmaWxlOi8vAA==",false,0],"network_stats":{"srtt":27069},"server":"https://tile.openstreetmap.org","supports_spdy":true}],"supports_quic":{"address":"2804:d78:67d:1400:60e0:3daf:3723:e31f","used_quic":true},"version":5},"network_qualities":{"CAASABiAgICA+P////8B":"4G","CAESABiAgICA+P////8B":"4G","CAISABiAgICA+P////8B":"4G","CAYSABiAgICA+P////8B":"Offline"}}}

View File

@ -1 +1 @@
{"sts":[{"expiry":1788979564.946284,"host":"bWGAftl61rqoc0YzqPncsLvQQh/iC2Bdp3ejUeGC83w=","mode":"force-https","sts_include_subdomains":true,"sts_observed":1757443564.946287}],"version":2}
{"sts":[{"expiry":1789498662.856284,"host":"bWGAftl61rqoc0YzqPncsLvQQh/iC2Bdp3ejUeGC83w=","mode":"force-https","sts_include_subdomains":true,"sts_observed":1757962662.856286}],"version":2}

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
2025/09/09-15:58:01.007 680c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/09/09-15:58:01.008 680c Recovering log #3
2025/09/09-15:58:01.011 680c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
2025/09/15-17:36:02.774 585c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/09/15-17:36:02.775 585c Recovering log #3
2025/09/15-17:36:02.778 585c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log

View File

@ -1,3 +1,3 @@
2025/09/09-15:44:08.465 3c58 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/09/09-15:44:08.467 3c58 Recovering log #3
2025/09/09-15:44:08.470 3c58 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
2025/09/15-16:16:16.964 2cc0 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/09/15-16:16:16.966 2cc0 Recovering log #3
2025/09/15-16:16:16.969 2cc0 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log

View File

@ -1,3 +1,3 @@
2025/09/09-15:46:04.142 58d8 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/09/09-15:46:04.143 58d8 Recovering log #7
2025/09/09-15:46:04.144 58d8 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
2025/09/15-17:35:19.173 1788 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/09/15-17:35:19.176 1788 Recovering log #7
2025/09/15-17:35:19.176 1788 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log

View File

@ -1,3 +1,3 @@
2025/09/09-15:09:11.448 1b60 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/09/09-15:09:11.449 1b60 Recovering log #7
2025/09/09-15:09:11.450 1b60 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
2025/09/15-15:57:42.197 4e88 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/09/15-15:57:42.199 4e88 Recovering log #7
2025/09/15-15:57:42.199 4e88 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log

View File

@ -1 +1 @@
140.0.3485.54
140.0.3485.66

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"hashes":{"00AF3F07B5ABB71F6D30337E1EEF62FA280F06EF19485C0CF6B72171F92CCC0A":{"appid":"kpfehajjjbbcifeehjgfgnabifknmdad","fp":"1.00AF3F07B5ABB71F6D30337E1EEF62FA280F06EF19485C0CF6B72171F92CCC0A"},"452064dcff76e03e0e81b4bb3c48ab1c432e040094f7546c7261a90d4a1c1bbf":{"appid":"fgbafbciocncjfbbonhocjaohoknlaco","fp":""},"4B81B4DF3AD971287E1AE02C449344FCFA5D20431DE17B2BA8854CC9CDCE4089":{"appid":"ahmaebgpfccdhgidjaidaoojjcijckba","fp":"1.4B81B4DF3AD971287E1AE02C449344FCFA5D20431DE17B2BA8854CC9CDCE4089"},"8482d8cbe30fdc7c561f12ce566b64102191a99798dae98132c35714020e1aad":{"appid":"jbfaflocpnkhbgcijpkiafdpbjkedane","fp":""},"89f43cb3df807293de2772d5f01ac2fc1482b38ccc8fdaee859b80642b7a0487":{"appid":"pghocgajpebopihickglahgebcmkcekh","fp":""},"95FD9D48E4FC245A3F3A99A3A16ECD1355050BA3F4AFC555F19A97C7F9B49677":{"appid":"ohckeflnhegojcjlcpbfpciadgikcohk","fp":"1.95FD9D48E4FC245A3F3A99A3A16ECD1355050BA3F4AFC555F19A97C7F9B49677"},"A81D1959892AE4180554347DF1B97834ABBA2E1A5E6B9AEBA000ECEA26EABECC":{"appid":"fppmbhmldokgmleojlplaaodlkibgikh","fp":"1.A81D1959892AE4180554347DF1B97834ABBA2E1A5E6B9AEBA000ECEA26EABECC"},"A99D66CFCE8CA170740CE0403956F4DFAF4683829A89F4B7AD9C95303871E284":{"appid":"eeobbhfgfagbclfofmgbdfoicabjdbkn","fp":"1.A99D66CFCE8CA170740CE0403956F4DFAF4683829A89F4B7AD9C95303871E284"},"b987bdc4f2ad2a409b964921d4a5db1cdbe07f9c98f868293b4cc32acdc42cec":{"appid":"alpjnmnfbgfkmmpcfpejmmoebdndedno","fp":""},"bcb93cba8636743d1fbd32be3bd8ce8ff602323895bf4d136c26b9bc64b0a6a4":{"appid":"ndikpojcjlepofdkaaldkinkjbeeebkl","fp":""},"fa29a6d5775ff340900a65b39b02fc8b4b77d403c048d8debf22f2f5d09c61a0":{"appid":"oankkpibpaokgecfckkdkgaoafllipag","fp":""}}}
{"hashes":{"00AF3F07B5ABB71F6D30337E1EEF62FA280F06EF19485C0CF6B72171F92CCC0A":{"appid":"kpfehajjjbbcifeehjgfgnabifknmdad","fp":"1.00AF3F07B5ABB71F6D30337E1EEF62FA280F06EF19485C0CF6B72171F92CCC0A"},"452064dcff76e03e0e81b4bb3c48ab1c432e040094f7546c7261a90d4a1c1bbf":{"appid":"fgbafbciocncjfbbonhocjaohoknlaco","fp":""},"4B81B4DF3AD971287E1AE02C449344FCFA5D20431DE17B2BA8854CC9CDCE4089":{"appid":"ahmaebgpfccdhgidjaidaoojjcijckba","fp":"1.4B81B4DF3AD971287E1AE02C449344FCFA5D20431DE17B2BA8854CC9CDCE4089"},"89f43cb3df807293de2772d5f01ac2fc1482b38ccc8fdaee859b80642b7a0487":{"appid":"pghocgajpebopihickglahgebcmkcekh","fp":""},"95FD9D48E4FC245A3F3A99A3A16ECD1355050BA3F4AFC555F19A97C7F9B49677":{"appid":"ohckeflnhegojcjlcpbfpciadgikcohk","fp":"1.95FD9D48E4FC245A3F3A99A3A16ECD1355050BA3F4AFC555F19A97C7F9B49677"},"A81D1959892AE4180554347DF1B97834ABBA2E1A5E6B9AEBA000ECEA26EABECC":{"appid":"fppmbhmldokgmleojlplaaodlkibgikh","fp":"1.A81D1959892AE4180554347DF1B97834ABBA2E1A5E6B9AEBA000ECEA26EABECC"},"A99D66CFCE8CA170740CE0403956F4DFAF4683829A89F4B7AD9C95303871E284":{"appid":"eeobbhfgfagbclfofmgbdfoicabjdbkn","fp":"1.A99D66CFCE8CA170740CE0403956F4DFAF4683829A89F4B7AD9C95303871E284"},"b987bdc4f2ad2a409b964921d4a5db1cdbe07f9c98f868293b4cc32acdc42cec":{"appid":"alpjnmnfbgfkmmpcfpejmmoebdndedno","fp":""},"bcb93cba8636743d1fbd32be3bd8ce8ff602323895bf4d136c26b9bc64b0a6a4":{"appid":"ndikpojcjlepofdkaaldkinkjbeeebkl","fp":""},"fa29a6d5775ff340900a65b39b02fc8b4b77d403c048d8debf22f2f5d09c61a0":{"appid":"oankkpibpaokgecfckkdkgaoafllipag","fp":""},"ff87fddb54d7bdc8ab8c2697bc92337c914803fb22cd32e445389e8042159ce9":{"appid":"jbfaflocpnkhbgcijpkiafdpbjkedane","fp":""}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@
<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
#map_0d47d5844cb03a1b59409c5f2e45d89e {
#map_413b17cf3f148cf9e5299ab727cb1cef {
position: relative;
width: 100.0%;
height: 100.0%;
@ -54,14 +54,14 @@
<body>
<div class="folium-map" id="map_0d47d5844cb03a1b59409c5f2e45d89e" ></div>
<div class="folium-map" id="map_413b17cf3f148cf9e5299ab727cb1cef" ></div>
</body>
<script>
var map_0d47d5844cb03a1b59409c5f2e45d89e = L.map(
"map_0d47d5844cb03a1b59409c5f2e45d89e",
var map_413b17cf3f148cf9e5299ab727cb1cef = L.map(
"map_413b17cf3f148cf9e5299ab727cb1cef",
{
center: [0.0, 0.0],
crs: L.CRS.EPSG3857,
@ -77,26 +77,6 @@
var tile_layer_833f84bdc2b417e2650cc33bb5c7c348 = L.tileLayer(
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
{
"minZoom": 0,
"maxZoom": 19,
"maxNativeZoom": 19,
"noWrap": false,
"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors",
"subdomains": "abc",
"detectRetina": false,
"tms": false,
"opacity": 1,
}
);
tile_layer_833f84bdc2b417e2650cc33bb5c7c348.addTo(map_0d47d5844cb03a1b59409c5f2e45d89e);
</script>
<script>
@ -116,7 +96,7 @@
}
trajeto_json_add({"features": []});
trajeto_json.addTo(map_0d47d5844cb03a1b59409c5f2e45d89e);
trajeto_json.addTo(map_413b17cf3f148cf9e5299ab727cb1cef);
function adicionarGeometria(novaGeometria) {
trajeto_json.addData(novaGeometria);
@ -179,9 +159,9 @@
var marcadorEquipamento = L.marker([0, 0], {
icon: customIcon
}).addTo(map_0d47d5844cb03a1b59409c5f2e45d89e);
}).addTo(map_413b17cf3f148cf9e5299ab727cb1cef);
var marcadorBase = L.marker([0, 0], {}).addTo(map_0d47d5844cb03a1b59409c5f2e45d89e);
var marcadorBase = L.marker([0, 0], {}).addTo(map_413b17cf3f148cf9e5299ab727cb1cef);
var icon = L.AwesomeMarkers.icon(
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
);
@ -246,7 +226,7 @@
}
if (foco) {
map_0d47d5844cb03a1b59409c5f2e45d89e.setView(novaPosicao, map_0d47d5844cb03a1b59409c5f2e45d89e.getZoom());
map_413b17cf3f148cf9e5299ab727cb1cef.setView(novaPosicao, map_413b17cf3f148cf9e5299ab727cb1cef.getZoom());
}
}
@ -268,7 +248,7 @@
marcadorDinamico.setRotationAngle(angulo);
adicionarCoordenada("Tj", [novaLongitude, novaLatitude]);
map_0d47d5844cb03a1b59409c5f2e45d89e.setView(novaPosicao, map_0d47d5844cb03a1b59409c5f2e45d89e.getZoom());*/
map_413b17cf3f148cf9e5299ab727cb1cef.setView(novaPosicao, map_413b17cf3f148cf9e5299ab727cb1cef.getZoom());*/
});
function calcularOrientacao(P1latitude, P1longitude, P2latitude, P2longitude) {

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@ def definir_comando(pid: PIDAdaptativo, envio_necessario: bool):
if not _snapshot_vw:
visual_worker_atualizado = False
else:
visual_worker_atualizado = (time.time() - _snapshot_vw.get("ts", 0.0) <= 0.15)
visual_worker_atualizado = (time.perf_counter() - _snapshot_vw.get("ts", 0.0) <= 1.0)
if visual_worker_atualizado:
custo, conf, anom, nav = unpack_snapshot(_snapshot_vw)
dists = _snapshot_vw.get("row_dist_m", None)
@ -169,7 +169,7 @@ def definir_comando(pid: PIDAdaptativo, envio_necessario: bool):
except Exception as e:
mostrar_log(f"❌ Erro ao definir comando direcional: {e}")
def _comando_direcional_parado(definido: bool):
def _comando_direcional_parado(definido: bool, frear: bool = False):
try:
angulo, tipo = comando_parado()
_cmd = {
@ -180,7 +180,8 @@ def _comando_direcional_parado(definido: bool):
"latencia": 0.0,
"angulo": angulo,
"tipo": tipo.value,
"simulacao": []
"simulacao": [],
"frear": frear
}
return _cmd
except Exception as e:
@ -229,7 +230,7 @@ def _regras_taticas(contexto):
if decision.get("parar", False):
mostrar_log(f"🟥 Parada necessaria por {reason}.")
return _comando_direcional_parado(True)
return _comando_direcional_parado(True, frear=True)
# motivo narrow: não para, mas dá dica lateral
if isinstance(block, dict) and reason == "narrow":

View File

@ -1,9 +1,10 @@
from shared.enums import ModoOperacao, StatusOperacao, StatusCarroMapa
import time
from shared.enums import ModoOperacao, StatusModulo, StatusOperacao, StatusCarroMapa, T_Code
from shared.contexto_global_redis import ContextoGlobalRedis, CtxKey
from manager_worker.config import mostrar_log
from manager_worker.filtros import FiltroVelocidade
def definir_comando(parada_necessaria: bool, erro: bool, filtro_vel: FiltroVelocidade):
def definir_comando(parada_necessaria: bool, frear: bool, erro: bool, filtro_vel: FiltroVelocidade):
try:
_operacao = ContextoGlobalRedis.get_operacao()
status_operacao = StatusOperacao(_operacao.get("status", StatusOperacao.NaoIniciado.value))
@ -11,15 +12,28 @@ def definir_comando(parada_necessaria: bool, erro: bool, filtro_vel: FiltroVeloc
if erro:
mostrar_log("🟥 Movimento parado: erro ao definir comando direcional.")
return 0.0
return _montar_comando_retorno(0.0, False)
if parada_necessaria:
mostrar_log("🟥 Movimento parado: direcional sem possibilidade de desvio.")
return 0.0
frenagem_automatica = ContextoGlobalRedis.get_controle().get("frenagem_automatica", False)
deve_frear = frenagem_automatica and frear
return _montar_comando_retorno(0.0, deve_frear)
if (status_operacao != StatusOperacao.EmAndamento) or finalizando:
mostrar_log(f"🟥 Movimento parado: operação não está em andamento ou finalizando: {status_operacao.name}")
return 0.0
return _montar_comando_retorno(0.0, False)
_dados_ww = ContextoGlobalRedis.get(CtxKey.DadosWeedWorker, {}).get("analise", {})
_snr = ContextoGlobalRedis.get_modulo(T_Code.Snr)
sonar_ativado = _operacao.get("Snr", {}).get("sonar_ativado", False)
visual_worker_operante = (_snr.get("saude", {}).get("status", StatusModulo.DESCONECTADO.value)) == StatusModulo.OPERANTE.value
analise_deteccao_atualizada = (time.perf_counter() - _dados_vw.get("matriz_confianca", {}).get("ts", 10.0) <= 1.0)
obstaculo_detectado = _dados_vw.get("matriz_confianca", {}).get("block", {}).get("decision", {}).get("parar", False) if analise_deteccao_atualizada else False
if (sonar_ativado and visual_worker_operante and obstaculo_detectado):
mostrar_log(f"🟥 Movimento parado: obstaculo proximo detectado no sonar")
return _montar_comando_retorno(0.0, True)
op_modo = ModoOperacao(_operacao.get("modo", ModoOperacao.NaoDefinido.value))
_contexto = ContextoGlobalRedis.get_contexto()
@ -27,7 +41,7 @@ def definir_comando(parada_necessaria: bool, erro: bool, filtro_vel: FiltroVeloc
pulverizador_automatico = _controle.get("pulverizador_automatico", False)
#ervas_no_radar = _contexto.get("Gerais", {}).get("ervas_no_radar", False)
#percentual_ervas_no_radar = (_contexto.get("Gerais", {}).get("percentual_ervas_no_radar", 0)) * 100.0
_dados_ww = ContextoGlobalRedis.get(CtxKey.DadosWeedWorker, {}).get("analise", {})
ervas_no_radar = _dados_ww.get("ervas_no_radar", False)
percentual_ervas_no_radar = _dados_ww.get("estatisticas", {}).get("ema_global", 0.0)
@ -41,6 +55,7 @@ def definir_comando(parada_necessaria: bool, erro: bool, filtro_vel: FiltroVeloc
status_carro = StatusCarroMapa.Parado
erro = 0
manobrando = False
reduzir_para_pulverizar = False
if op_modo == ModoOperacao.MapaGPS:
_trajetoria = _contexto.get("Trajetoria", {})
@ -64,7 +79,8 @@ def definir_comando(parada_necessaria: bool, erro: bool, filtro_vel: FiltroVeloc
elif status_carro in [StatusCarroMapa.EntrandoRua, StatusCarroMapa.SaindoRua, StatusCarroMapa.Manobrando]:
velocidade_sp = min(vel_min, vel_com_ervas)
elif status_carro == StatusCarroMapa.CaminhandoRua:
if pulverizador_automatico and ervas_no_radar and percentual_ervas_no_radar > ervas_min_percenet:
reduzir_para_pulverizar = pulverizador_automatico and ervas_no_radar and percentual_ervas_no_radar > ervas_min_percenet
if reduzir_para_pulverizar:
velocidade_sp = vel_com_ervas
else:
velocidade_sp = calcular_velocidade_relativa(vel_com_ervas, vel_sem_ervas, ang_max, erro)
@ -72,14 +88,14 @@ def definir_comando(parada_necessaria: bool, erro: bool, filtro_vel: FiltroVeloc
# Aplica limites
velocidade_sp = max(vel_com_ervas, min(vel_sem_ervas, velocidade_sp))
if velocidade_sp < 1.0:
if velocidade_sp < 1.0 or reduzir_para_pulverizar:
filtro_vel.reset(velocidade_sp)
else:
velocidade_sp = filtro_vel.filtrar(velocidade_sp)
#mostrar_log(f"🚗 Velocidade definida: {velocidade_sp:.1f}%")
return velocidade_sp
return _montar_comando_retorno(velocidade_sp, False)
except Exception as e:
mostrar_log(f"Erro ao definir o comando de movimentacao: {e}")
@ -90,3 +106,9 @@ def calcular_velocidade_relativa(vel_min, vel_max, ang_max, erro_orientacao):
faixa = vel_max - vel_min
velocidade = vel_max - (faixa * penalidade)
return round(velocidade, 2)
def _montar_comando_retorno(velocidade_sp: float, frear: bool):
return {
"velocidade": velocidade_sp,
"frear": frear
}

View File

@ -21,19 +21,20 @@ class ProcessadorEmAndamento(ProcessadorBase):
saida_min=-ang_max,
saida_max=ang_max
)
self.ultimo_comando_enviado = time.time()
self.ultimo_comando_enviado = time.perf_counter()
def processar(self):
try:
agora = time.time()
agora = time.perf_counter()
envio_necessario = (agora - self.ultimo_comando_enviado) > 0.3
comando_dir = definir_comando_dir(self.pid_dir, envio_necessario)
if comando_dir.get("enviar_comando", False):
self.ultimo_comando_enviado = agora
velocidade_sp = definir_comando_mov(comando_dir.get("parada_necessaria", False), comando_dir.get("erro", False), self.filtro_mov)
comando_mov = definir_comando_mov(comando_dir.get("parada_necessaria", False), comando_dir.get("frear", False), comando_dir.get("erro", False), self.filtro_mov)
return comando_controle(
percentual_velocidade=velocidade_sp,
percentual_velocidade=comando_mov.get("velocidade"),
frear=comando_mov.get("frear", False),
angulo=comando_dir.get("angulo"),
tipo_movimento=comando_dir.get("tipo"),
simulacao=comando_dir.get("simulacao"),

View File

@ -3,7 +3,7 @@ from shared.enums import ModoOperacao, StatusOperacao
from manager_worker.config import mostrar_log
from shared.contexto_global_redis import ContextoGlobalRedis, CtxKey
def comando_controle(percentual_velocidade: float, angulo: float, tipo_movimento: int, simulacao = [], erro: bool = False, latencia: float = 0.0):
def comando_controle(percentual_velocidade: float, frear: bool, angulo: float, tipo_movimento: int, simulacao = [], erro: bool = False, latencia: float = 0.0):
hb_atual = ContextoGlobalRedis.get_controle().get("heartbeat", 0)
if erro == False:
try:
@ -17,12 +17,14 @@ def comando_controle(percentual_velocidade: float, angulo: float, tipo_movimento
angulo_sp=angulo,
tipo_movimento_direcional=tipo_movimento,
velocidade_sp=percentual_velocidade,
em_freio=frear,
simulacao=simulacao,
heartbeat=hb_atual,
latencia=latencia
)
return {
"velocidade_sp": percentual_velocidade,
"em_freio": frear,
"angulo_sp": angulo,
"tipo_movimento_direcional": tipo_movimento,
"simulacao": simulacao,

View File

@ -126,10 +126,10 @@ def carregar_labelmap_completo(caminho):
id_para_nome[idx] = nome_classe
idx += 1
print(f"Mapa: {cor_para_id}")
print(f"Colormap RGB: {cores_rgb}")
print(f"Classes: {id_para_nome}")
print(f"Ignore RGB: {ignore_rgb}")
#print(f"Mapa: {cor_para_id}")
#print(f"Colormap RGB: {cores_rgb}")
#print(f"Classes: {id_para_nome}")
#print(f"Ignore RGB: {ignore_rgb}")
return cor_para_id, cores_rgb, id_para_nome, ignore_rgb

View File

@ -875,6 +875,7 @@ class CameraManager:
# --- NOVOS (debug/uso opcional) ---
det_cov_max, det_conf_max, det_score
"""
try:
if class_ids is None:
class_ids = {'rua': 0, 'cana': 1, 'obs': 2}
@ -1087,6 +1088,9 @@ class CameraManager:
"det_top_label_id": det_top_label_id,
"det_top_conf": det_top_conf,
}
except Exception as e:
self.mostrar_log(f"Erro ao construir grid de confianca: {e}")
return None
def _put_text_centered(self, img, text, cx, cy, font_scale=0.4, thickness=1, color=(255,255,255), outline=True):
font = cv2.FONT_HERSHEY_SIMPLEX
@ -1400,6 +1404,7 @@ class CameraManager:
a_max_freio=0.8, # << NOVO (m/s²)
margem_parada=0.25, # << NOVO (m)
):
try:
# --- unpack do snapshot ---
custo_f, conf_f, anom_f, nav_f = unpack_snapshot(snapshot)
row_dist_m = np.asarray(snapshot.get("row_dist_m"), dtype=np.float32)
@ -1480,7 +1485,7 @@ class CameraManager:
x2 = int(b * Wf / W)
cv2.rectangle(vis, (x1, max(0, y-12)), (x2, min(Hf-1, y+12)), (0, 255, 0), 2)
txt = f"{reason.upper()} | d={d_obs_min:.2f} m" if d_obs_min is not None else f"{reason.upper()} | d="
txt = f"{reason.upper()} | d={d_obs_min:.2f} m" if d_obs_min is not None else f"{reason.upper()} | d=-"
cv2.putText(vis, txt, (10, max(20, y-10)), cv2.FONT_HERSHEY_SIMPLEX, 0.6, color_line, 2, cv2.LINE_AA)
# --- HUDs (legíveis) ---
@ -1587,6 +1592,9 @@ class CameraManager:
cv2.imshow(win_name, vis)
cv2.waitKey(1)
return vis, metrics
except Exception as e:
self.mostrar_log(f"Erro ao criar debug blockage imshow: {e}")
return None, None
def _overlay_deteccoes(
@ -1610,6 +1618,7 @@ class CameraManager:
}
Retorna: (frame_com_overlay, fps_state, keep_loop_bool)
"""
try:
img = cv2.resize(rgb_frame.copy(), (1280, 720))
H, W = img.shape[:2]
@ -1705,4 +1714,6 @@ class CameraManager:
keep = (k != 27) # ESC para sair
return img, fps_state, keep
except Exception as e:
self.mostrar_log(f"Erro ao gerar overlay de deteccoes")

View File

@ -53,12 +53,16 @@ class CostmapFuser:
def _stack(self, lst, fallback_val=0.0):
"""Empilha listas de arrays (grid_h,grid_w). Se vazio, devolve um array fill."""
try:
if len(lst) == 0:
return np.full((0, self.grid_h, self.grid_w), fallback_val, np.float32)
return np.stack(lst, axis=0)
except Exception as e:
mostrar_log(f"Erro no _stack: {e}")
def _fuse_array(self, stack, method, q=0.7, avg=False):
"""Fusão temporal de um stack (T, H, W)."""
try:
if stack.shape[0] == 0:
return np.zeros((self.grid_h, self.grid_w), np.float32)
if avg:
@ -67,17 +71,23 @@ class CostmapFuser:
return np.max(stack, axis=0).astype(np.float32)
# quantil
return np.quantile(stack, q, axis=0).astype(np.float32)
except Exception as e:
mostrar_log(f"Erro no _fuse_array: {e}")
def _rows_near_to_far(self):
"""Ordem das linhas do mais perto ao mais longe."""
try:
if self.near_is_bottom:
# j = grid_h-1 (baixo) é mais perto
return range(self.grid_h - 1, -1, -1)
# j=0 (topo) é mais perto
return range(0, self.grid_h, 1)
except Exception as e:
mostrar_log(f"Erro no _rows_near_far: {e}")
def _row_distances(self, z_ref_2d=None):
"""Distância (m) por linha (H,), usando z_ref se disponível."""
try:
if z_ref_2d is not None and np.isfinite(z_ref_2d).any():
# mediana por linha na janela central
i0, i1 = self.central_cols
@ -91,6 +101,8 @@ class CostmapFuser:
# bottom (j=H-1) = y_min; top (j=0) = y_max
return lin[::-1]
return lin
except Exception as e:
mostrar_log(f"Erro no _row_distances: {e}")
def _compute_blockage_metrics(
self,
@ -114,6 +126,7 @@ class CostmapFuser:
det_strength=None, # (H,W) 0..1 ~ conf*cov dominante
thr_det_consider=0.15
):
try:
H, W = custo_f.shape
c0, c1 = central_cols
c0 = max(0, min(W-1, int(c0)))
@ -148,12 +161,15 @@ class CostmapFuser:
cols_need[j] = max(1, min(W, ncols))
def central_window(j, ncols):
try:
mid = (c0 + c1) // 2
half = ncols // 2
a = max(0, mid - half)
b = min(W, a + ncols)
a = max(0, b - ncols)
return a, b
except Exception as e:
mostrar_log(f"Erro no central_window: {e}")
# 3) Varredura central (cobertura e "existe obstáculo?")
coverage_central = np.zeros(H, np.float32)
@ -255,7 +271,10 @@ class CostmapFuser:
# 7) Decisão "raw" (sem persistência) + detalhes
def _fmt_m(x):
try:
return "-" if (x is None or not np.isfinite(x)) else f"{float(x):.2f} m"
except Exception as e:
mostrar_log(f"Erro no _fmt_m: {e}")
conf_mean = float(conf_f.mean())
central_cov_max = float(coverage_central.max())
@ -264,18 +283,22 @@ class CostmapFuser:
reason = "none"
reason_detail = "Caminho livre."
# qual distância vamos considerar como "mais conservadora"
# (pixel inseguro mais perto vs linha que bloqueia)
def _min_non_none(a, b):
try:
if a is None and b is None: return 0
if a is None: return b
if b is None: return a
return a if a <= b else b
except Exception as e:
mostrar_log(f"Erro no _min_non_none: {e}")
if j_block is not None:
# houve uma linha com cobertura central >= rho_block_central
blocked_raw = True
reason = "obstacle"
# qual distância vamos considerar como "mais conservadora"
# (pixel inseguro mais perto vs linha que bloqueia)
def _min_non_none(a, b):
if a is None: return b
if b is None: return a
return a if a <= b else b
d_used = _min_non_none(d_obs_true_min_m_z, d_block_line_m_z)
extra_det_txt = ""
@ -387,13 +410,6 @@ class CostmapFuser:
dist_necessaria = dist_freio + margem_parada
decision["dist_necessaria"] = float(dist_necessaria)
# usamos o mais conservador entre a linha-bloqueio e o "qualquer-unsafe"
def _min_non_none(a, b):
if (a is None) and (b is None): return None
if a is None: return b
if b is None: return a
return a if a <= b else b
d_for_stop = _min_non_none(d_block_line_m_z, d_obs_true_min_m_z)
stop_now = False
@ -463,15 +479,20 @@ class CostmapFuser:
"j_obs_true_min": (None if j_obs_true_min is None else int(j_obs_true_min)),
"decision": decision
}
except Exception as e:
mostrar_log("Erro no _compute_blockage_metrics")
def _row_scale_x(self, row_dist_m):
"""metros por célula em X para cada linha, dado FOV_H."""
try:
if self.fov_h_rad is None:
return None
# largura coberta naquela linha
row_width = 2.0 * row_dist_m * math.tan(0.5 * float(self.fov_h_rad)) # (H,)
# metros por coluna
return (row_width / float(self.grid_w)).astype(np.float32) # (H,)
except Exception as e:
mostrar_log("Erro no _row_scale_x")
def update(self, grid_dict, ts=None, velocidade_ms=0.0):
"""
@ -479,6 +500,7 @@ class CostmapFuser:
opcional: "z_ref" (m) 2D
Retorna snapshot pronto pra serializar e gravar no Redis.
"""
try:
if ts is None:
ts = time.perf_counter()
custo = grid_dict["custo"].astype(np.float32)
@ -615,6 +637,8 @@ class CostmapFuser:
# snap["zref_u8"] = zref_u8.ravel().tolist()
return snap
except Exception as e:
mostrar_log(f"Erro ao atualizar dados do costmap: {e}")
@ -637,3 +661,6 @@ def unpack_snapshot(snap):
def thr_u8(snap):
thr = float(snap["fuse"]["block_thr"]) # ex.: 0.7
return int(round(thr * 255.0)) # 0.7 -> 179
def mostrar_log(mensagem):
print(f"[COSTMAP_FUSER] {mensagem}")

View File

@ -62,6 +62,7 @@
this.cmbConfiguracaoUltrassom = new System.Windows.Forms.ComboBox();
this.btnConfigurar = new System.Windows.Forms.Button();
this.gpbLocomocao = new System.Windows.Forms.GroupBox();
this.chbMovimentacaoAutomatica = new System.Windows.Forms.CheckBox();
this.nudVelMin = new System.Windows.Forms.NumericUpDown();
this.nudVelMax = new System.Windows.Forms.NumericUpDown();
this.lblKmh2 = new System.Windows.Forms.Label();
@ -71,6 +72,7 @@
this.lblVelocidadeComErvas = new System.Windows.Forms.Label();
this.lblVelocidadeSemErvas = new System.Windows.Forms.Label();
this.gpbAtuador = new System.Windows.Forms.GroupBox();
this.chbPulverizadorAutomatico = new System.Windows.Forms.CheckBox();
this.txtQtdCameras = new System.Windows.Forms.TextBox();
this.lblQuantidadeCamerasSolo = new System.Windows.Forms.Label();
this.lblMs = new System.Windows.Forms.Label();
@ -121,8 +123,7 @@
this.chbMapa = new System.Windows.Forms.CheckBox();
this.rtbCam = new System.Windows.Forms.RichTextBox();
this.chbCameraSolo = new System.Windows.Forms.CheckBox();
this.chbPulverizadorAutomatico = new System.Windows.Forms.CheckBox();
this.chbMovimentacaoAutomatica = new System.Windows.Forms.CheckBox();
this.chbFrenagemAutomatica = new System.Windows.Forms.CheckBox();
this.gpbModulos.SuspendLayout();
this.pnlModulos.SuspendLayout();
this.tabControl1.SuspendLayout();
@ -492,6 +493,7 @@
this.chbSonarAtivado.TabIndex = 13;
this.chbSonarAtivado.Text = "Utilizar dados visuais do Sonar";
this.chbSonarAtivado.UseVisualStyleBackColor = true;
this.chbSonarAtivado.CheckedChanged += new System.EventHandler(this.chbSonarAtivado_CheckedChanged);
//
// rtbDescricao
//
@ -535,6 +537,7 @@
//
// gpbLocomocao
//
this.gpbLocomocao.Controls.Add(this.chbFrenagemAutomatica);
this.gpbLocomocao.Controls.Add(this.chbMovimentacaoAutomatica);
this.gpbLocomocao.Controls.Add(this.nudVelMin);
this.gpbLocomocao.Controls.Add(this.nudVelMax);
@ -551,6 +554,16 @@
this.gpbLocomocao.TabStop = false;
this.gpbLocomocao.Text = "Locomoção";
//
// chbMovimentacaoAutomatica
//
this.chbMovimentacaoAutomatica.AutoSize = true;
this.chbMovimentacaoAutomatica.Location = new System.Drawing.Point(9, 85);
this.chbMovimentacaoAutomatica.Name = "chbMovimentacaoAutomatica";
this.chbMovimentacaoAutomatica.Size = new System.Drawing.Size(191, 17);
this.chbMovimentacaoAutomatica.TabIndex = 8;
this.chbMovimentacaoAutomatica.Text = "Controle de Movimento Automático";
this.chbMovimentacaoAutomatica.UseVisualStyleBackColor = true;
//
// nudVelMin
//
this.nudVelMin.Location = new System.Drawing.Point(358, 55);
@ -650,6 +663,16 @@
this.gpbAtuador.TabStop = false;
this.gpbAtuador.Text = "Atuador";
//
// chbPulverizadorAutomatico
//
this.chbPulverizadorAutomatico.AutoSize = true;
this.chbPulverizadorAutomatico.Location = new System.Drawing.Point(9, 192);
this.chbPulverizadorAutomatico.Name = "chbPulverizadorAutomatico";
this.chbPulverizadorAutomatico.Size = new System.Drawing.Size(209, 17);
this.chbPulverizadorAutomatico.TabIndex = 15;
this.chbPulverizadorAutomatico.Text = "Pulverizador Com Ativação Automática";
this.chbPulverizadorAutomatico.UseVisualStyleBackColor = true;
//
// txtQtdCameras
//
this.txtQtdCameras.Location = new System.Drawing.Point(358, 163);
@ -1183,25 +1206,15 @@
this.chbCameraSolo.UseVisualStyleBackColor = false;
this.chbCameraSolo.CheckedChanged += new System.EventHandler(this.chbParametro_CheckedChanged);
//
// chbPulverizadorAutomatico
// chbFrenagemAutomatica
//
this.chbPulverizadorAutomatico.AutoSize = true;
this.chbPulverizadorAutomatico.Location = new System.Drawing.Point(9, 192);
this.chbPulverizadorAutomatico.Name = "chbPulverizadorAutomatico";
this.chbPulverizadorAutomatico.Size = new System.Drawing.Size(209, 17);
this.chbPulverizadorAutomatico.TabIndex = 15;
this.chbPulverizadorAutomatico.Text = "Pulverizador Com Ativação Automática";
this.chbPulverizadorAutomatico.UseVisualStyleBackColor = true;
//
// chbMovimentacaoAutomatica
//
this.chbMovimentacaoAutomatica.AutoSize = true;
this.chbMovimentacaoAutomatica.Location = new System.Drawing.Point(9, 85);
this.chbMovimentacaoAutomatica.Name = "chbMovimentacaoAutomatica";
this.chbMovimentacaoAutomatica.Size = new System.Drawing.Size(191, 17);
this.chbMovimentacaoAutomatica.TabIndex = 8;
this.chbMovimentacaoAutomatica.Text = "Controle de Movimento Automático";
this.chbMovimentacaoAutomatica.UseVisualStyleBackColor = true;
this.chbFrenagemAutomatica.AutoSize = true;
this.chbFrenagemAutomatica.Location = new System.Drawing.Point(235, 85);
this.chbFrenagemAutomatica.Name = "chbFrenagemAutomatica";
this.chbFrenagemAutomatica.Size = new System.Drawing.Size(281, 17);
this.chbFrenagemAutomatica.TabIndex = 9;
this.chbFrenagemAutomatica.Text = "Frenagem automática ao detectar obstáculos no radar";
this.chbFrenagemAutomatica.UseVisualStyleBackColor = true;
//
// frmAjustesOperacao
//
@ -1346,5 +1359,6 @@
private System.Windows.Forms.CheckBox chbLoRa_M;
private System.Windows.Forms.CheckBox chbMovimentacaoAutomatica;
private System.Windows.Forms.CheckBox chbPulverizadorAutomatico;
private System.Windows.Forms.CheckBox chbFrenagemAutomatica;
}
}

View File

@ -17,6 +17,7 @@ namespace AgroMonitor.Forms
string path = Variaveis.CaminhoSistema + Variaveis.CaminhoOperacoes + "\\" + MapasVariaveisModel.NomeArquivoMapaInterativoSaida;
UltrasonicA05Configuracoes ConfigUltrassom = UltrasonicA05Helper.CarregarConfiguracaoPadrao(ConfiguracaoSensorUltrassonico.NaoUtilizado);
bool carregarOpPadrao = true;
bool carregandoOperacao = false;
MapaDinamicoModel MapaDinamico;
public frmAjustesOperacao()
@ -55,6 +56,8 @@ namespace AgroMonitor.Forms
private void AtualizarDadosOperacao()
{
carregandoOperacao = true;
if (carregarOpPadrao)
{
OperacaoModel.CarregarParametrosOperacaoPadrao((ModoOperacao)cmbModosOperacao.SelectedIndex);
@ -68,7 +71,12 @@ namespace AgroMonitor.Forms
T_Code Dispositivo = (T_Code)Enum.Parse(typeof(T_Code), disp);
var P = Variaveis.OperacaoEmAndamento.ModulosMandatorios.FirstOrDefault(x => x.Dispositivo == Dispositivo);
chb.Checked = P?.Utilizar ?? false;
FuncoesGlobais.FindControlRecursive<CheckBox>(pnlModulos, chb.Name + "_M").Checked = P?.Mandatorio ?? false;
var chbMandatorio = FuncoesGlobais.FindControlRecursive<CheckBox>(pnlModulos, chb.Name + "_M");
if (chb.Checked)
{
chbMandatorio.Enabled = chb.Checked;
chbMandatorio.Checked = P?.Mandatorio ?? false;
}
}
foreach (var chb in pnlParametrosMandatorios.Controls.OfType<CheckBox>().Where(x => !x.Name.Contains("_M")))
@ -77,7 +85,12 @@ namespace AgroMonitor.Forms
ParametrosOperacao Parametro = (ParametrosOperacao)Enum.Parse(typeof(ParametrosOperacao), parametro);
var P = Variaveis.OperacaoEmAndamento.ParametrosMandatorios.FirstOrDefault(x => x.Parametro == Parametro);
chb.Checked = P?.Utilizar ?? false;
FuncoesGlobais.FindControlRecursive<CheckBox>(pnlParametrosMandatorios, chb.Name + "_M").Checked = P?.Mandatorio ?? false;
var chbMandatorio = FuncoesGlobais.FindControlRecursive<CheckBox>(pnlParametrosMandatorios, chb.Name + "_M");
if (chb.Checked)
{
chbMandatorio.Enabled = chb.Checked;
chbMandatorio.Checked = P?.Mandatorio ?? false;
}
}
var _Controle = Variaveis.OperacaoEmAndamento.Controle;
@ -106,6 +119,9 @@ namespace AgroMonitor.Forms
cmbConfiguracaoUltrassom.SelectedIndex = (int)ConfigUltrassom.Configuracao;
}
chbSonarAtivado.Checked = _Controle.SonarAtivado;
chbFrenagemAutomatica.Checked = _Controle.FrenagemAutomatica;
carregandoOperacao = false;
}
private void btnProximo_Click(object sender, EventArgs e)
@ -199,7 +215,8 @@ namespace AgroMonitor.Forms
qtdCameras,
(TiposControladorDirecional)cmbTipoMovimentoDirecional.SelectedIndex,
chbMovimentacaoAutomatica.Checked,
chbPulverizadorAutomatico.Checked
chbPulverizadorAutomatico.Checked,
chbFrenagemAutomatica.Checked
);
if (!sucesso)
{
@ -236,6 +253,7 @@ namespace AgroMonitor.Forms
chbMovimentacaoAutomatica.Checked = Variaveis.OperacaoEmAndamento.Controle.MovimentoAutomatico;
chbPulverizadorAutomatico.Checked = Variaveis.OperacaoEmAndamento.Controle.PulverizadorAutomatico;
chbFrenagemAutomatica.Checked = Variaveis.OperacaoEmAndamento.Controle.FrenagemAutomatica;
MessageBox.Show("Operação carregada com sucesso!", "Sucesso", MessageBoxButtons.OK, MessageBoxIcon.Information);
@ -258,6 +276,8 @@ namespace AgroMonitor.Forms
private void chbModulo_CheckedChanged(object sender, EventArgs e)
{
if (carregandoOperacao) return;
CheckBox chb = (CheckBox)sender;
string ModID = chb.Name.Replace("chb", "");
T_Code Dispositivo = (T_Code)Enum.Parse(typeof(T_Code), ModID);
@ -288,6 +308,8 @@ namespace AgroMonitor.Forms
private void chbModuloMandatorio_CheckedChanged(object sender, EventArgs e)
{
if (carregandoOperacao) return;
CheckBox chb = (CheckBox)sender;
string ModID = chb.Name.Replace("chb", "").Replace("_M", "");
T_Code Dispositivo = (T_Code)Enum.Parse(typeof(T_Code), ModID);
@ -313,6 +335,8 @@ namespace AgroMonitor.Forms
private void chbParametro_CheckedChanged(object sender, EventArgs e)
{
if (carregandoOperacao) return;
CheckBox chb = (CheckBox)sender;
string parametro = chb.Name.Replace("chb", "");
ParametrosOperacao Parametro = (ParametrosOperacao)Enum.Parse(typeof(ParametrosOperacao), parametro);
@ -346,6 +370,8 @@ namespace AgroMonitor.Forms
private void chbParametroMandatorio_CheckedChanged(object sender, EventArgs e)
{
if (carregandoOperacao) return;
CheckBox chb = (CheckBox)sender;
string parametro = chb.Name.Replace("chb", "").Replace("_M", "");
ParametrosOperacao Parametro = (ParametrosOperacao)Enum.Parse(typeof(ParametrosOperacao), parametro);
@ -405,6 +431,13 @@ namespace AgroMonitor.Forms
pnlZoomMapa.Visible = chbMapaDinamico.Checked;
}
private void chbSonarAtivado_CheckedChanged(object sender, EventArgs e)
{
chbFrenagemAutomatica.Enabled = chbSonarAtivado.Checked;
if (!chbFrenagemAutomatica.Enabled)
{
chbFrenagemAutomatica.Checked = false;
}
}
}
}

View File

@ -1,21 +1,4 @@
0:02:15 Microsoft.Shutdown.TabStripModel.RunUnloadListenerBeforeClosing_false
0:02:15 Microsoft.Shutdown.TabStripModel.InternalCloseTabsImpl_ClosedAll
0:02:15 Microsoft.Shutdown.TabStripModel.SendDetachWebContentsNotifications
0:02:15 Microsoft.UnloadController.ClearUnloadState
0:02:15 Browser1 Close Tab1 at 0
0:02:15 Tab1 WebContentsDestroyed
0:02:15 Microsoft.UnloadController.TabStripEmpty
0:02:15 Microsoft.UnloadController.IsUnclosableApp_IsNotWebApp
0:02:15 Microsoft.UnloadController.HasCompletedUnloadProcessing_True
0:02:15 Microsoft.Shutdown.OnWindowClosing
0:02:15 Microsoft.UnloadController.IsUnclosableApp_IsNotWebApp
0:02:15 Microsoft.UnloadController.HasCompletedUnloadProcessing_True
0:02:15 Microsoft.Shutdown.OnWindowClosingPostClearBrowsingData_NoBrowsingDataCleared
0:02:15 Widget Closed: BrowserFrame
0:02:15 Microsoft.UnloadController.HasCompletedUnloadProcessing_True
0:02:15 Microsoft.Shutdown.OnWindowClosing
0:02:15 Microsoft.Shutdown.OnWindowClosing_DeleteScheduled
0:02:15 Microsoft.Last_Browser_Removed
0:09:19 Microsoft.Shutdown.TabStripModel.SendDetachWebContentsNotifications
0:00:00 Startup
0:00:00 Microsoft.DeleteProfileHelper.CleanUpEphemeralProfiles
0:00:00 Microsoft.DeleteProfileHelper.CleanUpDeletedProfiles
@ -23,62 +6,40 @@
0:00:00 Microsoft.BrowserList.AddBrowser
0:00:00 Browser1 Insert active Tab1 at 0
0:00:00 Tab1 StartNav1 #auto_toplevel
0:00:00 Tab1 StartNav2 #typed
0:00:00 Tab1 FinishNav1
0:00:00 Tab1 PageLoad
0:00:00 Tab1 FinishNav2
0:00:00 Tab1 PageLoad
0:00:25 Memory Pressure: Critical
0:01:35 Microsoft.NewBrowser_Popup
0:01:35 Microsoft.BrowserList.AddBrowser
0:01:35 Browser2 Insert active Tab2 at 0
0:01:35 Tab2 StartNav3 #auto_toplevel
0:01:35 Tab2 StartNav4 #typed
0:01:36 Tab2 FinishNav3
0:01:36 Tab2 PageLoad
0:01:36 Tab2 FinishNav4
0:01:36 Tab2 PageLoad
0:01:57 Memory Pressure: Critical
0:03:34 Microsoft.NewBrowser_Popup
0:03:34 Microsoft.BrowserList.AddBrowser
0:03:34 Browser3 Insert active Tab3 at 0
0:03:34 Tab3 StartNav5 #auto_toplevel
0:03:34 Tab3 StartNav6 #typed
0:03:34 Tab3 FinishNav5
0:03:34 Tab3 PageLoad
0:03:34 Tab3 FinishNav6
0:03:35 Tab3 PageLoad
0:04:19 Memory Pressure: Critical
0:05:10 Microsoft.NewBrowser_Popup
0:05:10 Microsoft.BrowserList.AddBrowser
0:05:10 Browser4 Insert active Tab4 at 0
0:05:10 Tab4 StartNav7 #auto_toplevel
0:05:10 Tab4 StartNav8 #typed
0:05:10 Tab4 FinishNav7
0:05:10 Tab4 PageLoad
0:05:10 Tab4 FinishNav8
0:05:10 Tab4 PageLoad
0:05:47 Memory Pressure: Critical
0:00:00 Startup
0:00:00 Microsoft.DeleteProfileHelper.CleanUpEphemeralProfiles
0:00:00 Microsoft.DeleteProfileHelper.CleanUpDeletedProfiles
0:00:00 Microsoft.NewBrowser_Popup
0:00:00 Microsoft.BrowserList.AddBrowser
0:00:00 Browser1 Insert active Tab1 at 0
0:00:00 Tab1 StartNav1 #auto_toplevel
0:00:00 Tab1 StartNav2 #typed
0:00:00 Tab1 FinishNav1
0:00:00 Tab1 PageLoad
0:00:00 Tab1 FinishNav2
0:00:00 Tab1 PageLoad
0:00:25 Memory Pressure: Critical
0:02:59 Microsoft.NewBrowser_Popup
0:02:59 Microsoft.BrowserList.AddBrowser
0:02:59 Browser2 Insert active Tab2 at 0
0:02:59 Tab2 StartNav3 #auto_toplevel
0:02:59 Tab2 StartNav4 #typed
0:02:59 Tab2 FinishNav3
0:02:59 Tab2 PageLoad
0:02:59 Tab2 FinishNav4
0:02:59 Tab2 PageLoad
0:05:10 Memory Pressure: Critical
0:00:01 Memory Pressure: Critical
0:00:11 Tab1 StartNav2 #typed
0:00:11 Tab1 FinishNav2
0:00:12 Tab1 PageLoad
0:00:35 Microsoft.NewBrowser_Popup
0:00:35 Microsoft.BrowserList.AddBrowser
0:00:35 Browser2 Insert active Tab2 at 0
0:00:35 Tab2 StartNav3 #auto_toplevel
0:00:35 Tab2 StartNav4 #typed
0:00:35 Tab2 FinishNav3
0:00:35 Tab2 PageLoad
0:00:35 Tab2 FinishNav4
0:00:35 Tab2 PageLoad
0:00:41 Memory Pressure: Critical
0:01:48 Microsoft.NewBrowser_Popup
0:01:48 Microsoft.BrowserList.AddBrowser
0:01:48 Browser3 Insert active Tab3 at 0
0:01:48 Tab3 StartNav5 #auto_toplevel
0:01:48 Tab3 FinishNav5
0:01:48 Tab3 PageLoad
0:01:50 Tab3 StartNav6 #typed
0:01:50 Tab3 FinishNav6
0:01:50 Tab3 PageLoad
0:02:04 Memory Pressure: Critical
0:02:56 Microsoft.NewBrowser_Popup
0:02:56 Microsoft.BrowserList.AddBrowser
0:02:56 Browser4 Insert active Tab4 at 0
0:02:56 Tab4 StartNav7 #auto_toplevel
0:02:56 Tab4 StartNav8 #typed
0:02:56 Tab4 FinishNav7
0:02:56 Tab4 PageLoad
0:02:56 Tab4 FinishNav8
0:02:56 Tab4 PageLoad
0:05:15 Memory Pressure: Critical
0:05:16 Microsoft.UnloadController.IsUnclosableApp_IsNotWebApp

View File

@ -1,13 +1,13 @@
{
"epochs": [ {
"calculation_time": "13399989621907661",
"calculation_time": "13400859163413956",
"config_version": 0,
"model_version": "0",
"padded_top_topics_start_index": 0,
"taxonomy_version": 0,
"top_topics_and_observing_domains": [ ]
}, {
"calculation_time": "13400859163413956",
"calculation_time": "13402493510652849",
"config_version": 0,
"model_version": "0",
"padded_top_topics_start_index": 0,
@ -15,5 +15,5 @@
"top_topics_and_observing_domains": [ ]
} ],
"hex_encoded_hmac_key": "171DAE543B88106F5155169E0A8C7502CB2A0757E4948C32E2A04D196E23BE70",
"next_scheduled_calculation_time": "13401463963414108"
"next_scheduled_calculation_time": "13403098310652891"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Some files were not shown because too many files have changed in this diff Show More