mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 16:36:38 +02:00
refactored directory structure
This commit is contained in:
parent
58bc1f1d8a
commit
fbad251236
46 changed files with 47 additions and 66 deletions
21
.github/workflows/compile_development.yml
vendored
21
.github/workflows/compile_development.yml
vendored
|
@ -43,16 +43,16 @@ jobs:
|
||||||
pip install --upgrade platformio
|
pip install --upgrade platformio
|
||||||
|
|
||||||
- name: Convert HTML files
|
- name: Convert HTML files
|
||||||
working-directory: tools/esp8266/html
|
working-directory: src/web/html
|
||||||
run: python convert.py
|
run: python convert.py
|
||||||
|
|
||||||
- name: Run PlatformIO
|
- 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
|
- name: Rename Binary files
|
||||||
id: rename-binary-files
|
id: rename-binary-files
|
||||||
working-directory: tools/esp8266/scripts
|
working-directory: src
|
||||||
run: python getVersion.py >> $GITHUB_OUTPUT
|
run: python ../scripts/getVersion.py >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set Version
|
- name: Set Version
|
||||||
uses: cschleiden/replace-tokens@v1
|
uses: cschleiden/replace-tokens@v1
|
||||||
|
@ -62,18 +62,15 @@ jobs:
|
||||||
VERSION: ${{ steps.rename-binary-files.outputs.name }}
|
VERSION: ${{ steps.rename-binary-files.outputs.name }}
|
||||||
|
|
||||||
- name: Create Manifest
|
- name: Create Manifest
|
||||||
working-directory: tools/esp8266/scripts
|
working-directory: src
|
||||||
run: python buildManifest.py
|
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
|
- name: Create Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.rename-binary-files.outputs.name }}_dev_build
|
name: ${{ steps.rename-binary-files.outputs.name }}_dev_build
|
||||||
path: |
|
path: |
|
||||||
tools/esp8266/firmware/*
|
src/firmware/*
|
||||||
tools/esp8266/User_Manual.md
|
src/User_Manual.md
|
||||||
tools/esp8266/install.html
|
src/install.html
|
||||||
|
|
||||||
#./${{ steps.rename-binary-files.outputs.name }}.zip
|
|
||||||
|
|
||||||
|
|
27
.gitignore
vendored
27
.gitignore
vendored
|
@ -1,24 +1,13 @@
|
||||||
CMakeLists.txt.user
|
.pio
|
||||||
CMakeCache.txt
|
.vscode/.browse.c_cpp.db*
|
||||||
CMakeFiles
|
.vscode/c_cpp_properties.json
|
||||||
CMakeScripts
|
.vscode/launch.json
|
||||||
Testing
|
.vscode/ipch
|
||||||
Makefile
|
.vscode/extensions.json
|
||||||
cmake_install.cmake
|
src/config/config_override.h
|
||||||
install_manifest.txt
|
src/html/h/*
|
||||||
compile_commands.json
|
|
||||||
CTestTestfile.cmake
|
|
||||||
_deps
|
|
||||||
build
|
|
||||||
tools/esp8266/tmp
|
|
||||||
tools/esp8266/binaries
|
|
||||||
/**/Debug
|
/**/Debug
|
||||||
/**/v16/*
|
/**/v16/*
|
||||||
*.db
|
*.db
|
||||||
*.suo
|
*.suo
|
||||||
*.ipch
|
*.ipch
|
||||||
tools/esp8266/.vscode/extensions.json
|
|
||||||
.DS_Store
|
|
||||||
.vscode
|
|
||||||
tools/esp8266/platformio-device-monitor-*.log
|
|
||||||
tools/esp8266/html/h/*
|
|
|
@ -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
|
#### 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 +).<br/>
|
Watch out, there are some fake NRF24L01+ Modules out there that seem to use rebranded NRF24L01 Chips (without the +).<br/>
|
||||||
An example can be found in [Issue #230](https://github.com/grindylow/ahoy/issues/230).<br/>
|
An example can be found in [Issue #230](https://github.com/lumapu/ahoy/issues/230).<br/>
|
||||||
You are welcome to add more examples of faked chips. We will add that information here.<br/>
|
You are welcome to add more examples of faked chips. We will add that information here.<br/>
|
||||||
|
|
||||||
## Wiring things up
|
## Wiring things up
|
||||||
|
@ -112,11 +112,11 @@ This is an example wiring using a Wemos D1 mini.<br>
|
||||||
|
|
||||||
##### Schematic
|
##### Schematic
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
##### Symbolic view
|
##### Symbolic view
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### ESP32 wiring example
|
#### ESP32 wiring example
|
||||||
|
|
||||||
|
@ -124,11 +124,11 @@ Example wiring for a 38pin ESP32 module
|
||||||
|
|
||||||
##### Schematic
|
##### Schematic
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
##### Symbolic view
|
##### Symbolic view
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
##### ESP32 GPIO settings
|
##### ESP32 GPIO settings
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
|
|
||||||
List of approaches
|
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/)
|
- [Arduino Nano, C++](tools/nano/NRF24_SendRcv/)
|
||||||
- [Raspberry Pi, Python](tools/rpi/)
|
- [Raspberry Pi, Python](tools/rpi/)
|
||||||
- [Others, C/C++](tools/nano/NRF24_SendRcv/)
|
- [Others, C/C++](tools/nano/NRF24_SendRcv/)
|
||||||
|
|
||||||
## Quick Start with ESP8266
|
## Quick Start with ESP8266
|
||||||
- [Go here ✨](tools/esp8266/README.md#things-needed)
|
- [Go here ✨](Getting_Started.md#things-needed)
|
||||||
|
|
||||||
|
|
||||||
## Success Stories
|
## Success Stories
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# User Manual Ahoy DTU (on ESP8266)
|
# User Manual Ahoy DTU (on ESP8266)
|
||||||
Version #{VERSION}#
|
Version #{VERSION}#
|
||||||
## Introduction
|
## Introduction
|
||||||
See the repository [README.md](README.md)
|
See the repository [README.md](Getting_Started.md)
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
Assuming you have a running ahoy-dtu and you can access the setup page.
|
Assuming you have a running ahoy-dtu and you can access the setup page.
|
|
@ -17,7 +17,7 @@ from dulwich import porcelain
|
||||||
|
|
||||||
def get_firmware_specifier_build_flag():
|
def get_firmware_specifier_build_flag():
|
||||||
try:
|
try:
|
||||||
build_version = porcelain.describe('../../') # refers to the repository root dir
|
build_version = porcelain.describe('../') # refers to the repository root dir
|
||||||
except:
|
except:
|
||||||
build_version = "g0000000"
|
build_version = "g0000000"
|
||||||
|
|
|
@ -52,4 +52,4 @@ def buildManifest(path, infile, outfile):
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
||||||
|
|
||||||
buildManifest("../", "defines.h", "manifest.json")
|
buildManifest("", "defines.h", "manifest.json")
|
|
@ -70,4 +70,4 @@ def readVersion(path, infile):
|
||||||
print("name=" + versionnumber[:-1] )
|
print("name=" + versionnumber[:-1] )
|
||||||
|
|
||||||
|
|
||||||
readVersion("../", "defines.h")
|
readVersion("", "defines.h")
|
|
@ -6,7 +6,7 @@
|
||||||
#ifndef __APP_H__
|
#ifndef __APP_H__
|
||||||
#define __APP_H__
|
#define __APP_H__
|
||||||
|
|
||||||
#include "src/utils/dbg.h"
|
#include "utils/dbg.h"
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "src/utils/dbg.h"
|
#include "utils/dbg.h"
|
||||||
#include "src/app.h"
|
#include "app.h"
|
||||||
#include "src/config/config.h"
|
#include "config/config.h"
|
||||||
|
|
||||||
|
|
||||||
app myApp;
|
app myApp;
|
|
@ -28,8 +28,8 @@ build_flags =
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
extra_scripts =
|
extra_scripts =
|
||||||
pre:scripts/auto_firmware_version.py
|
pre:../scripts/auto_firmware_version.py
|
||||||
pre:html/convert.py
|
pre:web/html/convert.py
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://github.com/yubox-node-org/ESPAsyncWebServer
|
https://github.com/yubox-node-org/ESPAsyncWebServer
|
5
tools/esp8266/html/convert.py → src/web/html/convert.py
Executable file → Normal file
5
tools/esp8266/html/convert.py → src/web/html/convert.py
Executable file → Normal file
|
@ -65,8 +65,9 @@ def convert2Header(inFile, compress):
|
||||||
|
|
||||||
# delete all files in the 'h' dir, but ignore 'favicon_ico_gz.h'
|
# delete all files in the 'h' dir, but ignore 'favicon_ico_gz.h'
|
||||||
dir = 'h'
|
dir = 'h'
|
||||||
|
print(os.getcwd())
|
||||||
if os.getcwd()[-4:] != "html":
|
if os.getcwd()[-4:] != "html":
|
||||||
dir = "html/" + dir
|
dir = "web/html/" + dir
|
||||||
|
|
||||||
for f in os.listdir(dir):
|
for f in os.listdir(dir):
|
||||||
if not f.startswith('favicon_ico_gz'):
|
if not f.startswith('favicon_ico_gz'):
|
||||||
|
@ -74,7 +75,7 @@ for f in os.listdir(dir):
|
||||||
|
|
||||||
# grab all files with following extensions
|
# grab all files with following extensions
|
||||||
if os.getcwd()[-4:] != "html":
|
if os.getcwd()[-4:] != "html":
|
||||||
os.chdir('./html')
|
os.chdir('./web/html')
|
||||||
types = ('*.html', '*.css', '*.js') # the tuple of file types
|
types = ('*.html', '*.css', '*.js') # the tuple of file types
|
||||||
files_grabbed = []
|
files_grabbed = []
|
||||||
for files in types:
|
for files in types:
|
BIN
src/web/html/favicon.ico
Normal file
BIN
src/web/html/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -10,16 +10,16 @@
|
||||||
|
|
||||||
#include "web.h"
|
#include "web.h"
|
||||||
|
|
||||||
#include "../../html/h/index_html.h"
|
#include "html/h/index_html.h"
|
||||||
#include "../../html/h/login_html.h"
|
#include "html/h/login_html.h"
|
||||||
#include "../../html/h/style_css.h"
|
#include "html/h/style_css.h"
|
||||||
#include "../../html/h/api_js.h"
|
#include "html/h/api_js.h"
|
||||||
#include "../../html/h/favicon_ico_gz.h"
|
#include "html/h/favicon_ico_gz.h"
|
||||||
#include "../../html/h/setup_html.h"
|
#include "html/h/setup_html.h"
|
||||||
#include "../../html/h/visualization_html.h"
|
#include "html/h/visualization_html.h"
|
||||||
#include "../../html/h/update_html.h"
|
#include "html/h/update_html.h"
|
||||||
#include "../../html/h/serial_html.h"
|
#include "html/h/serial_html.h"
|
||||||
#include "../../html/h/system_html.h"
|
#include "html/h/system_html.h"
|
||||||
|
|
||||||
const char* const pinArgNames[] = {"pinCs", "pinCe", "pinIrq", "pinLed0", "pinLed1"};
|
const char* const pinArgNames[] = {"pinCs", "pinCe", "pinIrq", "pinLed0", "pinLed1"};
|
||||||
|
|
6
tools/esp8266/.gitignore
vendored
6
tools/esp8266/.gitignore
vendored
|
@ -1,6 +0,0 @@
|
||||||
.pio
|
|
||||||
.vscode/.browse.c_cpp.db*
|
|
||||||
.vscode/c_cpp_properties.json
|
|
||||||
.vscode/launch.json
|
|
||||||
.vscode/ipch
|
|
||||||
config_override.h
|
|
Loading…
Add table
Add a link
Reference in a new issue