[platformio] Align configs with Arduino IDE

This commit is contained in:
Paul Vakhrushev
2021-02-28 21:47:00 +00:00
parent f69566e175
commit a54a7c3d26
7 changed files with 55 additions and 12 deletions

View File

@@ -88,7 +88,7 @@ const char WiFiPassword[] = "12345678";
// ------------ Прочее -------------
#define GL_VERSION 017 // код версии прошивки
#define EE_TOUT 30000 // таймаут сохранения епром после изменения, мс
//#define DEBUG_SERIAL // закомментируй чтобы выключить отладку (скорость 115200)
//#define DEBUG_SERIAL_LAMP // закомментируй чтобы выключить отладку (скорость 115200)
#define EE_KEY 55 // ключ сброса WiFi (измени для сброса всех настроек)
#define NTP_UPD_PRD 5 // период обновления времени с NTP сервера, минут
//#define SKIP_WIFI // пропустить подключение к вафле (для отладки)
@@ -152,7 +152,7 @@ void blink8(CRGB color);
void setup() {
delay(2000); // ждём старта есп
memset(matrixValue, 0, sizeof(matrixValue));
#ifdef DEBUG_SERIAL
#ifdef DEBUG_SERIAL_LAMP
Serial.begin(115200);
DEBUGLN();
#endif

View File

@@ -19,7 +19,7 @@
#define MAX_PRESETS 40 // макс количество режимов
// ------------------- МАКРО --------------------
#ifdef DEBUG_SERIAL
#ifdef DEBUG_SERIAL_LAMP
#define DEBUGLN(x) Serial.println(x)
#define DEBUG(x) Serial.print(x)
#else

View File

@@ -1,3 +1,4 @@
.DS_Store
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json

View File

@@ -0,0 +1,10 @@
{
"files.associations": {
"*.tcc": "cpp",
"deque": "cpp",
"list": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp"
}
}

View File

@@ -1,7 +0,0 @@
PIO project
pio update
pio run --target erase
pio run --target upload

View File

@@ -0,0 +1,23 @@
# PIO project
### Prerequisites:
```
pio update
```
### Update over wire:
```
pio run -e debug -t erase
pio run -e debug -t upload
pio run -e release -t upload
```
### Listen to serial monitor:
```
pio device monitor
```
### Update over local network:
```
pio run -e wireless -t upload
```

View File

@@ -8,9 +8,25 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:esp8266]
[platformio]
default_envs = debug
[env]
platform = espressif8266
board = esp12e
board = d1_mini
board_build.ldscript = eagle.flash.4m2m.ld
board_build.flash_mode = dout
framework = arduino
upload_speed = 460800
monitor_speed = 115200
lib_deps = fastled/FastLED@^3.4.0
[env:release]
[env:debug]
build_type = debug
build_flags = -D DEBUG_SERIAL_LAMP
[env:wireless]
upload_protocol = espota
upload_port = 192.168.8.164