Skip to content

Commit

Permalink
misc. cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Feb 23, 2024
1 parent 41ee895 commit b60944c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
1 change: 1 addition & 0 deletions software/firmware/source/SoftRF/src/platform/RP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ struct rst_info {
#endif

#if defined(ARDUINO_RASPBERRY_PI_PICO_W)
#define EXCLUDE_OTA
#define USE_WIFI_NINA false
#define USE_WIFI_CUSTOM true
#include <ESP8266WiFi.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@

#if defined(ESP32)
#include "sdkconfig.h"
#endif

#if defined(ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2)

#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled!
#endif
#if defined(CONFIG_BLUEDROID_ENABLED)

/*
BLE code is based on Neil Kolban example for IDF:
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp
Ported to Arduino ESP32 by Evandro Copercini
HM-10 emulation and adaptation for SoftRF is done by Linar Yusupov.
*/
* BLE code is based on Neil Kolban example for IDF:
* https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp
* Ported to Arduino ESP32 by Evandro Copercini
* HM-10 emulation and adaptation for SoftRF is done by Linar Yusupov.
*/
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
Expand Down Expand Up @@ -439,4 +434,5 @@ IODev_ops_t ESP32_Bluetooth_ops = {
ESP32_Bluetooth_write
};

#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* ESP32 */
14 changes: 6 additions & 8 deletions software/firmware/source/SoftRF/src/ui/Web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@ void Web_fini() {}

static uint32_t prev_rx_pkt_cnt = 0;

#if !defined(ARDUINO_ARCH_RP2040) && \
!defined(CONFIG_IDF_TARGET_ESP32C6) && \
!defined(ARDUINO_ARCH_RENESAS)
#if !defined(ARDUINO_ARCH_RENESAS)
#include "../Logo.h"
#endif /* ARDUINO_ARCH_RP2040 CONFIG_IDF_TARGET_ESP32C6 ARDUINO_ARCH_RENESAS */
#endif /* ARDUINO_ARCH_RENESAS */

#if !defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_RENESAS)
#if !defined(EXCLUDE_OTA)
#include "jquery_min_js.h"
#endif /* ARDUINO_ARCH_RP2040 ARDUINO_ARCH_RENESAS */
#endif /* EXCLUDE_OTA */

#include <WiFiWebServer.h>
WiFiWebServer server ( 80 );
Expand Down Expand Up @@ -1285,7 +1283,7 @@ void Web_setup()
} );
#endif /* ARDUINO_ARCH_RP2040 CONFIG_IDF_TARGET_ESP32C6 ARDUINO_ARCH_RENESAS */

#if !defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_RENESAS)
#if !defined(EXCLUDE_OTA)
server.on ( "/jquery.min.js", []() {

PGM_P content = jquery_min_js_gz;
Expand All @@ -1304,7 +1302,7 @@ void Web_setup()
} while (bytes_left > 0) ;

} );
#endif /* ARDUINO_ARCH_RP2040 ARDUINO_ARCH_RENESAS */
#endif /* EXCLUDE_OTA */

#if defined(ENABLE_RECORDER)
server.on("/flights", HTTP_GET, Handle_Flight_Download);
Expand Down

0 comments on commit b60944c

Please sign in to comment.