Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #778 from TheThingsNetwork/quickfix/rx1delay
Browse files Browse the repository at this point in the history
Fix Rx1Delay value in exported devices
  • Loading branch information
Aggelos Kolaitis authored May 11, 2020
2 parents 17c6e44 + 3273e51 commit 0ac8b88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ttnctl/cmd/devices_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func exportV3Device(dev *handler.Device, flags *pflag.FlagSet) *v3Device {
v3Dev.PHYVersion = "PHY_V1_0_2_REV_B"

v3Dev.SupportsJoin = lorawanDevice.AppKey.String() != ""
v3Dev.MACSettings.Rx1Delay = "RX_DELAY_1"
v3Dev.MACSettings.Rx1Delay.Value = "RX_DELAY_1"

frequencyPlanFlag, _ := flags.GetString("frequency-plan-id")
frequencyPlan, err := getOption(frequencyPlans, frequencyPlanFlag)
Expand Down
12 changes: 8 additions & 4 deletions ttnctl/cmd/v3types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ type v3DeviceSession struct {
LastNFCntDown uint32 `json:"last_n_f_cnt_down"`
}

type v3RxDelay struct {
Value string `json:"value,omitempty"`
}

type v3DeviceMACSettings struct {
Rx1Delay string `json:"value,omitempty"`
Supports32BitFCnt bool `json:"supports_32_bit_f_cnt"`
ResetsFCnt bool `json:"resets_f_cnt"`
FactoryPresetFrequencies []uint64 `json:"factory_preset_frequencies,omitempty"`
Rx1Delay v3RxDelay `json:"rx1_delay,omitempty"`
Supports32BitFCnt bool `json:"supports_32_bit_f_cnt"`
ResetsFCnt bool `json:"resets_f_cnt"`
FactoryPresetFrequencies []uint64 `json:"factory_preset_frequencies,omitempty"`
}

type v3Device struct {
Expand Down

0 comments on commit 0ac8b88

Please sign in to comment.