File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ func (c *ChannelAU) CodingRate() uint8 { return c.codingRate }
2424func (c * ChannelAU ) PreambleLength () uint16 { return c .preambleLength }
2525func (c * ChannelAU ) TxPowerDBm () int8 { return c .txPowerDBm }
2626
27+ // Set functions
28+ func (c * ChannelAU ) SetFrequency (v uint32 ) { c .frequency = v }
29+ func (c * ChannelAU ) SetBandwidth (v uint8 ) { c .bandwidth = v }
30+ func (c * ChannelAU ) SetSpreadingFactor (v uint8 ) { c .spreadingFactor = v }
31+ func (c * ChannelAU ) SetCodingRate (v uint8 ) { c .codingRate = v }
32+ func (c * ChannelAU ) SetPreambleLength (v uint16 ) { c .preambleLength = v }
33+ func (c * ChannelAU ) SetTxPowerDBm (v int8 ) { c .txPowerDBm = v }
34+
2735func (c * ChannelAU ) Next () bool {
2836 return false
2937}
Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ func (c *ChannelEU) CodingRate() uint8 { return c.codingRate }
2424func (c * ChannelEU ) PreambleLength () uint16 { return c .preambleLength }
2525func (c * ChannelEU ) TxPowerDBm () int8 { return c .txPowerDBm }
2626
27+ // Set functions
28+ func (c * ChannelEU ) SetFrequency (v uint32 ) { c .frequency = v }
29+ func (c * ChannelEU ) SetBandwidth (v uint8 ) { c .bandwidth = v }
30+ func (c * ChannelEU ) SetSpreadingFactor (v uint8 ) { c .spreadingFactor = v }
31+ func (c * ChannelEU ) SetCodingRate (v uint8 ) { c .codingRate = v }
32+ func (c * ChannelEU ) SetPreambleLength (v uint16 ) { c .preambleLength = v }
33+ func (c * ChannelEU ) SetTxPowerDBm (v int8 ) { c .txPowerDBm = v }
34+
2735func (c * ChannelEU ) Next () bool {
2836 return false
2937}
Original file line number Diff line number Diff line change @@ -26,6 +26,15 @@ func (c *ChannelUS) CodingRate() uint8 { return c.codingRate }
2626func (c * ChannelUS ) PreambleLength () uint16 { return c .preambleLength }
2727func (c * ChannelUS ) TxPowerDBm () int8 { return c .txPowerDBm }
2828
29+ // Set functions
30+ // TODO: validate input
31+ func (c * ChannelUS ) SetFrequency (v uint32 ) { c .frequency = v }
32+ func (c * ChannelUS ) SetBandwidth (v uint8 ) { c .bandwidth = v }
33+ func (c * ChannelUS ) SetSpreadingFactor (v uint8 ) { c .spreadingFactor = v }
34+ func (c * ChannelUS ) SetCodingRate (v uint8 ) { c .codingRate = v }
35+ func (c * ChannelUS ) SetPreambleLength (v uint16 ) { c .preambleLength = v }
36+ func (c * ChannelUS ) SetTxPowerDBm (v int8 ) { c .txPowerDBm = v }
37+
2938func (c * ChannelUS ) Next () bool {
3039 switch c .Bandwidth () {
3140 case lora .Bandwidth_125_0 :
You can’t perform that action at this time.
0 commit comments