SP111
This commit is contained in:
parent
1b1f295b23
commit
7aa39483de
6
partitions.csv
Normal file
6
partitions.csv
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#Name,Type,SubType,Offset,Size,Flags
|
||||||
|
nvs,data,nvs,0x9000,0x4000,
|
||||||
|
otadata,data,ota,0xd000,0x2000,
|
||||||
|
app0,app,ota_0,0x10000,0x3C000,
|
||||||
|
app1,app,ota_1,,0x3C000,
|
||||||
|
spiffs,data,spiffs,,0x0E000,
|
||||||
|
@ -32,16 +32,32 @@ build.filesystem = ${common.build.filesystem}
|
|||||||
lib_deps = ${common.lib_deps}
|
lib_deps = ${common.lib_deps}
|
||||||
build_flags = -D Sonoff4ChPro -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0
|
build_flags = -D Sonoff4ChPro -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0
|
||||||
|
|
||||||
[env:GosundSP111]
|
[env:GosundSP111_USB]
|
||||||
platform = ${common.platform}
|
platform = ${common.platform}
|
||||||
board = ${common.board}
|
board = ${common.board}
|
||||||
framework = ${common.framework}
|
framework = ${common.framework}
|
||||||
upload_speed = ${common.upload_speed}
|
upload_speed = ${common.upload_speed}
|
||||||
monitor_speed = ${common.monitor_speed}
|
monitor_speed = ${common.monitor_speed}
|
||||||
|
board_build.partitions = partitions.csv
|
||||||
|
build.filesystem = ${common.build.filesystem}
|
||||||
|
lib_deps = ${common.lib_deps}
|
||||||
|
build_flags = -D GosundSP111
|
||||||
|
|
||||||
|
[env:GosundSP111_02]
|
||||||
|
platform = ${common.platform}
|
||||||
|
board = ${common.board}
|
||||||
|
framework = ${common.framework}
|
||||||
|
upload_speed = ${common.upload_speed}
|
||||||
|
monitor_speed = ${common.monitor_speed}
|
||||||
|
board_build.partitions = partitions.csv
|
||||||
build.filesystem = ${common.build.filesystem}
|
build.filesystem = ${common.build.filesystem}
|
||||||
lib_deps = ${common.lib_deps}
|
lib_deps = ${common.lib_deps}
|
||||||
upload_port = 10.0.0.179
|
upload_port = 10.0.0.179
|
||||||
build_flags = -D GosundSP111
|
build_flags = -D GosundSP111
|
||||||
|
; -Os
|
||||||
|
; -flto
|
||||||
|
; -fno-exceptions
|
||||||
|
; -fno-rtti
|
||||||
|
|
||||||
[env:GosundSP111_ESP32]
|
[env:GosundSP111_ESP32]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
|
|||||||
@ -11,6 +11,8 @@ Button button0(13, true, true, [](const ButtonEvent event) { buttonCallback(rela
|
|||||||
|
|
||||||
Relay relay0(0, "fallback/relay0", "RELAY #0", 15, false, true);
|
Relay relay0(0, "fallback/relay0", "RELAY #0", 15, false, true);
|
||||||
|
|
||||||
|
Output relay0Led("relay0Led", 2, STATUS_INVERT, false);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Sonoff4ChPro
|
#ifdef Sonoff4ChPro
|
||||||
|
|||||||
2
src/io.h
2
src/io.h
@ -12,6 +12,8 @@ extern Button button0;
|
|||||||
|
|
||||||
extern Relay relay0;
|
extern Relay relay0;
|
||||||
|
|
||||||
|
extern Output relay0Led;
|
||||||
|
|
||||||
#ifdef Sonoff4ChPro
|
#ifdef Sonoff4ChPro
|
||||||
|
|
||||||
extern Button button1;
|
extern Button button1;
|
||||||
|
|||||||
@ -19,4 +19,5 @@ void loop() {
|
|||||||
wifiLoop();
|
wifiLoop();
|
||||||
ioLoop();
|
ioLoop();
|
||||||
ArduinoOTA.handle();
|
ArduinoOTA.handle();
|
||||||
|
relay0Led.set(relay0.get());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,9 @@
|
|||||||
#define CONFIG_WIFI_SSID "/wifi/ssid"
|
#define CONFIG_WIFI_SSID "/wifi/ssid"
|
||||||
#define CONFIG_WIFI_PASSWORD "/wifi/password"
|
#define CONFIG_WIFI_PASSWORD "/wifi/password"
|
||||||
|
|
||||||
|
#ifndef DEFAULT_HOSTNAME
|
||||||
#define DEFAULT_HOSTNAME "PatrixSonoff4ChPro"
|
#define DEFAULT_HOSTNAME "PatrixSonoff4ChPro"
|
||||||
|
#endif
|
||||||
#define DEFAULT_WIFI_SSID "HappyNet"
|
#define DEFAULT_WIFI_SSID "HappyNet"
|
||||||
#define DEFAULT_WIFI_PASSWORD "1Grausame!Sackratte7"
|
#define DEFAULT_WIFI_PASSWORD "1Grausame!Sackratte7"
|
||||||
|
|
||||||
|
|||||||
@ -10,5 +10,5 @@ minify index.html | sed 's|http://10.42.0.204||g' > index.html.min || exit 2
|
|||||||
#curl -s 'http://10.0.0.178/upload/index' -F "file=@index.html.min"
|
#curl -s 'http://10.0.0.178/upload/index' -F "file=@index.html.min"
|
||||||
#curl -s 'http://10.0.0.178/upload/icon' -F "file=@icon.svg"
|
#curl -s 'http://10.0.0.178/upload/icon' -F "file=@icon.svg"
|
||||||
|
|
||||||
curl -s 'http://10.0.0.174/upload/index' -F "file=@index.html.min"
|
curl -s 'http://10.0.0.179/upload/index' -F "file=@index.html.min"
|
||||||
curl -s 'http://10.0.0.174/upload/icon' -F "file=@icon.svg"
|
curl -s 'http://10.0.0.179/upload/icon' -F "file=@icon.svg"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user