This commit is contained in:
henne 2025-08-09 14:39:29 +02:00
parent ae7a9a55bb
commit 35d7c39e3e
No known key found for this signature in database

View file

@ -124,8 +124,9 @@ func (r *Radar) SetPinTrigger(controlPin int, distance int, outputLevel int, dir
// SetBaseConfig configures the base configuration. height defines the mounted height in 1cm steps, angle defines the vertical angle in degrees, waveformConfig is used to differentiate 2 different radars
func (r *Radar) SetBaseConfig(height int, angle int, waveformConfig int) error {
data := startSequence
data = append(data, 0x01, byte(height), byte(angle), byte(waveformConfig), 0x00)
data = append(data, 0x01, byte(height), byte(angle), byte(waveformConfig), 0x00, 0x00)
data = append(data, endSequence...)
log.Printf("%v", data)
return r.write(data)
}