27 lines
603 B
C#
27 lines
603 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.IO.Ports;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
|
|
public class AudioSensor : Sensor
|
|
{
|
|
public override void ReceiveData(string datas, SerialPort sp = null)
|
|
{
|
|
base.ReceiveData(datas, sp);
|
|
//this.Log(datas);
|
|
if (datas.Contains("hello"))
|
|
{
|
|
ChatUI.Instance.xunFeiWakeup.callBack?.Invoke();
|
|
}
|
|
//if (datas.ToString().TrimEnd('\n', '\r') == "hello")
|
|
//{
|
|
//}
|
|
}
|
|
|
|
public override void Display(string datas)
|
|
{
|
|
base.Display(datas);
|
|
}
|
|
}
|