update console

This commit is contained in:
Đăng Nguyễn 2025-12-22 19:43:04 +07:00
parent 4ceec9abd5
commit b006c5b197
6 changed files with 0 additions and 20 deletions

View File

@ -16,7 +16,6 @@ public class OrderController(IOrder robotOrderController, IInstantActions instan
public IActionResult SendOrder([FromBody] OrderMsg order)
{
robotOrderController.UpdateOrder(order);
Console.WriteLine(JsonSerializer.Serialize(order));
return Ok(new
{
success = true,

View File

@ -195,17 +195,6 @@ public class MQTTClient : IAsyncDisposable
arg.Chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllowUnknownCertificateAuthority;
var isValid = arg.Chain.Build((X509Certificate2)arg.Certificate);
if (isValid)
{
Console.WriteLine("Broker CERTIFICATE VALID");
}
else
{
Console.WriteLine("Broker CERTIFICATE INVALID");
foreach (var status in arg.Chain.ChainStatus)
Console.WriteLine($" -> Chain error: {status.Status} - {status.StatusInformation}");
}
return isValid;
}
}

View File

@ -27,7 +27,6 @@ public class MQTTClientCertificatesProvider(string? CerFile, string? KeyFile) :
var cert = X509Certificate2.CreateFromPem(File.ReadAllText(certLocal), File.ReadAllText(keyLocal));
var pfxBytes = cert.Export(X509ContentType.Pfx);
var pfxCert = X509CertificateLoader.LoadPkcs12(pfxBytes, "", X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
Console.WriteLine($"Client cert loaded: {pfxCert.Subject}, HasPrivateKey: {pfxCert.HasPrivateKey}, PrivateKey Type: {pfxCert.GetRSAPrivateKey()?.GetType()}");
return [pfxCert];
}
}

View File

@ -96,7 +96,6 @@ public abstract class RobotAction(IServiceProvider serviceProvider) : IDisposabl
protected virtual Task StopAction()
{
Console.WriteLine($"StopAction {Type}");
Status = ActionStatus.FAILED;
ResultDescription = "Action bị hủy bỏ.";
return Task.CompletedTask;

View File

@ -169,15 +169,11 @@ public class RobotStatePublisher : BackgroundService
isConnected, // payload only bool
stoppingToken
);
Console.WriteLine(
$"[RobotStatePublisher] Robot connection changed → {(isConnected ? "ONLINE" : "OFFLINE")}"
);
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
}

View File

@ -158,14 +158,12 @@ public class SimulationNavigation : INavigation, IDisposable
public void Pause()
{
Console.WriteLine($"Nav Pause");
ResumeState = State;
NavState = NavigationState.Paused;
}
public void Resume()
{
Console.WriteLine($"Nav Resume");
NavState = ResumeState;
}