mirror of
https://github.com/AlexGyver/GyverLamp2.git
synced 2025-08-08 17:11:05 +03:00
[platformio] Align configs with Arduino IDE
This commit is contained in:
@@ -88,7 +88,7 @@ const char WiFiPassword[] = "12345678";
|
|||||||
// ------------ Прочее -------------
|
// ------------ Прочее -------------
|
||||||
#define GL_VERSION 017 // код версии прошивки
|
#define GL_VERSION 017 // код версии прошивки
|
||||||
#define EE_TOUT 30000 // таймаут сохранения епром после изменения, мс
|
#define EE_TOUT 30000 // таймаут сохранения епром после изменения, мс
|
||||||
//#define DEBUG_SERIAL // закомментируй чтобы выключить отладку (скорость 115200)
|
//#define DEBUG_SERIAL_LAMP // закомментируй чтобы выключить отладку (скорость 115200)
|
||||||
#define EE_KEY 55 // ключ сброса WiFi (измени для сброса всех настроек)
|
#define EE_KEY 55 // ключ сброса WiFi (измени для сброса всех настроек)
|
||||||
#define NTP_UPD_PRD 5 // период обновления времени с NTP сервера, минут
|
#define NTP_UPD_PRD 5 // период обновления времени с NTP сервера, минут
|
||||||
//#define SKIP_WIFI // пропустить подключение к вафле (для отладки)
|
//#define SKIP_WIFI // пропустить подключение к вафле (для отладки)
|
||||||
@@ -152,7 +152,7 @@ void blink8(CRGB color);
|
|||||||
void setup() {
|
void setup() {
|
||||||
delay(2000); // ждём старта есп
|
delay(2000); // ждём старта есп
|
||||||
memset(matrixValue, 0, sizeof(matrixValue));
|
memset(matrixValue, 0, sizeof(matrixValue));
|
||||||
#ifdef DEBUG_SERIAL
|
#ifdef DEBUG_SERIAL_LAMP
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
DEBUGLN();
|
DEBUGLN();
|
||||||
#endif
|
#endif
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#define MAX_PRESETS 40 // макс количество режимов
|
#define MAX_PRESETS 40 // макс количество режимов
|
||||||
|
|
||||||
// ------------------- МАКРО --------------------
|
// ------------------- МАКРО --------------------
|
||||||
#ifdef DEBUG_SERIAL
|
#ifdef DEBUG_SERIAL_LAMP
|
||||||
#define DEBUGLN(x) Serial.println(x)
|
#define DEBUGLN(x) Serial.println(x)
|
||||||
#define DEBUG(x) Serial.print(x)
|
#define DEBUG(x) Serial.print(x)
|
||||||
#else
|
#else
|
||||||
|
1
firmware/PlatformIO/.gitignore
vendored
1
firmware/PlatformIO/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
.DS_Store
|
||||||
.pio
|
.pio
|
||||||
.vscode/.browse.c_cpp.db*
|
.vscode/.browse.c_cpp.db*
|
||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
|
10
firmware/PlatformIO/.vscode/settings.json
vendored
Normal file
10
firmware/PlatformIO/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"*.tcc": "cpp",
|
||||||
|
"deque": "cpp",
|
||||||
|
"list": "cpp",
|
||||||
|
"string": "cpp",
|
||||||
|
"unordered_map": "cpp",
|
||||||
|
"vector": "cpp"
|
||||||
|
}
|
||||||
|
}
|
@@ -1,7 +0,0 @@
|
|||||||
PIO project
|
|
||||||
|
|
||||||
pio update
|
|
||||||
pio run --target erase
|
|
||||||
pio run --target upload
|
|
||||||
|
|
||||||
|
|
23
firmware/PlatformIO/README.md
Normal file
23
firmware/PlatformIO/README.md
Normal 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
|
||||||
|
```
|
@@ -8,9 +8,25 @@
|
|||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[env:esp8266]
|
[platformio]
|
||||||
|
default_envs = debug
|
||||||
|
|
||||||
|
[env]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = esp12e
|
board = d1_mini
|
||||||
|
board_build.ldscript = eagle.flash.4m2m.ld
|
||||||
|
board_build.flash_mode = dout
|
||||||
framework = arduino
|
framework = arduino
|
||||||
upload_speed = 460800
|
upload_speed = 460800
|
||||||
|
monitor_speed = 115200
|
||||||
lib_deps = fastled/FastLED@^3.4.0
|
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
|
||||||
|
Reference in New Issue
Block a user