Skip to content

Commit

Permalink
Updates for esp32s2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
titan098 committed Apr 21, 2024
1 parent ac87c00 commit 2c902aa
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions arch/esp32/esp32s2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
extends = esp32_base

build_src_filter =
${esp32_base.build_src_filter} -<nimble/> -<mesh/raspihttp>
${esp32_base.build_src_filter} -<libpax/> -<nimble/> -<mesh/raspihttp>

monitor_speed = 115200

Expand All @@ -12,4 +12,5 @@ build_flags =

lib_ignore =
${esp32_base.lib_ignore}
NimBLE-Arduino
NimBLE-Arduino
libpax
2 changes: 1 addition & 1 deletion src/modules/AdminModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
#if HAS_BLUETOOTH
conn.has_bluetooth = true;
conn.bluetooth.pin = config.bluetooth.fixed_pin;
#ifdef ARCH_ESP32
#if defined(ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2)
conn.bluetooth.is_connected = nimbleBluetooth->isConnected();
conn.bluetooth.rssi = nimbleBluetooth->getRssi();
#elif defined(ARCH_NRF52)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void setupModules()
#if !MESHTASTIC_EXCLUDE_STOREFORWARD
storeForwardModule = new StoreForwardModule();
#endif
#if !MESHTASTIC_EXCLUDE_PAXCOUNTER
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_PAXCOUNTER
paxcounterModule = new PaxcounterModule();
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esp32/PaxcounterModule.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "configuration.h"
#if defined(ARCH_ESP32)
#if defined(ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2)
#include "Default.h"
#include "MeshService.h"
#include "PaxcounterModule.h"
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esp32/PaxcounterModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "ProtobufModule.h"
#include "configuration.h"
#if defined(ARCH_ESP32)
#if defined(ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2)
#include "../mesh/generated/meshtastic/paxcount.pb.h"
#include "NodeDB.h"
#include <libpax_api.h>
Expand Down
2 changes: 1 addition & 1 deletion src/platform/esp32/main-esp32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void esp32Setup()
preferences.putUInt("rebootCounter", rebootCounter);
preferences.end();
LOG_DEBUG("Number of Device Reboots: %d\n", rebootCounter);
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH
String BLEOTA = BleOta::getOtaAppVersion();
if (BLEOTA.isEmpty()) {
LOG_DEBUG("No OTA firmware available\n");
Expand Down
2 changes: 1 addition & 1 deletion src/sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
// esp_wifi_stop();
waitEnterSleep(skipPreflight);

#ifdef ARCH_ESP32
#if defined(ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2)
// Full shutdown of bluetooth hardware
if (nimbleBluetooth)
nimbleBluetooth->deinit();
Expand Down

0 comments on commit 2c902aa

Please sign in to comment.