diff --git a/.gitignore b/.gitignore
index 45469f0..43023a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -93,4 +93,9 @@ fabric.properties
.idea/
docs/.build/html/
-docs/.build/doctrees/
\ No newline at end of file
+docs/.build/doctrees/
+/.pio
+/.vscode
+
+cmake-build-*
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce506e8..0c24ce6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,41 +1,70 @@
+# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE
+# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
+#
+# If you need to override existing CMake configuration or add extra,
+# please create `CMakeListsUser.txt` in the root of project.
+# The `CMakeListsUser.txt` will not be overwritten by PlatformIO.
+
cmake_minimum_required(VERSION 3.2)
-project(tiltbridge)
+project("tiltbridge")
include(CMakeListsPrivate.txt)
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsUser.txt)
+include(CMakeListsUser.txt)
+endif()
+
add_custom_target(
PLATFORMIO_BUILD ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run
+ COMMAND ${PLATFORMIO_CMD} -f -c clion run "$<$>:-e${CMAKE_BUILD_TYPE}>"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_custom_target(
+ PLATFORMIO_BUILD_VERBOSE ALL
+ COMMAND ${PLATFORMIO_CMD} -f -c clion run --verbose "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
PLATFORMIO_UPLOAD ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target upload
+ COMMAND ${PLATFORMIO_CMD} -f -c clion run --target upload "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
PLATFORMIO_CLEAN ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target clean
+ COMMAND ${PLATFORMIO_CMD} -f -c clion run --target clean "$<$>:-e${CMAKE_BUILD_TYPE}>"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_custom_target(
+ PLATFORMIO_MONITOR ALL
+ COMMAND ${PLATFORMIO_CMD} -f -c clion device monitor "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
PLATFORMIO_TEST ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion test
+ COMMAND ${PLATFORMIO_CMD} -f -c clion test "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
PLATFORMIO_PROGRAM ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target program
+ COMMAND ${PLATFORMIO_CMD} -f -c clion run --target program "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_target(
PLATFORMIO_UPLOADFS ALL
- COMMAND ${PLATFORMIO_CMD} -f -c clion run --target uploadfs
+ COMMAND ${PLATFORMIO_CMD} -f -c clion run --target uploadfs "$<$>:-e${CMAKE_BUILD_TYPE}>"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_custom_target(
+ PLATFORMIO_BUILD_DEBUG ALL
+ COMMAND ${PLATFORMIO_CMD} -f -c clion run --target debug "$<$>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
@@ -51,4 +80,10 @@ add_custom_target(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
-add_executable(${PROJECT_NAME} ${SRC_LIST})
+add_custom_target(
+ PLATFORMIO_DEVICE_LIST ALL
+ COMMAND ${PLATFORMIO_CMD} -f -c clion device list
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_executable(Z_DUMMY_TARGET ${SRC_LIST})
diff --git a/CMakeListsUser.txt b/CMakeListsUser.txt
new file mode 100644
index 0000000..068e0ac
--- /dev/null
+++ b/CMakeListsUser.txt
@@ -0,0 +1,32 @@
+
+
+set(COPY_CMD "cp")
+set(RM_CMD "rm")
+
+
+add_custom_target(
+ PLATFORMIO_COPY_BUILT_FIRMWARE
+
+# TODO - Figure out how to ignore the return value if there aren't files already present with these filenames
+# COMMAND ${RM_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/bin/lcd_ssd1306_firmware.bin"
+# COMMAND ${RM_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/bin/lcd_ssd1306_partitions.bin"
+# COMMAND ${RM_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/bin/lcd_ssd1306_spiffs.bin"
+
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/lcd_ssd1306/firmware.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/lcd_ssd1306_firmware.bin"
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/lcd_ssd1306/partitions.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/lcd_ssd1306_partitions.bin"
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/lcd_ssd1306/spiffs.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/lcd_ssd1306_spiffs.bin"
+
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/d32_pro_tft/firmware.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/d32_pro_tft_firmware.bin"
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/d32_pro_tft/partitions.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/d32_pro_tft_partitions.bin"
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/d32_pro_tft/spiffs.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/d32_pro_tft_spiffs.bin"
+
+# COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/m5_stack_tft/firmware.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/m5_stack_tft_firmware.bin"
+# COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/m5_stack_tft/partitions.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/m5_stack_tft_partitions.bin"
+# COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/m5_stack_tft/spiffs.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/m5_stack_tft_spiffs.bin"
+
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/tft_espi/firmware.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/tft_espi_firmware.bin"
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/tft_espi/partitions.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/tft_espi_partitions.bin"
+ COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/.pio/build/tft_espi/spiffs.bin" "${CMAKE_CURRENT_SOURCE_DIR}/bin/tft_espi_spiffs.bin"
+
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
\ No newline at end of file
diff --git a/README.md b/README.md
index b5def89..9304696 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,9 @@ TiltBridge automatically logs your data to the following cloud data services:
* [Fermentrack](https://www.fermentrack.com/)
* [Brewer's Friend](http://www.brewersfriend.com/)
+* [Brewfather](https://brewfather.app)
* Google Sheets
+* [Brewstatus](https://brewstat.us)
#### Features
@@ -30,8 +32,17 @@ TiltBridge automatically logs your data to the following cloud data services:
Building a TiltBridge is simple - the hardest decision in most cases is the enclosure. For more information, read the [documentation](http://docs.tiltbridge.com/).
+Once you've acquired your hardware, simply flash the TiltBridge firmware with [Fermentrack](http://www.fermentrack.com/) or [BrewFlasher](http://www.brewflasher.com/). Easy!
+
#### Requirements
-TiltBridge requires an ESP32-based controller, properly flashed with the TiltBridge firmware.
+TiltBridge requires an ESP32-based controller properly flashed with the TiltBridge firmware.
+
+
+### Support TiltBridge
+
+Interested in supporting TiltBridge? Buy a [sticker](https://www.tindie.com/products/thorrak/tiltbridge-sticker/) (or a [magnet](https://www.tindie.com/products/thorrak/tiltbridge-magnet/))!
+
+
diff --git a/bin/boot_app0.bin b/bin/boot_app0.bin
new file mode 100644
index 0000000..13562ca
Binary files /dev/null and b/bin/boot_app0.bin differ
diff --git a/bin/bootloader_dio_40m.bin b/bin/bootloader_dio_40m.bin
new file mode 100644
index 0000000..db78e6f
Binary files /dev/null and b/bin/bootloader_dio_40m.bin differ
diff --git a/bin/d32_pro_tft_firmware.bin b/bin/d32_pro_tft_firmware.bin
new file mode 100644
index 0000000..fae0b8a
Binary files /dev/null and b/bin/d32_pro_tft_firmware.bin differ
diff --git a/bin/partitions.bin b/bin/d32_pro_tft_partitions.bin
similarity index 93%
rename from bin/partitions.bin
rename to bin/d32_pro_tft_partitions.bin
index aa81d02..45bdcfb 100644
Binary files a/bin/partitions.bin and b/bin/d32_pro_tft_partitions.bin differ
diff --git a/bin/d32_pro_tft_spiffs.bin b/bin/d32_pro_tft_spiffs.bin
new file mode 100644
index 0000000..78a7e00
Binary files /dev/null and b/bin/d32_pro_tft_spiffs.bin differ
diff --git a/bin/firmware.bin b/bin/firmware.bin
deleted file mode 100644
index bf38ba9..0000000
Binary files a/bin/firmware.bin and /dev/null differ
diff --git a/bin/lcd_ssd1306_firmware.bin b/bin/lcd_ssd1306_firmware.bin
new file mode 100644
index 0000000..6c230ab
Binary files /dev/null and b/bin/lcd_ssd1306_firmware.bin differ
diff --git a/bin/lcd_ssd1306_partitions.bin b/bin/lcd_ssd1306_partitions.bin
new file mode 100644
index 0000000..94a1995
Binary files /dev/null and b/bin/lcd_ssd1306_partitions.bin differ
diff --git a/bin/lcd_ssd1306_spiffs.bin b/bin/lcd_ssd1306_spiffs.bin
new file mode 100644
index 0000000..1701dc3
Binary files /dev/null and b/bin/lcd_ssd1306_spiffs.bin differ
diff --git a/bin/spiffs.bin b/bin/spiffs.bin
deleted file mode 100644
index 513a1fc..0000000
Binary files a/bin/spiffs.bin and /dev/null differ
diff --git a/bin/tft_espi_firmware.bin b/bin/tft_espi_firmware.bin
new file mode 100644
index 0000000..3c913c3
Binary files /dev/null and b/bin/tft_espi_firmware.bin differ
diff --git a/bin/tft_espi_partitions.bin b/bin/tft_espi_partitions.bin
new file mode 100644
index 0000000..94a1995
Binary files /dev/null and b/bin/tft_espi_partitions.bin differ
diff --git a/bin/tft_espi_spiffs.bin b/bin/tft_espi_spiffs.bin
new file mode 100644
index 0000000..1701dc3
Binary files /dev/null and b/bin/tft_espi_spiffs.bin differ
diff --git a/data/about.htm b/data/about.htm
index b47939d..973db9e 100644
--- a/data/about.htm
+++ b/data/about.htm
@@ -38,6 +38,9 @@
Settings
+
+ Calibration
+
About (current)
@@ -69,6 +72,8 @@
TiltBridge documentation and support can be found at the following links:
@@ -91,14 +96,15 @@
- Your TiltBridge can be updated over the internet to the latest version of the TiltBridge
- firmware by clicking the "Update Firmware" button below. Additionally, if you plan on
- relocating your TiltBridge to a new network, you can reset the WiFi connection settings by
- clicking "Reset WiFi".
+
+
+ If you plan on relocating your TiltBridge to a new network, you can reset the WiFi
+ connection settings by clicking "Reset WiFi".
- Update Firmware
+
+ Restart TiltBridge
Reset WiFi
@@ -106,8 +112,6 @@
-
-
diff --git a/data/calibration.htm b/data/calibration.htm
new file mode 100644
index 0000000..78f436d
--- /dev/null
+++ b/data/calibration.htm
@@ -0,0 +1,763 @@
+
+
+
+
+
+
+ TiltBridge - Calibration
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TiltBridge
+
+
+
+
+
+
+
+
+
+Calibration
+
+
+
+
+
+
+
Select the tilt color to delete the current calibration. The current calibration should be deleted before re-calibrating the Tilt.
+
+
+
+
+
+
+
+
+
+
+
+
First, select the tilt color that is being calibrated. Then enter calibration points using the form below. The more points you enter, the more accurate the calibration will be. You need to enter at least two points to generate a linear fit. If you enter more calibration points, a quadratic and then a cubic fit will be estimated. Once you have entered your calibration points the calibration correction is displayed and you can apply it to the selected Tilt.
+
+
+
+
+
+
+
+
+
+
+
+
+
Add a calibration data point.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tilt Gravity
+ Calibration Gravity
+ x0
+ δx0
+ x1
+ δx1
+ x2
+ δx2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/index.htm b/data/index.htm
index 3758e70..82cfc1f 100644
--- a/data/index.htm
+++ b/data/index.htm
@@ -40,6 +40,9 @@
Settings
+
+ Calibration
+
About
@@ -85,7 +88,7 @@ Google Sheets: {{sensor.gsheets_name}}
-
+