diff --git a/ROM.h b/ROM.h index 7a343c0..34fde86 100644 --- a/ROM.h +++ b/ROM.h @@ -27,9 +27,11 @@ #define PRODUCT_H32_V2 0xC0 #define PRODUCT_H32_V3 0xC1 #define PRODUCT_RAK4631 0x10 + #define PRODUCT_FREENODE 0x20 #define MODEL_11 0x11 #define MODEL_12 0x12 - #define MODEL_A1 0xA1 + #define MODEL_21 0x21 // European band, 868MHz + #define MODEL_A1 0xA1 #define MODEL_A6 0xA6 #define MODEL_A4 0xA4 #define MODEL_A9 0xA9 diff --git a/Utilities.h b/Utilities.h index bd55d4a..bc8f1eb 100644 --- a/Utilities.h +++ b/Utilities.h @@ -980,6 +980,14 @@ void setTXPower(RadioInterface* radio, int txp) { } } + if (model == MODEL_21) { + if (interfaces[radio->getIndex()] == SX128X) { + radio->setTxPower(txp, PA_OUTPUT_PA_BOOST_PIN); + } else { + radio->setTxPower(txp, PA_OUTPUT_RFO_PIN); + } + } + if (model == MODEL_A1) radio->setTxPower(txp, PA_OUTPUT_PA_BOOST_PIN); if (model == MODEL_A2) radio->setTxPower(txp, PA_OUTPUT_PA_BOOST_PIN); if (model == MODEL_A3) radio->setTxPower(txp, PA_OUTPUT_RFO_PIN); @@ -1310,7 +1318,7 @@ bool eeprom_product_valid() { #if PLATFORM == PLATFORM_ESP32 if (rval == PRODUCT_RNODE || rval == BOARD_RNODE_NG_20 || rval == BOARD_RNODE_NG_21 || rval == PRODUCT_HMBRW || rval == PRODUCT_TBEAM || rval == PRODUCT_T32_10 || rval == PRODUCT_T32_20 || rval == PRODUCT_T32_21 || rval == PRODUCT_H32_V2 || rval == PRODUCT_H32_V3) { #elif PLATFORM == PLATFORM_NRF52 - if (rval == PRODUCT_RAK4631 || rval == PRODUCT_HMBRW) { + if (rval == PRODUCT_RAK4631 || rval == PRODUCT_HMBRW || rval == PRODUCT_FREENODE) { #else if (false) { #endif @@ -1350,6 +1358,8 @@ bool eeprom_model_valid() { if (model == MODEL_C5 || model == MODEL_CA) { #elif BOARD_MODEL == BOARD_RAK4631 if (model == MODEL_11 || model == MODEL_12) { + #elif BOARD_MODEL == BOARD_FREENODE + if (model == MODEL_21) { #elif BOARD_MODEL == BOARD_HUZZAH32 if (model == MODEL_FF) { #elif BOARD_MODEL == BOARD_GENERIC_ESP32