LD2451

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SerialPort       string
	BaudRate         int
	TargetBufferSize int //Size of the channel buffer to store targets in
}

type Direction added in v1.2.0

type Direction int
const (
	DirectionAway   Direction = 0
	DirectionToward Direction = 1
)

func (Direction) String added in v1.2.0

func (d Direction) String() string

type LD2451

type LD2451 struct {
	// contains filtered or unexported fields
}

func Open

func Open(config Config) (*LD2451, error)

func (*LD2451) Close

func (ld2451 *LD2451) Close()

func (*LD2451) ReadTarget

func (ld2451 *LD2451) ReadTarget() (Target, error)

type Target

type Target struct {
	Alarm     bool      // Alarm state
	Angle     int       // Angle of the target relative to the perpendicular direction of the antenna
	Distance  int       // Distance in meters to the target
	Direction Direction // Direction of movement relative to the antenna
	Speed     int       // Speed in KM/H
	SNR       int       // Signal to Noise Ratio
}

Jump to

Keyboard shortcuts

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