disable voice
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Media;
|
||||
using System.IO.Ports;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ModuleWeather;
|
||||
@@ -12,13 +11,11 @@ public partial class WeatherView : UserControl
|
||||
|
||||
private void Update(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var ports = SerialPort.GetPortNames();
|
||||
PortComboBox.ItemsSource = ports; // Привязываем массив к списку
|
||||
|
||||
|
||||
|
||||
}
|
||||
private void OnPortChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
WeatherModule.port = PortComboBox.SelectedItem as string;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using Avalonia.Controls;
|
||||
using VisionAsist.SDK;
|
||||
using System.IO.Ports;
|
||||
namespace ModuleWeather;
|
||||
|
||||
public class WeatherModule : IModule
|
||||
{
|
||||
public SerialPort myPort = new ();
|
||||
|
||||
public static string port;
|
||||
public WeatherModule()
|
||||
{
|
||||
@@ -38,11 +37,7 @@ public class WeatherModule : IModule
|
||||
public object Execute(string command)
|
||||
{
|
||||
|
||||
myPort.Close();
|
||||
myPort = new SerialPort(port, 9600);
|
||||
myPort.Open();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,15 +46,6 @@ public class WeatherModule : IModule
|
||||
case "погода":
|
||||
|
||||
return "Погода хорошая!";
|
||||
|
||||
case "поверни на *":
|
||||
myPort.WriteLine("178");
|
||||
|
||||
return "Повернул на 180";
|
||||
case "верни *":
|
||||
myPort.WriteLine("0");
|
||||
|
||||
return "Вернул в 0";
|
||||
default:
|
||||
return "Команда не найдена";
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
<Message Text="Копирую файлы модуля и нативные библиотеки..." Importance="high" />
|
||||
|
||||
<Copy SourceFiles="@(ModuleFiles)"
|
||||
DestinationFolder="/home/egor/RiderProjects/Vision/VisionAsist/bin/Debug/net10.0/Modules/ModuleWeather/"
|
||||
DestinationFolder="E:\Project\Visual\VisionAsist\VisionAsist\bin\Debug\net10.0\Modules\ModuleWeather"
|
||||
OverwriteReadOnlyFiles="true" />
|
||||
|
||||
<!-- Копируем .so файлы ПРЯМО в корень папки модуля -->
|
||||
<Copy SourceFiles="@(NativeLibs)"
|
||||
DestinationFolder="/home/egor/RiderProjects/Vision/VisionAsist/bin/Debug/net10.0/Modules/ModuleWeather/"
|
||||
DestinationFolder="E:\Project\Visual\VisionAsist\VisionAsist\bin\Debug\net10.0\Modules\ModuleWeather"
|
||||
OverwriteReadOnlyFiles="true" />
|
||||
</Target>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user