Added Radio.ID and refactored the Stats interface
Some checks failed
Run tests / test (1.25) (push) Failing after 1m0s
Run tests / test (stable) (push) Failing after 1m0s

This commit is contained in:
2026-03-17 08:33:06 +01:00
parent 8ec85821e4
commit 27e2da1943
15 changed files with 2045 additions and 22 deletions

View File

@@ -32,8 +32,8 @@ func NewCompanion(conn io.ReadWriteCloser) (*Node, error) {
}, nil
}
func NewRepeater(conn io.ReadWriteCloser, hasSNR bool) (*Node, error) {
driver := newRepeaterDriver(conn, hasSNR)
func NewRepeater(conn io.ReadWriteCloser) (*Node, error) {
driver := newRepeaterDriver(conn)
if err := driver.Setup(); err != nil {
return nil, err
@@ -60,7 +60,7 @@ func (dev *Node) Info() *radio.Info {
return dev.driver.Info()
}
func (dev *Node) Stats() map[string]any {
func (dev *Node) Stats() <-chan map[string]any {
return dev.driver.Stats()
}
@@ -78,7 +78,7 @@ type nodeDriver interface {
Setup() error
Packets() <-chan *Packet
Stats() map[string]any
Stats() <-chan map[string]any
}
type nodeTracer interface {