mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-23 20:22:26 +00:00
Cleanup femon and femoff for Heltec boards
This commit is contained in:
1 parent
445ae057e0
commit
d6a75ff44e
7 files changed
+15
-16
No files matched your search
@@ -916,7 +916,15 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe
|
||||
_prefs.tx_power_dbm = LORA_TX_POWER;
|
||||
_prefs.gps_enabled = 0; // GPS disabled by default
|
||||
_prefs.gps_interval = 0; // No automatic GPS updates by default
|
||||
|
||||
#if defined(RADIO_FEM_RXGAIN) && (RADIO_FEM_RXGAIN == 0)
|
||||
_prefs.radio_fem_rxgain = 0;
|
||||
#elif defined(RADIO_FEM_RXGAIN) && (RADIO_FEM_RXGAIN == 1)
|
||||
_prefs.radio_fem_rxgain = 1;
|
||||
#else
|
||||
_prefs.radio_fem_rxgain = 0; // PowerSaving and better signal
|
||||
#endif
|
||||
|
||||
_prefs.radio_fem_txgain = 0;
|
||||
//_prefs.rx_delay_base = 10.0f; enable once new algo fixed
|
||||
_prefs.setRepeatEn(false);
|
||||
|
||||
@@ -123,10 +123,6 @@ const char* T096Board::getManufacturerName() const {
|
||||
}
|
||||
|
||||
bool T096Board::setLoRaFemLnaEnabled(bool enable) {
|
||||
#if defined(RADIO_FEM_RXGAIN) && (RADIO_FEM_RXGAIN == 0)
|
||||
enable = false;
|
||||
#endif
|
||||
|
||||
if (!loRaFEMControl.isLnaCanControl()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -137,6 +137,7 @@ build_flags =
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
; -D POWERSAVING_DEBUG=1
|
||||
-D RADIO_FEM_RXGAIN=1 ; undefined (default), 1=on, 0=off
|
||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||
+<../examples/companion_radio/*.cpp>
|
||||
@@ -149,7 +150,7 @@ lib_deps =
|
||||
extends = env:Heltec_t096_companion_radio_ble_femon
|
||||
build_flags =
|
||||
${env:Heltec_t096_companion_radio_ble_femon.build_flags}
|
||||
-D RADIO_FEM_RXGAIN=0 ; undefined (default on), 1=on, 0=off
|
||||
-D RADIO_FEM_RXGAIN=0 ; undefined (default), 1=on, 0=off
|
||||
|
||||
[env:Heltec_t096_companion_radio_usb]
|
||||
extends = Heltec_t096
|
||||
|
||||
@@ -63,12 +63,6 @@ void HeltecTrackerV2Board::begin() {
|
||||
}
|
||||
|
||||
bool HeltecTrackerV2Board::setLoRaFemLnaEnabled(bool enable) {
|
||||
#if defined(RADIO_FEM_RXGAIN) && (RADIO_FEM_RXGAIN == 0)
|
||||
enable = false;
|
||||
#elif defined(RADIO_FEM_RXGAIN) && (RADIO_FEM_RXGAIN == 1)
|
||||
enable = true;
|
||||
#endif
|
||||
|
||||
if (!loRaFEMControl.isLnaCanControl()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -143,6 +143,7 @@ build_flags =
|
||||
-D ENABLE_USB_INTERFACE
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||
-D RADIO_FEM_RXGAIN=1 ; undefined (default), 1=on, 0=off
|
||||
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
||||
+<helpers/ui/ST7735Display.cpp>
|
||||
+<helpers/ui/MomentaryButton.cpp>
|
||||
@@ -179,6 +180,7 @@ build_flags =
|
||||
; -D BLE_DEBUG_LOGGING=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D RADIO_FEM_RXGAIN=1 ; undefined (default), 1=on, 0=off
|
||||
build_src_filter = ${Heltec_tracker_v2.build_src_filter}
|
||||
+<helpers/ui/ST7735Display.cpp>
|
||||
+<helpers/ui/MomentaryButton.cpp>
|
||||
|
||||
@@ -64,10 +64,6 @@ void HeltecV4Board::begin() {
|
||||
}
|
||||
|
||||
bool HeltecV4Board::setLoRaFemLnaEnabled(bool enable) {
|
||||
#if defined(RADIO_FEM_RXGAIN) && (RADIO_FEM_RXGAIN == 0)
|
||||
enable = false;
|
||||
#endif
|
||||
|
||||
if (!loRaFEMControl.isLnaCanControl()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -191,6 +191,7 @@ build_flags =
|
||||
-D ENABLE_USB_INTERFACE
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||
-D RADIO_FEM_RXGAIN=1 ; undefined (default), 1=on, 0=off
|
||||
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<helpers/ui/MomentaryButton.cpp>
|
||||
@@ -220,6 +221,7 @@ build_flags =
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D RADIO_FEM_RXGAIN=1 ; undefined (default), 1=on, 0=off
|
||||
build_src_filter = ${heltec_v4_oled.build_src_filter}
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<helpers/ui/MomentaryButton.cpp>
|
||||
@@ -230,7 +232,7 @@ lib_deps =
|
||||
${heltec_v4_oled.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
|
||||
[env:heltec_v4_3_companion_radio_ble_femoff]
|
||||
[env:heltec_v4_companion_radio_ble_femoff]
|
||||
extends = env:heltec_v4_companion_radio_ble_femon
|
||||
build_flags =
|
||||
${env:heltec_v4_companion_radio_ble_femon.build_flags}
|
||||
|
||||
Reference in new issue
Block a user