diff --git a/.github/workflows/compile_development.yml b/.github/workflows/compile_development.yml
index 36c93f57..4c14fe64 100644
--- a/.github/workflows/compile_development.yml
+++ b/.github/workflows/compile_development.yml
@@ -43,16 +43,16 @@ jobs:
pip install --upgrade platformio
- name: Convert HTML files
- working-directory: tools/esp8266/html
+ working-directory: src/web/html
run: python convert.py
- name: Run PlatformIO
- run: pio run -d tools/esp8266 --environment esp8266-release --environment esp8266-1m-release --environment esp32-wroom32-release
+ run: pio run -d src --environment esp8266-release --environment esp8266-1m-release --environment esp32-wroom32-release
- name: Rename Binary files
id: rename-binary-files
- working-directory: tools/esp8266/scripts
- run: python getVersion.py >> $GITHUB_OUTPUT
+ working-directory: src
+ run: python ../scripts/getVersion.py >> $GITHUB_OUTPUT
- name: Set Version
uses: cschleiden/replace-tokens@v1
@@ -62,18 +62,15 @@ jobs:
VERSION: ${{ steps.rename-binary-files.outputs.name }}
- name: Create Manifest
- working-directory: tools/esp8266/scripts
- run: python buildManifest.py
+ working-directory: src
+ run: python ../scripts/buildManifest.py
- #run: zip --junk-paths ${{ steps.rename-binary-files.outputs.name }}.zip tools/esp8266/.pio/build/out/* tools/esp8266/User_Manual.md
- name: Create Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.rename-binary-files.outputs.name }}_dev_build
path: |
- tools/esp8266/firmware/*
- tools/esp8266/User_Manual.md
- tools/esp8266/install.html
-
- #./${{ steps.rename-binary-files.outputs.name }}.zip
+ src/firmware/*
+ src/User_Manual.md
+ src/install.html
diff --git a/.gitignore b/.gitignore
index 9af41f40..086822e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,24 +1,13 @@
-CMakeLists.txt.user
-CMakeCache.txt
-CMakeFiles
-CMakeScripts
-Testing
-Makefile
-cmake_install.cmake
-install_manifest.txt
-compile_commands.json
-CTestTestfile.cmake
-_deps
-build
-tools/esp8266/tmp
-tools/esp8266/binaries
+.pio
+.vscode/.browse.c_cpp.db*
+.vscode/c_cpp_properties.json
+.vscode/launch.json
+.vscode/ipch
+.vscode/extensions.json
+src/config/config_override.h
+src/html/h/*
/**/Debug
/**/v16/*
*.db
*.suo
*.ipch
-tools/esp8266/.vscode/extensions.json
-.DS_Store
-.vscode
-tools/esp8266/platformio-device-monitor-*.log
-tools/esp8266/html/h/*
\ No newline at end of file
diff --git a/tools/esp8266/README.md b/Getting_Started.md
similarity index 97%
rename from tools/esp8266/README.md
rename to Getting_Started.md
index a8978fbb..4b3d55c2 100644
--- a/tools/esp8266/README.md
+++ b/Getting_Started.md
@@ -85,7 +85,7 @@ To also run our sister project OpenDTU and be upwards compatible for the future
#### There are fake NRF24L01+ Modules out there
Watch out, there are some fake NRF24L01+ Modules out there that seem to use rebranded NRF24L01 Chips (without the +).
-An example can be found in [Issue #230](https://github.com/grindylow/ahoy/issues/230).
+An example can be found in [Issue #230](https://github.com/lumapu/ahoy/issues/230).
You are welcome to add more examples of faked chips. We will add that information here.
## Wiring things up
@@ -112,11 +112,11 @@ This is an example wiring using a Wemos D1 mini.
##### Schematic
-![Schematic](../../doc/AhoyWemos_Schaltplan.jpg)
+![Schematic](doc/AhoyWemos_Schaltplan.jpg)
##### Symbolic view
-![Symbolic](../../doc/AhoyWemos_Steckplatine.jpg)
+![Symbolic](doc/AhoyWemos_Steckplatine.jpg)
#### ESP32 wiring example
@@ -124,11 +124,11 @@ Example wiring for a 38pin ESP32 module
##### Schematic
-![Schematic](../../doc/Wiring_ESP32_Schematic.png)
+![Schematic](doc/Wiring_ESP32_Schematic.png)
##### Symbolic view
-![Symbolic](../../doc/Wiring_ESP32_Symbol.png)
+![Symbolic](doc/Wiring_ESP32_Symbol.png)
##### ESP32 GPIO settings
diff --git a/README.md b/README.md
index 45066d88..0748c1bb 100644
--- a/README.md
+++ b/README.md
@@ -7,13 +7,13 @@
List of approaches
-- [ESP8266/ESP32, C++](tools/esp8266/) 👈 the most effort is spent here
+- [ESP8266/ESP32, C++](Getting_Started.md) 👈 the most effort is spent here
- [Arduino Nano, C++](tools/nano/NRF24_SendRcv/)
- [Raspberry Pi, Python](tools/rpi/)
- [Others, C/C++](tools/nano/NRF24_SendRcv/)
## Quick Start with ESP8266
-- [Go here ✨](tools/esp8266/README.md#things-needed)
+- [Go here ✨](Getting_Started.md#things-needed)
## Success Stories
diff --git a/tools/esp8266/User_Manual.md b/User_Manual.md
similarity index 99%
rename from tools/esp8266/User_Manual.md
rename to User_Manual.md
index 1c882f48..3b51a3e1 100644
--- a/tools/esp8266/User_Manual.md
+++ b/User_Manual.md
@@ -1,7 +1,7 @@
# User Manual Ahoy DTU (on ESP8266)
Version #{VERSION}#
## Introduction
-See the repository [README.md](README.md)
+See the repository [README.md](Getting_Started.md)
## Setup
Assuming you have a running ahoy-dtu and you can access the setup page.
diff --git a/tools/esp8266/scripts/auto_firmware_version.py b/scripts/auto_firmware_version.py
similarity index 88%
rename from tools/esp8266/scripts/auto_firmware_version.py
rename to scripts/auto_firmware_version.py
index a9c74371..c4ab270d 100644
--- a/tools/esp8266/scripts/auto_firmware_version.py
+++ b/scripts/auto_firmware_version.py
@@ -17,7 +17,7 @@ from dulwich import porcelain
def get_firmware_specifier_build_flag():
try:
- build_version = porcelain.describe('../../') # refers to the repository root dir
+ build_version = porcelain.describe('../') # refers to the repository root dir
except:
build_version = "g0000000"
diff --git a/tools/esp8266/scripts/buildManifest.py b/scripts/buildManifest.py
similarity index 97%
rename from tools/esp8266/scripts/buildManifest.py
rename to scripts/buildManifest.py
index 1fbb2467..9a5411d5 100644
--- a/tools/esp8266/scripts/buildManifest.py
+++ b/scripts/buildManifest.py
@@ -52,4 +52,4 @@ def buildManifest(path, infile, outfile):
fp.close()
-buildManifest("../", "defines.h", "manifest.json")
+buildManifest("", "defines.h", "manifest.json")
diff --git a/tools/esp8266/scripts/getVersion.py b/scripts/getVersion.py
similarity index 98%
rename from tools/esp8266/scripts/getVersion.py
rename to scripts/getVersion.py
index c6372590..2bf5c60a 100644
--- a/tools/esp8266/scripts/getVersion.py
+++ b/scripts/getVersion.py
@@ -70,4 +70,4 @@ def readVersion(path, infile):
print("name=" + versionnumber[:-1] )
-readVersion("../", "defines.h")
+readVersion("", "defines.h")
diff --git a/tools/esp8266/scripts/gh-action-dev-build-flash.html b/scripts/gh-action-dev-build-flash.html
similarity index 100%
rename from tools/esp8266/scripts/gh-action-dev-build-flash.html
rename to scripts/gh-action-dev-build-flash.html
diff --git a/tools/esp8266/src/app.cpp b/src/app.cpp
similarity index 100%
rename from tools/esp8266/src/app.cpp
rename to src/app.cpp
diff --git a/tools/esp8266/src/app.h b/src/app.h
similarity index 99%
rename from tools/esp8266/src/app.h
rename to src/app.h
index 7dadc298..ab731b3d 100644
--- a/tools/esp8266/src/app.h
+++ b/src/app.h
@@ -6,7 +6,7 @@
#ifndef __APP_H__
#define __APP_H__
-#include "src/utils/dbg.h"
+#include "utils/dbg.h"
#include "Arduino.h"
diff --git a/tools/esp8266/src/config/config.h b/src/config/config.h
similarity index 100%
rename from tools/esp8266/src/config/config.h
rename to src/config/config.h
diff --git a/tools/esp8266/src/config/config_override_example.h b/src/config/config_override_example.h
similarity index 100%
rename from tools/esp8266/src/config/config_override_example.h
rename to src/config/config_override_example.h
diff --git a/tools/esp8266/src/config/eep.h b/src/config/eep.h
similarity index 100%
rename from tools/esp8266/src/config/eep.h
rename to src/config/eep.h
diff --git a/tools/esp8266/src/defines.h b/src/defines.h
similarity index 100%
rename from tools/esp8266/src/defines.h
rename to src/defines.h
diff --git a/tools/esp8266/src/hm/CircularBuffer.h b/src/hm/CircularBuffer.h
similarity index 100%
rename from tools/esp8266/src/hm/CircularBuffer.h
rename to src/hm/CircularBuffer.h
diff --git a/tools/esp8266/src/hm/hmDefines.h b/src/hm/hmDefines.h
similarity index 100%
rename from tools/esp8266/src/hm/hmDefines.h
rename to src/hm/hmDefines.h
diff --git a/tools/esp8266/src/hm/hmInverter.h b/src/hm/hmInverter.h
similarity index 100%
rename from tools/esp8266/src/hm/hmInverter.h
rename to src/hm/hmInverter.h
diff --git a/tools/esp8266/src/hm/hmRadio.h b/src/hm/hmRadio.h
similarity index 100%
rename from tools/esp8266/src/hm/hmRadio.h
rename to src/hm/hmRadio.h
diff --git a/tools/esp8266/src/hm/hmSystem.h b/src/hm/hmSystem.h
similarity index 100%
rename from tools/esp8266/src/hm/hmSystem.h
rename to src/hm/hmSystem.h
diff --git a/tools/esp8266/main.cpp b/src/main.cpp
similarity index 91%
rename from tools/esp8266/main.cpp
rename to src/main.cpp
index 366d2f1c..ea708282 100644
--- a/tools/esp8266/main.cpp
+++ b/src/main.cpp
@@ -3,9 +3,9 @@
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
//-----------------------------------------------------------------------------
-#include "src/utils/dbg.h"
-#include "src/app.h"
-#include "src/config/config.h"
+#include "utils/dbg.h"
+#include "app.h"
+#include "config/config.h"
app myApp;
diff --git a/tools/esp8266/platformio.ini b/src/platformio.ini
similarity index 98%
rename from tools/esp8266/platformio.ini
rename to src/platformio.ini
index 7a5946d6..71e5f329 100644
--- a/tools/esp8266/platformio.ini
+++ b/src/platformio.ini
@@ -28,8 +28,8 @@ build_flags =
monitor_speed = 115200
extra_scripts =
- pre:scripts/auto_firmware_version.py
- pre:html/convert.py
+ pre:../scripts/auto_firmware_version.py
+ pre:web/html/convert.py
lib_deps =
https://github.com/yubox-node-org/ESPAsyncWebServer
diff --git a/tools/esp8266/src/utils/crc.cpp b/src/utils/crc.cpp
similarity index 100%
rename from tools/esp8266/src/utils/crc.cpp
rename to src/utils/crc.cpp
diff --git a/tools/esp8266/src/utils/crc.h b/src/utils/crc.h
similarity index 100%
rename from tools/esp8266/src/utils/crc.h
rename to src/utils/crc.h
diff --git a/tools/esp8266/src/utils/dbg.cpp b/src/utils/dbg.cpp
similarity index 100%
rename from tools/esp8266/src/utils/dbg.cpp
rename to src/utils/dbg.cpp
diff --git a/tools/esp8266/src/utils/dbg.h b/src/utils/dbg.h
similarity index 100%
rename from tools/esp8266/src/utils/dbg.h
rename to src/utils/dbg.h
diff --git a/tools/esp8266/html/api.js b/src/web/html/api.js
similarity index 100%
rename from tools/esp8266/html/api.js
rename to src/web/html/api.js
diff --git a/tools/esp8266/html/convert.py b/src/web/html/convert.py
old mode 100755
new mode 100644
similarity index 97%
rename from tools/esp8266/html/convert.py
rename to src/web/html/convert.py
index eb41fb7b..2f2ac24b
--- a/tools/esp8266/html/convert.py
+++ b/src/web/html/convert.py
@@ -65,8 +65,9 @@ def convert2Header(inFile, compress):
# delete all files in the 'h' dir, but ignore 'favicon_ico_gz.h'
dir = 'h'
+print(os.getcwd())
if os.getcwd()[-4:] != "html":
- dir = "html/" + dir
+ dir = "web/html/" + dir
for f in os.listdir(dir):
if not f.startswith('favicon_ico_gz'):
@@ -74,7 +75,7 @@ for f in os.listdir(dir):
# grab all files with following extensions
if os.getcwd()[-4:] != "html":
- os.chdir('./html')
+ os.chdir('./web/html')
types = ('*.html', '*.css', '*.js') # the tuple of file types
files_grabbed = []
for files in types:
diff --git a/src/web/html/favicon.ico b/src/web/html/favicon.ico
new file mode 100644
index 00000000..cb159e2b
Binary files /dev/null and b/src/web/html/favicon.ico differ
diff --git a/tools/esp8266/html/h/favicon_ico_gz.h b/src/web/html/h/favicon_ico_gz.h
similarity index 100%
rename from tools/esp8266/html/h/favicon_ico_gz.h
rename to src/web/html/h/favicon_ico_gz.h
diff --git a/tools/esp8266/html/index.html b/src/web/html/index.html
similarity index 100%
rename from tools/esp8266/html/index.html
rename to src/web/html/index.html
diff --git a/tools/esp8266/html/login.html b/src/web/html/login.html
similarity index 100%
rename from tools/esp8266/html/login.html
rename to src/web/html/login.html
diff --git a/tools/esp8266/html/serial.html b/src/web/html/serial.html
similarity index 100%
rename from tools/esp8266/html/serial.html
rename to src/web/html/serial.html
diff --git a/tools/esp8266/html/setup.html b/src/web/html/setup.html
similarity index 100%
rename from tools/esp8266/html/setup.html
rename to src/web/html/setup.html
diff --git a/tools/esp8266/html/style.css b/src/web/html/style.css
similarity index 100%
rename from tools/esp8266/html/style.css
rename to src/web/html/style.css
diff --git a/tools/esp8266/html/system.html b/src/web/html/system.html
similarity index 100%
rename from tools/esp8266/html/system.html
rename to src/web/html/system.html
diff --git a/tools/esp8266/html/update.html b/src/web/html/update.html
similarity index 100%
rename from tools/esp8266/html/update.html
rename to src/web/html/update.html
diff --git a/tools/esp8266/html/visualization.html b/src/web/html/visualization.html
similarity index 100%
rename from tools/esp8266/html/visualization.html
rename to src/web/html/visualization.html
diff --git a/tools/esp8266/src/web/mqtt.h b/src/web/mqtt.h
similarity index 100%
rename from tools/esp8266/src/web/mqtt.h
rename to src/web/mqtt.h
diff --git a/tools/esp8266/src/web/web.cpp b/src/web/web.cpp
similarity index 98%
rename from tools/esp8266/src/web/web.cpp
rename to src/web/web.cpp
index 9220bc02..7fbb10eb 100644
--- a/tools/esp8266/src/web/web.cpp
+++ b/src/web/web.cpp
@@ -10,16 +10,16 @@
#include "web.h"
-#include "../../html/h/index_html.h"
-#include "../../html/h/login_html.h"
-#include "../../html/h/style_css.h"
-#include "../../html/h/api_js.h"
-#include "../../html/h/favicon_ico_gz.h"
-#include "../../html/h/setup_html.h"
-#include "../../html/h/visualization_html.h"
-#include "../../html/h/update_html.h"
-#include "../../html/h/serial_html.h"
-#include "../../html/h/system_html.h"
+#include "html/h/index_html.h"
+#include "html/h/login_html.h"
+#include "html/h/style_css.h"
+#include "html/h/api_js.h"
+#include "html/h/favicon_ico_gz.h"
+#include "html/h/setup_html.h"
+#include "html/h/visualization_html.h"
+#include "html/h/update_html.h"
+#include "html/h/serial_html.h"
+#include "html/h/system_html.h"
const char* const pinArgNames[] = {"pinCs", "pinCe", "pinIrq", "pinLed0", "pinLed1"};
diff --git a/tools/esp8266/src/web/web.h b/src/web/web.h
similarity index 100%
rename from tools/esp8266/src/web/web.h
rename to src/web/web.h
diff --git a/tools/esp8266/src/web/webApi.cpp b/src/web/webApi.cpp
similarity index 100%
rename from tools/esp8266/src/web/webApi.cpp
rename to src/web/webApi.cpp
diff --git a/tools/esp8266/src/web/webApi.h b/src/web/webApi.h
similarity index 100%
rename from tools/esp8266/src/web/webApi.h
rename to src/web/webApi.h
diff --git a/tools/esp8266/src/wifi/ahoywifi.cpp b/src/wifi/ahoywifi.cpp
similarity index 100%
rename from tools/esp8266/src/wifi/ahoywifi.cpp
rename to src/wifi/ahoywifi.cpp
diff --git a/tools/esp8266/src/wifi/ahoywifi.h b/src/wifi/ahoywifi.h
similarity index 100%
rename from tools/esp8266/src/wifi/ahoywifi.h
rename to src/wifi/ahoywifi.h
diff --git a/tools/esp8266/.gitignore b/tools/esp8266/.gitignore
deleted file mode 100644
index 3e881135..00000000
--- a/tools/esp8266/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.pio
-.vscode/.browse.c_cpp.db*
-.vscode/c_cpp_properties.json
-.vscode/launch.json
-.vscode/ipch
-config_override.h