mirror of
https://github.com/nonoo/kappanhang.git
synced 2025-12-05 23:52:01 +01:00
Use own TX seqbuf entry struct
This commit is contained in:
parent
0eab91d9bf
commit
44f5b15994
10
txseqbuf.go
10
txseqbuf.go
|
|
@ -7,12 +7,18 @@ import "time"
|
|||
// won't work (small radio memory?)
|
||||
const txSeqBufLength = 300 * time.Millisecond
|
||||
|
||||
type txSeqBufEntry struct {
|
||||
seq seqNum
|
||||
data []byte
|
||||
addedAt time.Time
|
||||
}
|
||||
|
||||
type txSeqBufStruct struct {
|
||||
entries []seqBufEntry
|
||||
entries []txSeqBufEntry
|
||||
}
|
||||
|
||||
func (s *txSeqBufStruct) add(seq seqNum, p []byte) {
|
||||
s.entries = append(s.entries, seqBufEntry{
|
||||
s.entries = append(s.entries, txSeqBufEntry{
|
||||
seq: seq,
|
||||
data: p,
|
||||
addedAt: time.Now(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue