@@ -117,41 +117,56 @@ void Channels::initDefaultChannel(ChannelIndex chIndex)
117117 static const uint8_t defaultpsk0[] = USERPREFS_CHANNEL_0_PSK;
118118 memcpy (channelSettings.psk .bytes , defaultpsk0, sizeof (defaultpsk0));
119119 channelSettings.psk .size = sizeof (defaultpsk0);
120-
121120#endif
122121#ifdef USERPREFS_CHANNEL_0_NAME
123122 strcpy (channelSettings.name , USERPREFS_CHANNEL_0_NAME);
124123#endif
125124#ifdef USERPREFS_CHANNEL_0_PRECISION
126125 channelSettings.module_settings .position_precision = USERPREFS_CHANNEL_0_PRECISION;
126+ #endif
127+ #ifdef USERPREFS_CHANNEL_0_UPLINK_ENABLED
128+ channelSettings.uplink_enabled = USERPREFS_CHANNEL_0_UPLINK_ENABLED;
129+ #endif
130+ #ifdef USERPREFS_CHANNEL_0_DOWNLINK_ENABLED
131+ channelSettings.downlink_enabled = USERPREFS_CHANNEL_0_DOWNLINK_ENABLED;
127132#endif
128133 break ;
129134 case 1 :
130135#ifdef USERPREFS_CHANNEL_1_PSK
131136 static const uint8_t defaultpsk1[] = USERPREFS_CHANNEL_1_PSK;
132137 memcpy (channelSettings.psk .bytes , defaultpsk1, sizeof (defaultpsk1));
133138 channelSettings.psk .size = sizeof (defaultpsk1);
134-
135139#endif
136140#ifdef USERPREFS_CHANNEL_1_NAME
137141 strcpy (channelSettings.name , USERPREFS_CHANNEL_1_NAME);
138142#endif
139143#ifdef USERPREFS_CHANNEL_1_PRECISION
140144 channelSettings.module_settings .position_precision = USERPREFS_CHANNEL_1_PRECISION;
145+ #endif
146+ #ifdef USERPREFS_CHANNEL_1_UPLINK_ENABLED
147+ channelSettings.uplink_enabled = USERPREFS_CHANNEL_1_UPLINK_ENABLED;
148+ #endif
149+ #ifdef USERPREFS_CHANNEL_1_DOWNLINK_ENABLED
150+ channelSettings.downlink_enabled = USERPREFS_CHANNEL_1_DOWNLINK_ENABLED;
141151#endif
142152 break ;
143153 case 2 :
144154#ifdef USERPREFS_CHANNEL_2_PSK
145155 static const uint8_t defaultpsk2[] = USERPREFS_CHANNEL_2_PSK;
146156 memcpy (channelSettings.psk .bytes , defaultpsk2, sizeof (defaultpsk2));
147157 channelSettings.psk .size = sizeof (defaultpsk2);
148-
149158#endif
150159#ifdef USERPREFS_CHANNEL_2_NAME
151160 strcpy (channelSettings.name , USERPREFS_CHANNEL_2_NAME);
152161#endif
153162#ifdef USERPREFS_CHANNEL_2_PRECISION
154163 channelSettings.module_settings .position_precision = USERPREFS_CHANNEL_2_PRECISION;
164+ #endif
165+ #ifdef USERPREFS_CHANNEL_2_UPLINK_ENABLED
166+ channelSettings.uplink_enabled = USERPREFS_CHANNEL_2_UPLINK_ENABLED;
167+ #endif
168+ #ifdef USERPREFS_CHANNEL_2_DOWNLINK_ENABLED
169+ channelSettings.downlink_enabled = USERPREFS_CHANNEL_2_DOWNLINK_ENABLED;
155170#endif
156171 break ;
157172 default :
0 commit comments