mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-14 12:46:50 +01:00
fix esp32 compat
This commit is contained in:
@@ -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}
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <TaskSchedulerDeclarations.h>
|
||||
#include <functional>
|
||||
|
||||
typedef std::function<void(uint32_t from, String &msg)> msgReceived_cb;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user