Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move UART bridge -> tutorials #3054

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,17 +367,17 @@ jobs:
fail-fast: false
matrix:
example:
- path: esp32/uart-bridge
- path: esp32/micropython
#- path: esp8266/http-client-server
- path: micropython/esp32
- path: http/uart-bridge/esp32
- path: http/http-client/esp8266/http-client-server
name: ${{ matrix.example.path }}
env:
GO: 0
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 2 }
- run: echo # nothing specific to install or do
- run: make -C examples/${{ matrix.example.path }} build
- run: make -C tutorials/${{ matrix.example.path }} build

generic_examples_arm:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,20 +245,20 @@ jobs:
fail-fast: false
matrix:
example:
- path: esp32/uart-bridge
#- path: esp8266/http-client-server
- path: http/uart-bridge/esp32
- path: http/http-client/esp8266/http-client-server
name: ${{ matrix.example.path }}
env:
GO: 0
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src|^examples/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
- run: if ./test/match_changed_files.sh '^src|^tutorials/http/uart-bridge|^tutorials/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: |
# nothing specific to install or do
- if: ${{ env.GO == 1 }}
run: make -C examples/${{ matrix.example.path }} build
run: make -C tutorials/${{ matrix.example.path }} build

generic_examples_arm:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion examples/esp32/uart-bridge/main/mongoose.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/esp32/uart-bridge/main/mongoose.h

This file was deleted.

1 change: 0 additions & 1 deletion examples/esp32/uart-bridge/main/net.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/esp32/uart-bridge/main/packed_fs.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/uart-bridge/mongoose.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/uart-bridge/mongoose.h

This file was deleted.

1 change: 1 addition & 0 deletions tutorials/arduino/esp32-http
1 change: 1 addition & 0 deletions tutorials/arduino/esp32-mqtt
1 change: 1 addition & 0 deletions tutorials/arduino/sim800-mqtt
1 change: 1 addition & 0 deletions tutorials/arduino/teensy41-http
1 change: 1 addition & 0 deletions tutorials/arduino/w5500-http
1 change: 1 addition & 0 deletions tutorials/arduino/w5500-mqtt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
THISDIR = $(realpath $(CURDIR))
ROOTDIR = $(realpath $(CURDIR)/../../..)
ROOTDIR = $(realpath $(CURDIR)/../../../../..)
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) docker.io/mdashnet/8266
CMD ?= make -C src defconfig app
PORT ?= /dev/ttyUSB0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ifneq ($(OS),Windows_NT)
packed_fs.c: $(shell find web_root -type f) Makefile
rm -rf tmp/web_root && mkdir tmp && cp -r web_root tmp/
find tmp -type f | xargs -n1 gzip
$(CC) ../../test/pack.c -o pack
$(CC) ../../../test/pack.c -o pack
cd tmp && ../pack `find web_root -type f` > ../$@
endif

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CWD = $(realpath $(CURDIR))
MNT = $(realpath $(CURDIR)/../../..)
MNT = $(realpath $(CURDIR)/../../../..)
PORT ?= /dev/ttyUSB0
CMD ?= build

Expand Down
1 change: 1 addition & 0 deletions tutorials/http/uart-bridge/esp32/main/mongoose.c
1 change: 1 addition & 0 deletions tutorials/http/uart-bridge/esp32/main/mongoose.h
1 change: 1 addition & 0 deletions tutorials/http/uart-bridge/esp32/main/net.c
1 change: 1 addition & 0 deletions tutorials/http/uart-bridge/esp32/main/packed_fs.c
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tutorials/http/uart-bridge/mongoose.c
1 change: 1 addition & 0 deletions tutorials/http/uart-bridge/mongoose.h
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@
#include <string.h>
#include <time.h>

#if defined(__cplusplus)
extern "C" {
#endif
const char *mg_unlist(size_t no);
const char *mg_unpack(const char *, size_t *, time_t *);
#if defined(__cplusplus)
}
#endif

