Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 1501e7e

Browse files
committed
2 parents 67f0f4f + fe31cd9 commit 1501e7e

File tree

1 file changed

+9
-64
lines changed

1 file changed

+9
-64
lines changed

README.md

Lines changed: 9 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,14 @@
11
# CoyoteLibCSharp
2-
## Nuget : [Meow.DGLablib](https://www.nuget.org/packages/Meow.DGLablib/)
3-
![Nuget包版本](https://img.shields.io/nuget/vpre/Meow.DGLablib?label=NuGet%20Version)
4-
![Nuget下载数](https://img.shields.io/nuget/dt/Meow.DGLablib)
5-
![GitHub last commit](https://img.shields.io/github/last-commit/DavidSciMeow/DGLab_Coyote_CSharp_Library)
6-
[![CodeFactor](https://www.codefactor.io/repository/github/davidscimeow/dglab_coyote_csharp_library/badge)](https://www.codefactor.io/repository/github/davidscimeow/dglab_coyote_csharp_library)
7-
## 郊狼控制库 C#\[.NET\]版本 \(非跨平台/仅限Windows\) \(目前只有V3\)
2+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
3+
![GitHub last commit](https://img.shields.io/github/last-commit/DavidSciMeow/DGLab_Coyote_CSharp_Library)
4+
[![Open Issues](https://img.shields.io/github/issues/DavidSciMeow/DGLab_Coyote_CSharp_Library)](https://github.com/DavidSciMeow/DGLab_Coyote_CSharp_Library/issues)
5+
[![Code Quality](https://www.codefactor.io/repository/github/DavidSciMeow/DGLab_Coyote_CSharp_Library/badge)](https://www.codefactor.io/repository/github/DavidSciMeow/DGLab_Coyote_CSharp_Library)
6+
![Language](https://img.shields.io/github/languages/top/DavidSciMeow/DGLab_Coyote_CSharp_Library)
7+
![Framework](https://img.shields.io/badge/.NET-9.0-blue)
8+
## 详情使用方式请点击[Wiki](https://github.com/DavidSciMeow/DGLab_Coyote_CSharp_Library/wiki).
9+
### 本项目为学习交流之用, 请在使用时注意相关使用事项, 不要做出任何危险, 亦或伤害自己或他人的举动.
810

9-
### 基础使用方式
10-
```csharp
11-
static async Task Main(string[] args)
12-
{
13-
14-
Console.WriteLine("Scanning for Coyote devices...");
15-
List<CoyoteDeviceV3> devices = await CoyoteDeviceV3.Scan(); //通用的扫描方法
11+
![title](https://github.com/user-attachments/assets/62077c57-dc4c-4c7e-bc4a-bf8fa255d806)
1612

17-
if (devices.Count == 0)
18-
{
19-
Console.WriteLine("No Coyote devices found.");
20-
return;
21-
}
2213

23-
Console.WriteLine($"Found {devices.Count} Coyote device(s):");
24-
for (int i = 0; i < devices.Count; i++)
25-
{
26-
Console.WriteLine($"{i + 1}. {devices[i].Name}");
27-
}
2814

29-
var coyoteDevice = devices[0]; //选择一个对的
30-
31-
coyoteDevice.SetWaveBFAsync(new WaveformBF(200)).Wait(); //设置最大幅值 (BF命令)
32-
coyoteDevice.Start(); //启动郊狼输出
33-
34-
//coyoteDevice.NotificationReceived += (s, e) => //全局通知回调
35-
//{
36-
// Console.WriteLine($"Notification received: {BitConverter.ToString(e)}");
37-
//};
38-
39-
//coyoteDevice.B1MessageReceived += (s, e) => //B1通知回调
40-
//{
41-
// Console.WriteLine($"Number:{s}, intA/B [{e[0]}][{e[1]}]");
42-
//};
43-
44-
Console.WriteLine($"Connecting to {coyoteDevice.Name}...");
45-
Console.WriteLine($"Battery level: {coyoteDevice.BatteryLevel}%"); //读取电池电量
46-
47-
// Example: Set waveform
48-
WaveformV3 waveform = new(150, [100, 100, 100, 100], [60, 60, 60, 60]); //仅输出到A通道的波形
49-
WaveformV3 zeroform = new(); //零幅值波形
50-
51-
Console.WriteLine("Press A / B to change waveform or ESC to stop");
52-
53-
while (true)
54-
{
55-
switch (Console.ReadKey().Key)
56-
{
57-
case ConsoleKey.A:
58-
Console.WriteLine("set to wave");
59-
coyoteDevice.WaveNow = waveform;
60-
break;
61-
case ConsoleKey.B:
62-
Console.WriteLine("set to zero");
63-
coyoteDevice.WaveNow = zeroform;
64-
break;
65-
case ConsoleKey.Escape: return;
66-
}
67-
}
68-
}
69-
```

0 commit comments

Comments
 (0)