Skip to content

Commit

Permalink
reserve one RF band region Id for a future use
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Feb 27, 2025
1 parent e66383c commit 6ac7bf6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 17 deletions.
3 changes: 2 additions & 1 deletion software/firmware/source/SoftRF/src/driver/OLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ const char *ISO3166_CC[] = {
[RF_BAND_UK] = "UK",
[RF_BAND_IN] = "IN",
[RF_BAND_IL] = "IL",
[RF_BAND_KR] = "KR"
[RF_BAND_KR] = "KR",
[RF_BAND_RSVD] = "R "
};

const char SoftRF_text1[] = "SoftRF";
Expand Down
4 changes: 2 additions & 2 deletions software/firmware/source/SoftRF/src/platform/ESP32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ static void ESP32_setup()
lmic_pins.rst = SOC_GPIO_PIN_C3_RST;
lmic_pins.busy = SOC_GPIO_PIN_C3_TXE;
#if defined(USE_RADIOLIB) || defined(USE_RADIOHEAD)
lmic_pins.dio[0] = SOC_GPIO_PIN_C3_CE; /* Ebyte E80 */
lmic_pins.dio[0] = SOC_GPIO_PIN_C3_CE;
#endif /* USE_RADIOLIB || USE_RADIOHEAD */

#endif /* CONFIG_IDF_TARGET_ESP32C3 */
Expand All @@ -1447,7 +1447,7 @@ static void ESP32_setup()
lmic_pins.rst = SOC_GPIO_PIN_C6_RST;
lmic_pins.busy = SOC_GPIO_PIN_C6_TXE;
#if defined(USE_RADIOLIB) || defined(USE_RADIOHEAD)
lmic_pins.dio[0] = SOC_GPIO_PIN_C6_CE; /* Ebyte E80 */
lmic_pins.dio[0] = SOC_GPIO_PIN_C6_CE;
#endif /* USE_RADIOLIB || USE_RADIOHEAD */

} else if (esp32_board == ESP32_LILYGO_T3C6) {
Expand Down
24 changes: 13 additions & 11 deletions software/firmware/source/SoftRF/src/ui/Web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Copyright (C) 2015-2025     Linar Yusupov\

void handleSettings() {

size_t size = 5470;
size_t size = 5520;
char *offset;
size_t len = 0;
char *Settings_temp = (char *) malloc(size);
Expand Down Expand Up @@ -302,6 +302,7 @@ void handleSettings() {
<option %s value='%d'>IN (866 MHz)</option>\
<option %s value='%d'>KR (920.9 MHz)</option>\
<option %s value='%d'>IL (916.2 MHz)</option>\
<!--<option %s value='%d'>Reserved</option>-->\
</select>\
</td>\
</tr>\
Expand Down Expand Up @@ -362,16 +363,17 @@ void handleSettings() {
</td>\
</tr>"),
(settings->band == RF_BAND_AUTO ? "selected" : ""), RF_BAND_AUTO,
(settings->band == RF_BAND_EU ? "selected" : ""), RF_BAND_EU,
(settings->band == RF_BAND_RU ? "selected" : ""), RF_BAND_RU,
(settings->band == RF_BAND_CN ? "selected" : ""), RF_BAND_CN,
(settings->band == RF_BAND_US ? "selected" : ""), RF_BAND_US,
(settings->band == RF_BAND_NZ ? "selected" : ""), RF_BAND_NZ,
(settings->band == RF_BAND_UK ? "selected" : ""), RF_BAND_UK,
(settings->band == RF_BAND_AU ? "selected" : ""), RF_BAND_AU,
(settings->band == RF_BAND_IN ? "selected" : ""), RF_BAND_IN,
(settings->band == RF_BAND_KR ? "selected" : ""), RF_BAND_KR,
(settings->band == RF_BAND_IL ? "selected" : ""), RF_BAND_IL,
(settings->band == RF_BAND_EU ? "selected" : ""), RF_BAND_EU,
(settings->band == RF_BAND_RU ? "selected" : ""), RF_BAND_RU,
(settings->band == RF_BAND_CN ? "selected" : ""), RF_BAND_CN,
(settings->band == RF_BAND_US ? "selected" : ""), RF_BAND_US,
(settings->band == RF_BAND_NZ ? "selected" : ""), RF_BAND_NZ,
(settings->band == RF_BAND_UK ? "selected" : ""), RF_BAND_UK,
(settings->band == RF_BAND_AU ? "selected" : ""), RF_BAND_AU,
(settings->band == RF_BAND_IN ? "selected" : ""), RF_BAND_IN,
(settings->band == RF_BAND_KR ? "selected" : ""), RF_BAND_KR,
(settings->band == RF_BAND_IL ? "selected" : ""), RF_BAND_IL,
(settings->band == RF_BAND_RSVD ? "selected" : ""), RF_BAND_RSVD,
(settings->aircraft_type == AIRCRAFT_TYPE_GLIDER ? "selected" : ""), AIRCRAFT_TYPE_GLIDER,
(settings->aircraft_type == AIRCRAFT_TYPE_TOWPLANE ? "selected" : ""), AIRCRAFT_TYPE_TOWPLANE,
(settings->aircraft_type == AIRCRAFT_TYPE_POWERED ? "selected" : ""), AIRCRAFT_TYPE_POWERED,
Expand Down
14 changes: 11 additions & 3 deletions software/firmware/source/libraries/OGN/freqplan.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ enum
RF_BAND_UK = 7, /* 869.52 MHz band. Deprecated - treated as EU */
RF_BAND_IN = 8, /* 866.0 MHz band */
RF_BAND_IL = 9, /* 916.2 MHz band */
RF_BAND_KR = 10 /* 920.9 MHz band */
RF_BAND_KR = 10, /* 920.9 MHz band */
RF_BAND_RSVD = 11, /* reserved */
RF_BAND_COUNT
};

class FreqPlan
Expand Down Expand Up @@ -76,6 +78,11 @@ class FreqPlan
Bandwidth = RF_RX_BANDWIDTH_SS_62KHZ; // BW125
MaxTxPower = 15;
break;
case RF_BAND_RSVD:
BaseFreq = 2450000;
Bandwidth = RF_RX_BANDWIDTH_SS_250KHZ; // BW500
MaxTxPower = 13;
break;
case RF_BAND_EU:
case RF_BAND_RU:
case RF_BAND_NZ: /* ? */
Expand Down Expand Up @@ -175,8 +182,9 @@ class FreqPlan
static const char *getPlanName(uint8_t Plan)
{ static const char *Name[11] = { "Default", "Europe/Africa",
"USA/Canada", "Australia/South America", "New Zealand",
"Russia", "China", "PilotAware (UK)", "India", "Israel", "South Korea" } ;
if(Plan>RF_BAND_KR) return 0;
"Russia", "China", "PilotAware (UK)", "India", "Israel",
"South Korea", "Reserved" } ;
if(Plan >= RF_BAND_COUNT) return 0;
return Name[Plan]; }

uint8_t getChannel (uint32_t Time, uint8_t Slot=0, uint8_t OGN=1) const // OGN-tracker or FLARM, UTC time, slot: 0 or 1
Expand Down

0 comments on commit 6ac7bf6

Please sign in to comment.