static const unsigned char v1[] = {
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 105, 110, // .....i.c..in
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 105, 110, // .....N.g..in
100, 101, 120, 46, 104, 116, 109, 108, 0, 93, 144, 177, // dex.html.]..
78, 196, 48, 12, 134, 247, 123, 138, 144, 153, 180, 176, // N.0...{.....
49, 36, 149, 208, 245, 6, 38, 24, 64, 130, 49, 77, // 1$....&[email protected]
Expand All @@ -28,7 +37,7 @@ static const unsigned char v1[] = {
130, 117, 1, 0, 0, 0 // .u...
};
static const unsigned char v2[] = {
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 109, 97, // .....i.c..ma
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 109, 97, // .....N.g..ma
105, 110, 46, 106, 115, 0, 181, 88, 109, 111, 219, 70, // in.js..Xmo.F
18, 254, 174, 95, 49, 80, 125, 37, 121, 165, 72, 43, // ..._1P}%y.H+
113, 225, 131, 44, 235, 144, 6, 45, 112, 135, 38, 233, // q..,...-p.&.
Expand Down Expand Up @@ -195,7 +204,7 @@ static const unsigned char v2[] = {
154, 248, 11, 218, 252, 214, 171, 12, 23, 0, 0, 0 // ...........
};
static const unsigned char v3[] = {
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 112, 114, // .....i.c..pr
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 112, 114, // .....N.g..pr
101, 97, 99, 116, 46, 109, 105, 110, 46, 106, 115, 0, // eact.min.js.
157, 91, 123, 119, 219, 182, 146, 255, 127, 63, 69, 164, // .[{w.....?E.
211, 163, 18, 43, 68, 177, 147, 182, 187, 75, 5, 213, // ...+D....K..
Expand Down Expand Up @@ -641,7 +650,7 @@ static const unsigned char v3[] = {
138, 51, 0, 0, 0 // .3..
};
static const unsigned char v4[] = {
31, 139, 8, 8, 29, 105, 247, 99, 0, 3, 115, 116, // .....i.c..st
31, 139, 8, 8, 6, 78, 191, 103, 0, 3, 115, 116, // .....N.g..st
121, 108, 101, 46, 99, 115, 115, 0, 149, 85, 193, 142, // yle.css..U..
155, 48, 16, 189, 231, 43, 92, 173, 42, 181, 171, 192, // .0...+..*...
134, 16, 96, 33, 151, 222, 250, 17, 85, 15, 6, 155, // ..`!....U...
Expand Down Expand Up @@ -718,22 +727,20 @@ static const struct packed_file {
size_t size;
time_t mtime;
} packed_files[] = {
{"/web_root/index.html.gz", v1, sizeof(v1), 1677158685},
{"/web_root/main.js.gz", v2, sizeof(v2), 1677158685},
{"/web_root/preact.min.js.gz", v3, sizeof(v3), 1677158685},
{"/web_root/style.css.gz", v4, sizeof(v4), 1677158685},
{"/web_root/index.html.gz", v1, sizeof(v1), 1740590598},
{"/web_root/main.js.gz", v2, sizeof(v2), 1740590598},
{"/web_root/preact.min.js.gz", v3, sizeof(v3), 1740590598},
{"/web_root/style.css.gz", v4, sizeof(v4), 1740590598},
{NULL, NULL, 0, 0}
};

static int scmp(const char *a, const char *b) {
while (*a && (*a == *b)) a++, b++;
return *(const unsigned char *) a - *(const unsigned char *) b;
}
const char *mg_unlist(size_t no);
const char *mg_unlist(size_t no) {
return packed_files[no].name;
}
const char *mg_unpack(const char *path, size_t *size, time_t *mtime);
const char *mg_unpack(const char *name, size_t *size, time_t *mtime) {
const struct packed_file *p;
for (p = packed_files; p->name != NULL; p++) {
Expand Down
1 change: 1 addition & 0 deletions tutorials/tcp/uart-bridge
1 change: 1 addition & 0 deletions tutorials/websocket/uart-bridge
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.