make EMS-ESP compile standalone on osx/darwin and linux

This commit is contained in:
Proddy
2023-07-15 11:00:04 +02:00
parent ccd69c2c3a
commit 98dd25c5bb
4 changed files with 4 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ CHECKFLAGS = -q --force --std=c++11
#---------------------------------------------------------------------- #----------------------------------------------------------------------
C_STANDARD := -std=c17 C_STANDARD := -std=c17
# CXX_STANDARD := -std=c++17 # CXX_STANDARD := -std=c++17
CXX_STANDARD := -std=gnu++17 CXX_STANDARD := -std=gnu++11
# C_STANDARD := -std=c11 # C_STANDARD := -std=c11
# CXX_STANDARD := -std=c++11 # CXX_STANDARD := -std=c++11

View File

@@ -197,7 +197,7 @@ const char * MqttClient::getClientId() const {
} }
void MqttClient::loop() { void MqttClient::loop() {
switch (_state) { switch ((State)_state) { // TOOD modified by proddy for EMS-ESP compiling on osx
case State::disconnected: case State::disconnected:
#if defined(ARDUINO_ARCH_ESP32) #if defined(ARDUINO_ARCH_ESP32)
if (_useInternalTask == espMqttClientTypes::UseInternalTask::YES) { if (_useInternalTask == espMqttClientTypes::UseInternalTask::YES) {

View File

@@ -123,8 +123,7 @@ class MqttClient {
#elif defined(ARDUINO_ARCH_ESP8266) && EMC_ESP8266_MULTITHREADING #elif defined(ARDUINO_ARCH_ESP8266) && EMC_ESP8266_MULTITHREADING
std::atomic<bool> _xSemaphore = false; std::atomic<bool> _xSemaphore = false;
#elif defined(__linux__) #elif defined(__linux__)
// added mutable to compile EMS-ESP standalone mutable std::mutex mtx; // TOOD modified by proddy for EMS-ESP
mutable std::mutex mtx;
#endif #endif
uint8_t _rxBuffer[EMC_RX_BUFFER_SIZE]; uint8_t _rxBuffer[EMC_RX_BUFFER_SIZE];

View File

@@ -147,7 +147,7 @@ build_flags =
-DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__ -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
-lpthread -lpthread
-std=gnu++17 -Og -ggdb -std=gnu++11 -Og -ggdb
build_src_flags = build_src_flags =
-Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-unused-lambda-capture -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-unused-lambda-capture
-Wno-missing-braces -Wno-missing-braces