fix esp32 compat

This commit is contained in:
2018-11-17 01:22:27 +01:00
parent e1c24c1de9
commit 0898261679
4 changed files with 18 additions and 9 deletions

View File

@@ -8,8 +8,8 @@
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
;[platformio]
;env_default = mesh
[platformio]
env_default = basic_esp32
[common]
framework = arduino
@@ -36,10 +36,21 @@ lib_deps =
;upload_port = 192.168.1.168
[env:basic]
src_filter = +<*> -<examples/> +<examples/basic/>
platform = ${common.platform}
board = ${common.board}
src_filter = +<*> -<examples/> +<examples/basic/>
upload_speed = ${common.upload_speed}
monitor_baud = ${common.monitor_baud}
framework = ${common.framework}
lib_deps = ${common.lib_deps}
[env:basic_esp32]
platform = espressif32
board = esp32dev
framework = ${common.framework}
build_flags = -std=c++14
src_filter = +<*> -<examples/> +<examples/basic/>
upload_speed = ${common.upload_speed}
monitor_baud = ${common.monitor_baud}
lib_deps = ${common.lib_deps}

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
#include <TaskSchedulerDeclarations.h>
#include <functional>
typedef std::function<void(uint32_t from, String &msg)> msgReceived_cb;

View File

@@ -5,8 +5,8 @@
#define _TASK_STD_FUNCTION
#define _TASK_PRIORITY
#include <TaskSchedulerDeclarations.h>
#include <Arduino.h>
#include <TaskSchedulerDeclarations.h>
#include <vector>
#include "FS.h"
#ifdef ESP32
@@ -19,9 +19,6 @@
using namespace std;
using namespace std::placeholders;
// FIXME move to some global fnc lib
#define ARRAY_LENGTH(array) sizeof(array)/sizeof(array[0])
class Sprocket : public Mediator {
protected:
// TODO move scheduler out of Sprocket

View File

@@ -1,5 +1,5 @@
#ifndef __ARRAY_UTILS__
#define __ARRAY_UTILS__
#ifndef __MISC_UTILS__
#define __MISC_UTILS__
#define ARRAY_LENGTH(array) sizeof(array)/sizeof(array[0])