remove unused

This commit is contained in:
2018-09-16 22:10:10 +02:00
parent 382db948ac
commit 8a9c4bc671
5 changed files with 3 additions and 95 deletions

View File

@@ -38,7 +38,6 @@ firmware-build:
- pio run --environment basic
- pio run --environment mesh
- pio run --environment meshMqttBridge
- pio run --environment ota
artifacts:
paths:
- .pioenvs/*/firmware.*

View File

@@ -22,6 +22,8 @@ lib_deps =
ESPAsyncTCP
TaskScheduler
SPIFFS
ESP8266mDNS
ArduinoOTA
;[env:build]
;src_filter = +<*> -<examples/>
@@ -68,17 +70,4 @@ monitor_baud = ${common.monitor_baud}
framework = ${common.framework}
lib_deps = ${common.lib_deps}
painlessMesh
PubSubClient
[env:ota]
src_filter = +<*> +<*/plugins/*> -<examples/> +<examples/ota/>
platform = espressif8266
board = esp12e
upload_speed = ${common.upload_speed}
upload_flags = --auth=f4ncy
monitor_baud = ${common.monitor_baud}
framework = ${common.framework}
lib_deps = ${common.lib_deps}
ESP8266mDNS
painlessMesh
ArduinoOTA
PubSubClient

View File

@@ -1,28 +0,0 @@
#ifndef __MESH_APP__
#define __MESH_APP__
#define DEBUG_ESP_OTA
#include <MeshNet.h>
#include <base/MeshSprocket.h>
#include "config.h"
using namespace std;
using namespace std::placeholders;
// MeshSprocket base class integrates OTA plugin by default
class SprocketOTA : public MeshSprocket {
public:
SprocketOTA(SprocketConfig cfg, OtaConfig otaCfg) : MeshSprocket(cfg, otaCfg) {}
Sprocket* activate(Scheduler* scheduler, Network* network) {
// call parent method that enables dispatching and plugins
MeshSprocket::activate(scheduler, network);
return this;
} using MeshSprocket::activate;
void onMessage( uint32_t from, String &msg ) {
Serial.printf("SprocketOTA onMessage: received from %u msg=%s\n", from, msg.c_str());
}
};
#endif

View File

@@ -1,27 +0,0 @@
#ifndef __OTA_NODE__CONFIG__
#define __OTA_NODE__CONFIG__
// Scheduler config
#define _TASK_SLEEP_ON_IDLE_RUN
#define _TASK_STD_FUNCTION
// Chip config
#define SERIAL_BAUD_RATE 115200
#define STARTUP_DELAY 3000
// Mesh config
#define STATION_MODE 1 // must be 1 => connected to a normal network to receive update
#define WIFI_CHANNEL 11
#define MESH_PORT 5555
#define MESH_PREFIX "whateverYouLike"
#define MESH_PASSWORD "somethingSneaky"
#define STATION_SSID "Th1ngs4P"
#define STATION_PASSWORD "th3r31sn0sp00n"
#define HOSTNAME "ota-node"
#define MESH_DEBUG_TYPES ERROR | STARTUP | CONNECTION
// OTA config
#define OTA_PORT 8266
#define OTA_PASSWORD "f4ncy"
#endif

View File

@@ -1,25 +0,0 @@
#include <ArduinoOTA.h>
#include "config.h"
#include "MeshNet.h"
#include "SprocketOTA.cpp"
MeshNet net({
STATION_MODE, WIFI_CHANNEL,
MESH_PORT, MESH_PREFIX, MESH_PASSWORD,
STATION_SSID, STATION_PASSWORD, HOSTNAME,
MESH_DEBUG_TYPES
});
SprocketOTA sprocket(
{ STARTUP_DELAY, SERIAL_BAUD_RATE },
{OTA_PORT, OTA_PASSWORD}
);
void setup() {
sprocket.join(net);
}
void loop() {
sprocket.loop();
yield();
}