diff --git a/Makefile b/Makefile index 0518768..8fafbe1 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ clean: firmware_docker: sh -c "docker build -t fiatlux_firmware_env docker/firmware" - sh -c "docker run --volume "$$(pwd)"/firmware:/app/firmware fiatlux_firmware_env make -C firmware html all" + sh -c "docker run --volume "$$(pwd)"/firmware:/app/firmware fiatlux_firmware_env make -C firmware all" pcb_docker: sh -c "docker build -t fiatlux_pcb_env docker/pcb" diff --git a/README.md b/README.md index ecb33c2..6ff897e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ git submodule update --init --recursive ### Build Requirements - make - - bash gawk + - bash gawk perl - g++ gcc - libc6-dev - flex bison diff --git a/docker/firmware/Dockerfile b/docker/firmware/Dockerfile index d278775..582fe2f 100644 --- a/docker/firmware/Dockerfile +++ b/docker/firmware/Dockerfile @@ -6,7 +6,7 @@ RUN cd app; git clone --recursive https://github.com/SuperHouse/esp-open-rtos.gi RUN cd app; sed -i 's/GNU bash, version (3\\\.\[1-9\]|4)/GNU bash, version (3.[1-9]|4|5)/g' modules/sdk/crosstool-NG/configure.ac; mkdir -p modules/sdk/crosstool-NG/.build/tarballs; wget https://github.com/libexpat/libexpat/releases/download/R_2_1_0/expat-2.1.0.tar.gz -O modules/sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tar.gz RUN cd app/modules/sdk; export CT_EXPERIMENTAL=y; export CT_ALLOW_BUILD_AS_ROOT=y; export CT_ALLOW_BUILD_AS_ROOT_SURE=y; make standalone=y -j$(nproc); wget -N https://raw.githubusercontent.com/espressif/esptool/master/esptool.py -O xtensa-lx106-elf/bin/esptool.py USER 0 -RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial +RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial perl RUN apt install -y --reinstall python-is-python3 USER 1000 WORKDIR /app diff --git a/firmware/.gitignore b/firmware/.gitignore index 14041d9..c67e8c9 100644 --- a/firmware/.gitignore +++ b/firmware/.gitignore @@ -142,5 +142,5 @@ dkms.conf *.remove firmware/ -build/ -compile_commands.json +fsdata/fsdata.c +compile_commands.json \ No newline at end of file diff --git a/firmware/.idea/firmware.iml b/firmware/.idea/firmware.iml index 190a5aa..91a038c 100644 --- a/firmware/.idea/firmware.iml +++ b/firmware/.idea/firmware.iml @@ -1,5 +1,4 @@ - diff --git a/firmware/Makefile b/firmware/Makefile index 2171e44..baf16b5 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -1,6 +1,6 @@ PROGRAM=fiatlux -EXTRA_CFLAGS=-O3 -Ibuild/gen +EXTRA_CFLAGS=-O3 -Ifsdata EXTRA_COMPONENTS=extras/i2s_dma extras/ws2812_i2s extras/dhcpserver extras/rboot-ota extras/mbedtls extras/httpd extras/sntp extras/cpp_support extras/paho_mqtt_c @@ -11,12 +11,11 @@ FLASH_MODE = dio include ../modules/rtos/common.mk -html: build/gen/fsdata.c +html: fsdata/fsdata.c -build/gen/fsdata.c: webdir/index.html webdir/404.html webdir/css/picnic.min.css webdir/css/style.css webdir/js/smoothie_min.js +fsdata/fsdata.c: fsdata/fs/index.html fsdata/fs/404.html fsdata/fs/css/picnic.min.css fsdata/fs/css/style.css fsdata/fs/js/smoothie_min.js @echo "Generating fsdata.." - @mkdir -p $(dir $@) - @./mkwebfs.py --gzip -o $@ $^ + cd fsdata && ./makefsdata test: unittest systest diff --git a/firmware/fsdata/fs/404.html b/firmware/fsdata/fs/404.html new file mode 100644 index 0000000..da81a20 --- /dev/null +++ b/firmware/fsdata/fs/404.html @@ -0,0 +1,22 @@ + + + + + + + HTTP Server + + + + +
+

404 - Page not found

+
Sorry, the page you are requesting was not found on this server.
+
+ + + diff --git a/firmware/webdir/css/picnic.min.css b/firmware/fsdata/fs/css/picnic.min.css similarity index 100% rename from firmware/webdir/css/picnic.min.css rename to firmware/fsdata/fs/css/picnic.min.css diff --git a/firmware/webdir/css/style.css b/firmware/fsdata/fs/css/style.css similarity index 63% rename from firmware/webdir/css/style.css rename to firmware/fsdata/fs/css/style.css index c84c3d9..0e0e33a 100644 --- a/firmware/webdir/css/style.css +++ b/firmware/fsdata/fs/css/style.css @@ -6,15 +6,15 @@ main { margin-right: auto; } -canvas { +canvas{ width: 100%; } -main section:target ~ section, main section#io, main section#wifi, main section#ota { +main section:target ~ section, main section#io, main section#wifi, main section#ota { display: none; } -main section:target { +main section:target{ display: block !important; } @@ -22,34 +22,30 @@ main section:target { width: 100%; display: table; } - -.table > .row { +.table>.row{ display: table-row; } - -.table > .row:nth-child(2n) { - background: rgba(17, 17, 17, 0.05); +.table>.row:nth-child(2n) { + background: rgba(17,17,17,0.05); } - -.table > .row > * { - display: table-cell; - padding: .3em .6em .3em .6em; +.table>.row>*{ + display: table-cell; + padding: .3em 2.4em .3em .6em; } - -.table > header.row > * { +.table>header.row>*{ text-align: left; font-weight: 900; color: #fff; background-color: #0074d9; } -.table > .row > input { +.table>.row>input{ border: none; background: none; font-weight: 900; } -.plain { +.plain{ opacity: initial; width: initial; } \ No newline at end of file diff --git a/firmware/webdir/index.html b/firmware/fsdata/fs/index.html similarity index 89% rename from firmware/webdir/index.html rename to firmware/fsdata/fs/index.html index 0a7bf04..8ceefa7 100644 --- a/firmware/webdir/index.html +++ b/firmware/fsdata/fs/index.html @@ -5,7 +5,6 @@ fiatlux v0.2 -