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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址