Skip to content

Commit

Permalink
Fix for package refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
bemasher committed Sep 16, 2014
1 parent b650170 commit 659a8b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions idm.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ import (
"strings"

"github.com/bemasher/rtlamr/crc"
"github.com/bemasher/rtlamr/decode"
)

func NewIDMPacketConfig(symbolLength int) (cfg PacketConfig) {
func NewIDMPacketConfig(symbolLength int) (cfg decode.PacketConfig) {
cfg.DataRate = 32768

cfg.SymbolLength = symbolLength
Expand All @@ -40,7 +41,7 @@ func NewIDMPacketConfig(symbolLength int) (cfg PacketConfig) {
cfg.PreambleLength = cfg.PreambleSymbols * cfg.SymbolLength2
cfg.PacketLength = cfg.PacketSymbols * cfg.SymbolLength2

cfg.BlockSize = NextPowerOf2(cfg.PreambleLength)
cfg.BlockSize = decode.NextPowerOf2(cfg.PreambleLength)
cfg.BlockSize2 = cfg.BlockSize << 1

cfg.BufferLength = cfg.PacketLength + cfg.BlockSize
Expand Down
5 changes: 3 additions & 2 deletions scm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import (
"strconv"

"github.com/bemasher/rtlamr/crc"
"github.com/bemasher/rtlamr/decode"
)

func NewSCMPacketConfig(symbolLength int) (cfg PacketConfig) {
func NewSCMPacketConfig(symbolLength int) (cfg decode.PacketConfig) {
cfg.DataRate = 32768

cfg.SymbolLength = symbolLength
Expand All @@ -38,7 +39,7 @@ func NewSCMPacketConfig(symbolLength int) (cfg PacketConfig) {
cfg.PreambleLength = cfg.PreambleSymbols * cfg.SymbolLength2
cfg.PacketLength = cfg.PacketSymbols * cfg.SymbolLength2

cfg.BlockSize = NextPowerOf2(cfg.PreambleLength)
cfg.BlockSize = decode.NextPowerOf2(cfg.PreambleLength)
cfg.BlockSize2 = cfg.BlockSize << 1

cfg.BufferLength = cfg.PacketLength + cfg.BlockSize
Expand Down

0 comments on commit 659a8b3

Please sign in to comment.