Add Power Restraint for 1280 PA Model

Add Debug Print for all module parameters
Add RX/TX Switch to 1280
This commit is contained in:
Thomas Göttgens
2023-03-24 16:57:30 +01:00
parent 9d6e1ce8e5
commit 2c259b8464
3 changed files with 10 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ SX128xInterface<T>::SX128xInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq,
SPIClass &spi)
: RadioLibInterface(cs, irq, rst, busy, spi, &lora), lora(&module)
{
LOG_WARN("SX128xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy);
}
/// Initialise the Driver transport hardware and software.
@@ -73,6 +74,13 @@ template <typename T> bool SX128xInterface<T>::init()
LOG_INFO("Bandwidth set to %f\n", bw);
LOG_INFO("Power output set to %d\n", power);
#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC) && defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC)
// lora.begin sets Dio2 as RF switch control, which is not true if we are manually controlling RX and TX
if (res == RADIOLIB_ERR_NONE) {
lora.setRfSwitchPins(SX128X_RXEN, SX128X_TXEN);
}
#endif
if (res == RADIOLIB_ERR_NONE)
res = lora.setCRC(2);