mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-20 02:11:28 +10:00
add LR 2021 to portduino, and allow Framebuffer devices to rotate the screen from config (#11252)
* add LR 2021 to portduino, and allow Framebuffer devices to rotate the screen from config. Requires https://github.com/meshtastic/device-ui/pull/355 and supersedes https://github.com/meshtastic/firmware/pull/10567 and https://github.com/meshtastic/firmware/pull/11138 Many thanks to the original authors https://github.com/a-li3n and https://github.com/jessm33 * Build LR2021Interface.cpp in the wasm env initLoRa() constructs LR2021Interface for Lora.Module: lr2021, so excluding the file from the native-wasm source filter left the constructor undefined at link time. LR20x0Interface.cpp stays excluded; it is template-only and comes in via the InterfacesTemplates.cpp amalgamation. Also replace the non-UTF-8 degree signs in the framebuffer rotation comment and correct the rfswitch alias cleanup comment. * Trim comments * Report setenv failure for the framebuffer rotation
This commit is contained in:
@@ -27,7 +27,7 @@ template class LR11x0Interface<LR1110>;
|
||||
template class LR11x0Interface<LR1120>;
|
||||
template class LR11x0Interface<LR1121>;
|
||||
#endif
|
||||
#if defined(USE_LR2021) && RADIOLIB_EXCLUDE_LR2021 != 1
|
||||
#if (defined(USE_LR2021) || defined(ARCH_PORTDUINO)) && RADIOLIB_EXCLUDE_LR2021 != 1
|
||||
template class LR20x0Interface<LR2021>;
|
||||
#endif
|
||||
#ifdef ARCH_STM32WL
|
||||
|
||||
@@ -379,4 +379,8 @@ template <typename T> int16_t LR11x0Interface<T>::getCurrentRSSI()
|
||||
#endif
|
||||
return (int16_t)round(rssi);
|
||||
}
|
||||
|
||||
// Don't leak the aliases into the files InterfacesTemplates.cpp includes after this one.
|
||||
#undef rfswitch_dio_pins
|
||||
#undef rfswitch_table
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "configuration.h"
|
||||
|
||||
#if defined(USE_LR2021) && RADIOLIB_EXCLUDE_LR2021 != 1
|
||||
#if (defined(USE_LR2021) || defined(ARCH_PORTDUINO)) && RADIOLIB_EXCLUDE_LR2021 != 1
|
||||
|
||||
#include "LR2021Interface.h"
|
||||
#include "error.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "configuration.h"
|
||||
|
||||
#if defined(USE_LR2021) && RADIOLIB_EXCLUDE_LR2021 != 1
|
||||
#if (defined(USE_LR2021) || defined(ARCH_PORTDUINO)) && RADIOLIB_EXCLUDE_LR2021 != 1
|
||||
#include "LR20x0Interface.h"
|
||||
#include "error.h"
|
||||
#include "mesh/NodeDB.h"
|
||||
@@ -381,4 +381,9 @@ template <typename T> int16_t LR20x0Interface<T>::getCurrentRSSI()
|
||||
float rssi = lora.getRSSI(false, true);
|
||||
return (int16_t)round(rssi);
|
||||
}
|
||||
|
||||
// Don't leak the aliases into the files InterfacesTemplates.cpp includes after this one.
|
||||
#undef lr20x0_rfswitch_dio_pins
|
||||
#undef lr20x0_rfswitch_table
|
||||
#undef LR20x0
|
||||
#endif
|
||||
|
||||
@@ -401,6 +401,8 @@ std::unique_ptr<RadioInterface> initLoRa()
|
||||
return std::unique_ptr<RadioInterface>(new LR1121Interface(hal, cs, irq, rst, busy));
|
||||
case use_llcc68:
|
||||
return std::unique_ptr<RadioInterface>(new LLCC68Interface(hal, cs, irq, rst, busy));
|
||||
case use_lr2021:
|
||||
return std::unique_ptr<RadioInterface>(new LR2021Interface(hal, cs, irq, rst, busy));
|
||||
case use_simradio:
|
||||
return std::unique_ptr<RadioInterface>(new SimRadio);
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user