radar24g

package module
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Radar24G

type Radar24G struct {
	SerialPort       *serial.Port
	DataGroupMaxSize int
	DataGroup        []SensorData
	// contains filtered or unexported fields
}

func (*Radar24G) GetRawData

func (r *Radar24G) GetRawData() ([]byte, error)

GetRawData 获取串口雷达读数原始数据

func (*Radar24G) IsEmpty

func (r *Radar24G) IsEmpty() bool

IsEmpty 判断雷达数据存储组是否为空

func (*Radar24G) IsFull

func (r *Radar24G) IsFull() bool

IsFull 判断雷达数据存储组是否已满

func (*Radar24G) New

func (r *Radar24G) New(device string, MaxSize int) *Radar24G

New 初始化串口雷达对象

func (*Radar24G) OpenPort

func (r *Radar24G) OpenPort() error

OpenPort 启动串口

func (*Radar24G) Push

func (r *Radar24G) Push(val SensorData)

Push 向雷达对象中数据存储组添加雷达读数对象数据

func (*Radar24G) RawDataProcess

func (r *Radar24G) RawDataProcess(RawData []byte) (*SensorData, error)

RawDataProcess 将从串口获取的雷达原始数据反序列化到雷达读数对象

func (*Radar24G) Read added in v0.1.2

func (r *Radar24G) Read() (*SensorData, error)

func (*Radar24G) Size

func (r *Radar24G) Size() int

Size 获取当前雷达数据存储组大小

type SensorData

type SensorData struct {
	SensorStatus string
	Signal       int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL