reorganize platformio.ini configuration
This commit is contained in:
parent
a4893747bb
commit
4693969aff
@ -31,14 +31,18 @@ namespace Mqtt {
|
||||
}
|
||||
|
||||
void publishInit() {
|
||||
#if MQTT_CLEANUP
|
||||
Ha::publisher = publish;
|
||||
Component::components.forEach([](Component* c) { c->publishConfig(); });
|
||||
AbstractBuilder::deleteAll();
|
||||
#endif
|
||||
ts.deleteTask(tPublishInit);
|
||||
}
|
||||
|
||||
void publishCleanupConfig() {
|
||||
#if MQTT_CLEANUP
|
||||
Component::components.forEach([](Component* c) { c->publishCleanupConfig(); });
|
||||
#endif
|
||||
}
|
||||
|
||||
void onMessage(char* topic, char* payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total) {
|
||||
|
||||
@ -9,12 +9,9 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[platformio]
|
||||
default_envs = pro-mini
|
||||
default_envs = huzzah
|
||||
|
||||
[env:huzzah]
|
||||
platform = espressif8266
|
||||
board = huzzah
|
||||
framework = arduino
|
||||
[env]
|
||||
lib_extra_dirs =
|
||||
../libraries
|
||||
lib_deps =
|
||||
@ -22,65 +19,38 @@ lib_deps =
|
||||
bblanchon/ArduinoJson@6.21.5
|
||||
adafruit/Adafruit Unified Sensor@^1.1.4
|
||||
adafruit/DHT sensor library@1.3.2
|
||||
arkhipenko/TaskScheduler@^3.7.0
|
||||
marvinroger/AsyncMqttClient@^0.9.0
|
||||
https://git.hodos.ro/arduino/lib_serial-reader.git@^1.0.0
|
||||
build_flags = -D DHT_SENSOR=0 -D DEBUG_RAW=0
|
||||
check_tool = cppcheck
|
||||
check_flags = --enable=all
|
||||
check_skip_packages = yes
|
||||
check_severity = medium, high
|
||||
|
||||
[env:huzzah]
|
||||
platform = espressif8266
|
||||
board = huzzah
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
arkhipenko/TaskScheduler@^3.7.0
|
||||
marvinroger/AsyncMqttClient@^0.9.0
|
||||
upload_port = 192.168.6.161
|
||||
upload_protocol = espota
|
||||
upload_flags =
|
||||
--host_port=10000
|
||||
|
||||
[env:huzzah_dev]
|
||||
extends = env:huzzah
|
||||
build_flags = ${env.build_flags} -D MQTT_CLEANUP=1
|
||||
|
||||
[env:pro-mini]
|
||||
platform = atmelavr
|
||||
board = pro16MHzatmega328
|
||||
framework = arduino
|
||||
lib_extra_dirs =
|
||||
../libraries
|
||||
lib_deps =
|
||||
sui77/rc-switch@^2.6.3
|
||||
bblanchon/ArduinoJson@6.21.5
|
||||
adafruit/Adafruit Unified Sensor@^1.1.4
|
||||
adafruit/DHT sensor library@1.3.2
|
||||
https://git.hodos.ro/arduino/lib_serial-reader.git@^1.0.0
|
||||
build_flags = -D DHT_SENSOR=0 -D DEBUG_RAW=0
|
||||
upload_port = /dev/ttyUSB0
|
||||
check_tool = cppcheck
|
||||
check_flags = --enable=all
|
||||
check_skip_packages = yes
|
||||
check_severity = medium, high
|
||||
|
||||
[env:native]
|
||||
platform = native
|
||||
test_filter = native/*
|
||||
lib_extra_dirs =
|
||||
../libraries
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson@6.19.4
|
||||
build_flags = -std=c++11
|
||||
|
||||
[env:embedded]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = pro16MHzatmega328
|
||||
lib_extra_dirs =
|
||||
../libraries
|
||||
lib_deps =
|
||||
sui77/rc-switch@^2.6.3
|
||||
bblanchon/ArduinoJson@6.19.4
|
||||
|
||||
platform_packages =
|
||||
platformio/tool-simavr
|
||||
test_speed = 9600
|
||||
test_testing_command =
|
||||
${platformio.packages_dir}/tool-simavr/bin/simavr
|
||||
-m
|
||||
atmega328p
|
||||
-f
|
||||
16000000L
|
||||
${platformio.build_dir}/${this.__env__}/firmware.elf
|
||||
test_filter = embedded/*
|
||||
bblanchon/ArduinoJson@6.21.5
|
||||
debug_build_flags = -std=c++11
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
#include <Arduino.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp(void) {
|
||||
// set stuff up here
|
||||
}
|
||||
|
||||
void tearDown(void) {
|
||||
// clean stuff up here
|
||||
}
|
||||
|
||||
void setup() {
|
||||
UNITY_BEGIN();
|
||||
UNITY_END();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user