diff --git a/.gitignore b/.gitignore index 2a0d80f..b71bf55 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ test/*.md test/env/* test/configure_*.py TODO.md -docs/_build/* +src_docs/_build/* data/*.min.htm diff --git a/docs/_sources/backlog.rst.txt b/docs/_sources/backlog.rst.txt index c5ff5b2..6c3cc2a 100644 --- a/docs/_sources/backlog.rst.txt +++ b/docs/_sources/backlog.rst.txt @@ -4,11 +4,8 @@ Backlog of changes Documentation ------------- -- Create page with list of releases - Updates over OTA (from PC) -- Write compile instructions - Write contribution instructions -- publish docs Code ------------- diff --git a/docs/_sources/compiling.rst.txt b/docs/_sources/compiling.rst.txt index 774b8f9..1ee7874 100644 --- a/docs/_sources/compiling.rst.txt +++ b/docs/_sources/compiling.rst.txt @@ -1,21 +1,93 @@ Compiling the software ----------------------- -This section is under construction. - - -VSCODE + PlatformIO -============================= +Tools +===== +I use the following tools in order to build and manage the software: +* Visual Studio Code +* PlatformIO +* Git for Windows +* VSCode plugin: Minify (used to minimise the html files) Targets -============================= +======= +In the repository there are 3 targets defined +* gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled. +* gravity-release; Standard release +* gravity-perf; Standard release but contains code for measuring performance Source structure -============================= +================ +.. list-table:: Directory structure + :widths: 40 60 + :header-rows: 1 + + * - path + - content + * - /bin + - Contains compiled binaries + * - /data + - Directory for flashing device filesystem + * - /doc + - Various external documents used as input + * - /docs + - Folder published to github pages + * - /html + - Source for html files + * - /img + - Images uses in README.md + * - /lib + - External libraries used when compiling + * - /script + - Scripts used in build process + * - /src + - Source code for software + * - /src_docs + - Source code for documentation + * - /stl + - 3d models + * - /test + - Test data for developing html files Options -============================= +======= +This is a list of C++ defines that is used to enable/disable functions in the code. + +.. list-table:: Defines + :widths: 40 60 + :header-rows: 1 + + * - define + - description + * - ACTIVATE_OTA + - Enables the OTA functionallity in the code + * - USE_GYRO_TEMP + - Uses temperature from gyro instead of DS18B20 (experimental) + * - SKIP_SLEEPMODE + - THe device never goes into sleep mode, useful when developing. + * - CFG_DISABLE_LOGGING + - Done include verbose logging in Config class. Excessive logging may crash device. + * - GYRO_DISABLE_LOGGING + - Done include verbose logging in Gyro class. Excessive logging may crash device. + * - PUSH_DISABLE_LOGGING + - Done include verbose logging in PushTarget class. Excessive logging may crash device. + * - TSEN_DISABLE_LOGGING + - Done include verbose logging in TempSensor class. Excessive logging may crash device. + * - WEB_DISABLE_LOGGING + - Done include verbose logging in WebServer class. Excessive logging may crash device. + * - MAIN_DISABLE_LOGGING + - Done include verbose logging in Main class. Excessive logging may crash device. + * - USE_LITTLEFS + - Use the new filesystem in Ardurino + * - EMBED_HTML + - Html files are included in code, if not defined they are served from the file system. + * - USER_SSID + - If defined the device will always use this SSID + * - USER_SSID_PWD + - Password to the SSID + * - CFG_APPVER + - Defines the version of the compiled software diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt index e26b84a..1707bc5 100644 --- a/docs/_sources/index.rst.txt +++ b/docs/_sources/index.rst.txt @@ -21,7 +21,8 @@ projects based on esp8266 and also started to brew beer so this combination was The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation. -My approach to this software is a little different from that the original ispindle firmware. +My approach to this software is a little different from that the original ispindle firmware. The github repository can +be found here; https://github.com/mp-se/gravitymon .. note:: @@ -52,23 +53,59 @@ Credits to This software uses the following libraries and without these this would have been much more difficult to acheive: * https://github.com/jrowberg/i2cdevlib.git + + This library contains the basic code to interact with the gyro + many more chips. + * https://github.com/codeplea/tinyexpr + + Proccess the gravity formula and calculate the gravity and various corrections. + * https://github.com/graphitemaster/incbin + + Include binary files into the code, used to service html files. + * https://github.com/khoih-prog/ESP_DoubleResetDetector + + Can detect if the reset button is pressed twice, is used to enter WIFI config mode. + * https://github.com/tzapu/WiFiManager + + Configure wifi settings. + * https://github.com/thijse/Arduino-Log + + Logging library for handling different loglevels and configure what sent over the serial. + * https://github.com/bblanchon/ArduinoJson + + Json parser/creator used in configuration files and API's + * https://github.com/PaulStoffregen/OneWire + + Communication library used for interacting with temperature sensor. + * https://github.com/milesburton/Arduino-Temperature-Control-Library + + Interaction with the DS18B20 sensor + * https://github.com/Rotario/arduinoCurveFitting + + Create the gravity formula. + * https://graphjs.com/ + + Render the graphs in the UI. + * https://getbootstrap.com/ + CSS templates for the web page. + .. toctree:: :maxdepth: 2 :caption: Contents: + releases functionallity installation configuration diff --git a/docs/_sources/installation.rst.txt b/docs/_sources/installation.rst.txt index 16ff458..2193b32 100644 --- a/docs/_sources/installation.rst.txt +++ b/docs/_sources/installation.rst.txt @@ -13,20 +13,33 @@ The basic command for flashing is; In the /bin directory you will find 3 different firmware builds; -* firmware.bin - This is the standard release build (prefered version) -* firmware-perf.bin - This version also submits performance data to an influx database with detailed execution times. -* firmware-debug.bin - Development build. Not recommended for normal use. +* **firmware.bin** + + This is the standard release build (prefered version) + +* **firmware-perf.bin** + + This version also submits performance data to an influx database with detailed execution times. + +* **firmware-debug.bin** + + Development build. Not recommended for normal use. In these versions all the html files are embedded in the binaries. The file system is currently only used for storing the configuration file. -If the software becomes so large the html files can be moved to the file system, but this is not enabled by default. This makes -installation much easier and ensure that html files and code is in sync. +If the software becomes so large the html files can be moved to the file system, but this is not enabled by +default (see compiling for details). This approach makes installation much easier and ensure that html files +and code is in sync. Configuring WIFI ================ -When the device is flashed it will need to have WIFI configuration in order to work. If this is not configured in the device it will create an wirless access point called `GravMon`. +When the device is flashed it will need to have WIFI configuration in order to work. If you have used other software on +the device its possible that wifi settings exist. + +If this is not configured in the device it will create an wirless access point called `GravMon`. Connect to this AP and +enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress +in the browser: **http://192.168.4.1** -Connect to this AP and enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress in the browser: **http://192.168.4.1** diff --git a/docs/_sources/releases.rst.txt b/docs/_sources/releases.rst.txt new file mode 100644 index 0000000..d4b21bd --- /dev/null +++ b/docs/_sources/releases.rst.txt @@ -0,0 +1,9 @@ +Releases +------------ + +There is not yet any releases publised. + +Latest stable development version is: **v0.4.0** + +https://github.com/mp-se/gravitymon/releases/tag/v0.4.0 + diff --git a/docs/backlog.html b/docs/backlog.html index 95adfc2..216413f 100644 --- a/docs/backlog.html +++ b/docs/backlog.html @@ -38,6 +38,7 @@