Skip to content

Commit

Permalink
Store decoder packet config in r900 parser. Fixes #102
Browse files Browse the repository at this point in the history
  • Loading branch information
bemasher committed Sep 20, 2018
1 parent 6dcad79 commit cec57c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions r900/r900.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func (p Parser) quantize() {
// Given a list of indices the preamble exists at, decode and parse a message.
func (p *Parser) Parse(pkts []protocol.Data, msgCh chan protocol.Message, wg *sync.WaitGroup) {
p.once.Do(func() {
p.cfg = p.Decoder.Cfg
p.signal = make([]float64, p.Decoder.Cfg.BufferLength)
p.csum = make([]float64, p.Decoder.Cfg.BufferLength+1)
p.filtered = make([][3]float64, p.Decoder.Cfg.BufferLength)
Expand Down

0 comments on commit cec57c9

Please sign in to comment.