@@ -752,33 +752,31 @@ void TheThingsNetwork::configureKR920_923()
752
752
void TheThingsNetwork::configureIN865_867 ()
753
753
{
754
754
sendMacSet (MAC_ADR, " off" ); // TODO: remove when ADR is implemented for this plan
755
- sendMacSet (MAC_RX2, " 2 866550000" ); // SF10
755
+ sendMacSet (MAC_RX2, " 2 866550000" ); // SF10
756
756
757
757
// Disable the three default LoRaWAN channels
758
758
sendChSet (MAC_CHANNEL_STATUS, 0 , " off" );
759
759
sendChSet (MAC_CHANNEL_STATUS, 1 , " off" );
760
760
sendChSet (MAC_CHANNEL_STATUS, 2 , " off" );
761
761
762
- char buf[10 ];
763
- uint32_t freq = 865062500 ;
764
- uint8_t ch;
765
- for (ch = 3 ; ch < 7 ; ch++)
766
- {
767
- sendChSet (MAC_CHANNEL_DCYCLE, ch, " 799" );
768
- sprintf (buf, " %lu" , freq);
769
- sendChSet (MAC_CHANNEL_FREQ, ch, buf);
770
- sendChSet (MAC_CHANNEL_DRRANGE, ch, " 0 5" );
771
- sendChSet (MAC_CHANNEL_STATUS, ch, " on" );
772
- switch (ch)
773
- {
774
- case 4 :
775
- freq = 865402500 ;
776
- break ;
777
- case 5 :
778
- freq = 865985000 ;
779
- break ;
780
- }
781
- }
762
+ // Channel 3
763
+ sendChSet (MAC_CHANNEL_DCYCLE, 3 , " 299" );
764
+ sendChSet (MAC_CHANNEL_FREQ, 3 , " 865062500" );
765
+ sendChSet (MAC_CHANNEL_DRRANGE, 3 , " 0 5" );
766
+ sendChSet (MAC_CHANNEL_STATUS, 3 , " on" );
767
+
768
+ // Channel 4
769
+ sendChSet (MAC_CHANNEL_DCYCLE, 4 , " 299" );
770
+ sendChSet (MAC_CHANNEL_FREQ, 4 , " 865402500" );
771
+ sendChSet (MAC_CHANNEL_DRRANGE, 4 , " 0 5" );
772
+ sendChSet (MAC_CHANNEL_STATUS, 4 , " on" );
773
+
774
+ // Channel 5
775
+ sendChSet (MAC_CHANNEL_DCYCLE, 5 , " 299" );
776
+ sendChSet (MAC_CHANNEL_FREQ, 5 , " 865985000" );
777
+ sendChSet (MAC_CHANNEL_DRRANGE, 5 , " 0 5" );
778
+ sendChSet (MAC_CHANNEL_STATUS, 5 , " on" );
779
+
782
780
sendMacSet (MAC_PWRIDX, TTN_PWRIDX_IN865_867);
783
781
}
784
782
0 commit comments