diff --git a/.github/workflows/build-datalogger-iot.yml b/.github/workflows/build-datalogger-iot.yml index 5581522..45068d3 100644 --- a/.github/workflows/build-datalogger-iot.yml +++ b/.github/workflows/build-datalogger-iot.yml @@ -1,11 +1,11 @@ name: Build DataLogger Firmware Action -on: +on: push: branches: - main - + workflow_dispatch: - branches: + branches: env: DATALOGGER_IOT_APP_KEY: ${{ secrets.DATALOGGER_IOT_APP_KEY }} @@ -13,25 +13,38 @@ env: jobs: build: - name: Build DataLogger IoT runs-on: ubuntu-latest steps: - name: Checkout Repo and submodules uses: actions/checkout@v3 - - # setup the ssh key used to pull in the Flux submodule source. This was the + with: + ref: main + + # setup the ssh key used to pull in the Flux SDK source. This was the # only way found to make this work when using private models (ssh private key here, public on Flux deploy keys - name: Et Tu Submodule uses: webfactory/ssh-agent@master with: ssh-private-key: | ${{ secrets.FLUX_PULL_KEY_2 }} - - # checkout flux - - name: Checkout Flux submodule - run: git submodule update --init --recursive + + # checkout flux-sdk + - name: Checkout the flux-sdk + run: | + git clone --branch main git@github.com:sparkfun/flux-sdk.git + echo "FLUX_SDK_PATH=`pwd`/flux-sdk" >> $GITHUB_ENV + + # Run cmake - this will build a custom SparkFun_Flux library we can use with + # the Arduino CLI + - name: Run CMake + run: | + echo $FLUX_SDK_PATH + mkdir -p build + cd build + cmake .. + cd .. # Setup Arduino command line - install esp32 and all the libs flux needs - name: Arduino - Install and setup the Arduino CLI @@ -45,33 +58,34 @@ jobs: # Install ESP32 - v2.0.9 (May, 2023) - name: Arduino - Install ESP32 platform - run: arduino-cli core install esp32:esp32 + run: arduino-cli core install esp32:esp32@2.0.14 # install the libraries Flux uses - name: Install Flux dependant libraries. - run: ./SparkFun_Flux/install-libs.sh + run: ./flux-sdk/install-libs.sh - name: Install datalogger libraries run: arduino-cli lib install FastLED ESPAsyncWebSrv - + # Compile time - build the Firmware for the data logger. # Note: # - The use of a full path to flux - this is needed or the build fails (relative paths get merged). # - We are providing a custom partition structure for the ESP32 - + - name: Compile DataLogger firmware binary - run: arduino-cli compile --fqbn esp32:esp32:esp32 ./sfeDataLoggerIoT/sfeDataLoggerIoT.ino - --build-property upload.maximum_size=3145728 --build-property build.flash_size=16MB --build-property build.partitions=partitions - --build-property build.flash_mode=dio --build-property build.flash_freq=80m - --build-property "compiler.cpp.extra_flags=\"-DDATALOGGER_IOT_APP_KEY=$DATALOGGER_IOT_APP_KEY\" \"-DDATALOGGER_IOT_ID_KEY=$DATALOGGER_IOT_ID_KEY\" \"-DBUILD_NUMBER=$GITHUB_RUN_NUMBER\"" - --export-binaries --clean --library `pwd`/SparkFun_Flux + run: + arduino-cli compile --fqbn esp32:esp32:esp32 ./sfeDataLoggerIoT/sfeDataLoggerIoT.ino + --build-property upload.maximum_size=3145728 --build-property build.flash_size=16MB --build-property build.partitions=partitions + --build-property build.flash_mode=dio --build-property build.flash_freq=80m + --build-property "compiler.cpp.extra_flags=\"-DDATALOGGER_IOT_APP_KEY=$DATALOGGER_IOT_APP_KEY\" \"-DDATALOGGER_IOT_ID_KEY=$DATALOGGER_IOT_ID_KEY\" \"-DBUILD_NUMBER=$GITHUB_RUN_NUMBER\"" + --export-binaries --clean --library `pwd`/SparkFun_Flux # - name: Rename Library # run: | # cd sfeDataLoggerIoT/build/esp32.esp32.esp32/ # mv sfeDataLoggerIoT.ino.bin SparkFun_DataLoggerIoT.bin - - # Upload the build files - bootloader, paritions, firmware + + # Upload the build files - bootloader, paritions, firmware - uses: actions/upload-artifact@v3 with: name: sfeDataLoggerIoT-build @@ -81,37 +95,36 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: '3.11' - + python-version: "3.11" + # Setup python packages - name: Setup Python run: | pip3 install setuptools - - - name: Build Python Package + + - name: Build Python Package run: | cd fuse_id python setup.py sdist - + - uses: actions/upload-artifact@v3 with: name: Flash ID CLI Tool path: fuse_id/dist - # now build our burn took production config file - - name: Build product burn config file - run: ./fuse_id/dl_build_conf.py + # - name: Build product burn config file + # run: ./fuse_id/dl_build_conf.py + + # - uses: actions/upload-artifact@v3 + # with: + # name: SparkFunProductionConfig + # path: dl_fuseid.conf - - uses: actions/upload-artifact@v3 - with: - name: SparkFunProductionConfig - path: dl_fuseid.conf - # - name: Compile Sketch # run: arduino-cli compile --fqbn esp32:esp32:esp32 ./Firmware/RTK_Surveyor/RTK_Surveyor.ino # --build-property build.partitions=partitions - # --build-property upload.maximum_size=3145728 + # --build-property upload.maximum_size=3145728 # --build-property "compiler.cpp.extra_flags=\"-DPOINTPERFECT_TOKEN=$POINTPERFECT_TOKEN\" \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\" \"-DENABLE_DEVELOPER=${{ env.ENABLE_DEVELOPER }}\"" # --export-binaries diff --git a/.gitignore b/.gitignore index 88a1b4e..d88a2db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ .venv sfeDataLoggerIoT/build/**/*.ino.* fuse_id/dist -fuse_id/sfe_dl_fuseid.egg-info \ No newline at end of file +fuse_id/sfe_dl_fuseid.egg-info +build/ + +SparkFun_Flux/ diff --git a/.gitmodules b/.gitmodules index 38311d0..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "SparkFun_Flux"] - path = SparkFun_Flux - url = git@github.com:sparkfun/SparkFun_Flux.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ef06194 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,26 @@ +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# +cmake_minimum_required(VERSION 3.13) + +# set project name - setting language to NONE disables the default compiler checks +project(DataLoggerIoT NONE) + +# Import the flux-dk cmake system +include(flux_sdk_import.cmake) + +# Where is directory that the flux stuff will be added to? This is the relative path from this file +# to the aurdiuno sketch directory this is also used as the name of the cmake project +flux_sdk_set_project_directory(.) + +# datalogger is esp32 based +flux_sdk_set_platform(platform_esp32) + +# Currently we are using all modules of the SDK +flux_sdk_add_module(flux_all_modules) + +# now call the init function/macro - this will build the Arduino Library SparkFun_Flux under this +# main directory +flux_sdk_init() diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..7edbb5f --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,27 @@ +SparkFun Data Logger License Information +============================ + +Code +-------- + +MIT License + +Copyright (c) 2022-24 SparkFun Electronics + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/SparkFun_Flux b/SparkFun_Flux deleted file mode 160000 index 5989586..0000000 --- a/SparkFun_Flux +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 59895866ac6d11598a1524d3cb4980f9e803e33b diff --git a/docs/build_update.md b/docs/build_update.md index 2cb62f0..760a1c1 100644 --- a/docs/build_update.md +++ b/docs/build_update.md @@ -1,10 +1,10 @@ # SparkFun DataLogger IoT - Build and Update -![DataLogger Builds](https://github.com/sparkfun/SparkFun_DataLogger/actions/workflows/build-datalogger-iot.yml/badge.svg) +![DataLogger Builds](https://github.com/sparkfun/SparkFun_DataLogger/actions/workflows/build-datalogger-iot.yml/badge.svg) The repository contains the various firmware applications for the SparkFun DataLogger IoT incarnations. -The firmware defines the functionally available for the supported DataLogger IoT boards, with the core implementation of the exposed features delivered by the [SparkFun Flux Framework](https://github.com/sparkfun/SparkFun_Flux). +The firmware defines the functionally available for the supported DataLogger IoT boards, with the core implementation of the exposed features delivered by the [SparkFun Flux SDK](https://github.com/sparkfun/flux-sdk). ## Building and Uploading @@ -24,19 +24,49 @@ arduino-cli core update-index arduino-cli core install esp32:esp32 ``` -### Install Flux -The version of the ***SparkFun Flux*** library the DataLogger uses is linked in as a submodule to this repository. To checkout the submodule contents, issue the following command in the root folder of the repository. +### Install the *flux sdk* + +The flux sdk is used to create a custom Arduino Library called ```SparkFun_DataLoggerIoT``` that is made available for use by the Arduino build environment. This allows tailoring which components are needed for the specific application - in this case the datalogger. + +First steps is to download the flux-sdk on your machine - which is cloned from github. ```sh -git submodule update --init --recursive +git clone git@github.com:sparkfun/flux-sdk.git ``` -The flux framework depends on a large number of Arduino libraries. To install all dependencies, Flux provides an installation script. This script requires the ```arduino-cli``` and is run by issuing the following command from the root folder of the DataLogger repository: +The normal location is to set install the flux-sdk in the same directory as the ```sfe-dataloger``` (this) repository was installed. If you install it some other location, set the flux-sdk path using the FLUX_SDK_PATH environment variable. This is easily done by cd'ing into the flux-sdk root directory and executing the following command: ```sh -./SparkFun_Flux/install-libs.sh +export FLUX_SDK_PATH=`pwd` ``` +### Install dependant Arduino libraries + +Once the flux-sdk is installed, you can install all libraries the framework depends on by issuing the following command: + +```sh +$FLUX_SDK_PATH/install-libs.sh +``` + +### Using CMake + +To configure the library used during the Arduino build process, the ```cmake``` system is used. The following steps outline how the custom library is built. + +Set the current directory the root of the sfe-datalogger. Then create a directory called build and cd into it. + +```sh +mkdir build +cd build +``` + +Now run CMake with the following command: + +```sh +cmake .. +``` + +This will create an Arduino library called ```SparkFun_DataLoggerIoT``` in the root directory of the sfe-datalogger repository. Once completed, you can delete the build directory, and build the datalogger firmware. + ### Build the Firmware The following command will build the DataLogger firmware. This command is run from the root directory of this repo. @@ -45,12 +75,12 @@ The following command will build the DataLogger firmware. This command is run fr arduino-cli compile --fqbn esp32:esp32:esp32 \ ./sfeDataLoggerIoT/sfeDataLoggerIoT.ino \ - --build-property upload.maximum_size=3145728 \ + --build-property upload.maximum_size=4980736 \ --build-property build.flash_size=16MB \ --build-property build.partitions=partitions \ --build-property build.flash_mode=dio \ --build-property build.flash_freq=80m \ - --export-binaries --clean --library `pwd`/SparkFun_Flux + --export-binaries --clean --library `pwd`/SparkFun_DataLoggerIoT ``` Note: @@ -72,13 +102,14 @@ The firmware is also automatically built by a GitHub action on code check-in. Th ## Firmware Upload ### esptool.py + To upload the firmware, the ESP32 tool ```esptool.py``` is used. Installation instructions are located [here](https://docs.espressif.com/projects/esptool/en/latest/esp32/installation.html). If Python is setup on your system, a ```pip3``` can be used: ```sh pip3 install esptool ``` -Once installed - the following command is used to upload the build firmware to an attached DataLogger. +Once installed - the following command is used to upload the build firmware to an attached DataLogger. ```sh esptool.py --chip esp32 --port "" --baud 460800 \ @@ -93,18 +124,18 @@ esptool.py --chip esp32 --port "" --baud 460800 \ * `````` - Is the port the board is connected to on your development machine * ```-baud``` - Set this to a value that works for your development machine. The above command uses ```460800``` -* ```-e``` - This command switch will release the ESP32 flash and is helpful for development. +* ```-e``` - This command switch will release the ESP32 flash and is helpful for development. * For a faster upload, omit this option ### Uploading Automated GitHub Build Results This repository builds DataLogger firmware using a GitHub action. To use this pre-built firmware on a DataLogger IoT board, do the following steps: -Download the desired firmware files from: +Download the desired firmware files from: * The results from a GitHub [Action](https://github.com/sparkfun/SparkFun_DataLogger/actions) * Or a specific DataLogger [Release](https://github.com/sparkfun/SparkFun_DataLogger/releases) -The downloaded zip file contains the three ```.bin``` files for the release. +The downloaded zip file contains the three ```.bin``` files for the release. -Once unzipped, modified the paths to the desired ```.bin``` files in the above ```esptool.py``` command to upload the firmware to an attached DataLogger board. +Once unzipped, modified the paths to the desired ```.bin``` files in the above ```esptool.py``` command to upload the firmware to an attached DataLogger board. diff --git a/flux_sdk_import.cmake b/flux_sdk_import.cmake new file mode 100644 index 0000000..a53d9f7 --- /dev/null +++ b/flux_sdk_import.cmake @@ -0,0 +1,25 @@ +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# +# ################################################################################################## +# include/import file for the flux-sdk cmake system +# ################################################################################################## + +# we are just using this as a manifest system, so doing the best to bypass the compiler detection +set(CMAKE_C_COMPILER_FORCED TRUE) +set(CMAKE_CXX_COMPILER_FORCED TRUE) + +# Where is the flux-sdk directory? This should be in some "include file from the sdk" + +if (NOT FLUX_SDK_PATH) + if (DEFINED ENV{FLUX_SDK_PATH}) + set(FLUX_SDK_PATH $ENV{FLUX_SDK_PATH}) + elseif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../flux-sdk) + set(FLUX_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../flux-sdk) + endif () +endif () + +# crawl the flux-sdk directory and add all the subdirectories +include(${FLUX_SDK_PATH}/flux_sdk_init.cmake) diff --git a/fuse_id/dl_build_conf.py b/fuse_id/dl_build_conf.py index 56bf7ad..fb33cd7 100755 --- a/fuse_id/dl_build_conf.py +++ b/fuse_id/dl_build_conf.py @@ -1,5 +1,9 @@ #!/usr/bin/env python - +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# import os import sys import datetime diff --git a/fuse_id/dl_fuseid.py b/fuse_id/dl_fuseid.py index 0e6bc26..b27e1ce 100755 --- a/fuse_id/dl_fuseid.py +++ b/fuse_id/dl_fuseid.py @@ -2,11 +2,10 @@ #-------------------------------------------------------------------------------- # -# Copyright (c) 2022-2023, SparkFun Electronics Inc. All rights reserved. -# This software includes information which is proprietary to and a -# trade secret of SparkFun Electronics Inc. It is not to be disclosed -# to anyone outside of this organization. Reproduction by any means -# whatsoever is prohibited without express written permission. +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT # #-------------------------------------------------------------------------------- diff --git a/fuse_id/sfe_dl_fuseid/__init__.py b/fuse_id/sfe_dl_fuseid/__init__.py index ccb9704..853fd3b 100644 --- a/fuse_id/sfe_dl_fuseid/__init__.py +++ b/fuse_id/sfe_dl_fuseid/__init__.py @@ -1,5 +1,9 @@ - +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# # just import the entry point method from .dl_fuseid import dl_fuseid diff --git a/fuse_id/sfe_dl_fuseid/_dl_fuseid_.conf b/fuse_id/sfe_dl_fuseid/_dl_fuseid_.conf index 6e73346..fecba69 100644 --- a/fuse_id/sfe_dl_fuseid/_dl_fuseid_.conf +++ b/fuse_id/sfe_dl_fuseid/_dl_fuseid_.conf @@ -1,10 +1,9 @@ #-------------------------------------------------------------------------------- # -# Copyright (c) 2022-2023, SparkFun Electronics Inc. All rights reserved. -# This software includes information which is proprietary to and a -# trade secret of SparkFun Electronics Inc. It is not to be disclosed -# to anyone outside of this organization. Reproduction by any means -# whatsoever is prohibited without express written permission. +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT # #-------------------------------------------------------------------------------- diff --git a/fuse_id/sfe_dl_fuseid/dl_fuseid.py b/fuse_id/sfe_dl_fuseid/dl_fuseid.py index 635ab5c..7f4f73e 100644 --- a/fuse_id/sfe_dl_fuseid/dl_fuseid.py +++ b/fuse_id/sfe_dl_fuseid/dl_fuseid.py @@ -2,11 +2,11 @@ # #--------------------------------------------------------------------------------- # -# Copyright (c) 2022-2023, SparkFun Electronics Inc. All rights reserved. -# This software includes information which is proprietary to and a -# trade secret of SparkFun Electronics Inc. It is not to be disclosed -# to anyone outside of this organization. Reproduction by any means -# whatsoever is prohibited without express written permission. +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# # #--------------------------------------------------------------------------------- # @@ -365,7 +365,7 @@ def dl_fuseid(): #----------------------------------------------------------------------------- # _dl_add_board_parameter() # -# Internal routine that addes the specified board arg to sys.argv. +# Internal routine that adds the specified board arg to sys.argv. # # If a board arg is already present, it overrides the arg @@ -374,12 +374,12 @@ def _dl_add_board_parameter(board_type): # does a board parameter already exist in argv? iBoard = [i for i,x in enumerate(sys.argv) if x == '-b' or x == '--board'] - # was a swtich provided? + # was a switch provided? if len(iBoard) == 0: sys.argv.append('-b') sys.argv.append(board_type) else: - # swtich provided .. check value - if switch is at end of list, that's an issue + # switch provided .. check value - if switch is at end of list, that's an issue if len(sys.argv)-1 == iBoard[0]: sys.argv.append(board_type) else: diff --git a/fuse_id/sfe_dl_fuseid/dl_log.py b/fuse_id/sfe_dl_fuseid/dl_log.py index a5bf13b..fffd56e 100644 --- a/fuse_id/sfe_dl_fuseid/dl_log.py +++ b/fuse_id/sfe_dl_fuseid/dl_log.py @@ -1,10 +1,10 @@ #-------------------------------------------------------------------------------- # -# Copyright (c) 2022-2023, SparkFun Electronics Inc. All rights reserved. -# This software includes information which is proprietary to and a -# trade secret of SparkFun Electronics Inc. It is not to be disclosed -# to anyone outside of this organization. Reproduction by any means -# whatsoever is prohibited without express written permission. +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# # #-------------------------------------------------------------------------------- diff --git a/fuse_id/sfe_dl_fuseid/dl_prefs.py b/fuse_id/sfe_dl_fuseid/dl_prefs.py index c84d3b2..5869fff 100644 --- a/fuse_id/sfe_dl_fuseid/dl_prefs.py +++ b/fuse_id/sfe_dl_fuseid/dl_prefs.py @@ -2,11 +2,11 @@ #-------------------------------------------------------------------------------- # -# Copyright (c) 2022-2023, SparkFun Electronics Inc. All rights reserved. -# This software includes information which is proprietary to and a -# trade secret of SparkFun Electronics Inc. It is not to be disclosed -# to anyone outside of this organization. Reproduction by any means -# whatsoever is prohibited without express written permission. +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# # #-------------------------------------------------------------------------------- @@ -29,7 +29,7 @@ #------------------------------------------------------------------ # The plan: -# Intialize our defaults and then see if we can load the user prefs +# Initialize our defaults and then see if we can load the user prefs #------------------------------------------------------------------ @@ -86,7 +86,7 @@ -# assume our parent dir is our pacakge name. +# assume our parent dir is our package name. if __name__.find('.') > 0: dlPrefs['package_name'] = __name__.split('.')[-2] else: diff --git a/fuse_id/sfe_dl_fuseid/dl_version.py b/fuse_id/sfe_dl_fuseid/dl_version.py index f7d8592..adf4120 100644 --- a/fuse_id/sfe_dl_fuseid/dl_version.py +++ b/fuse_id/sfe_dl_fuseid/dl_version.py @@ -2,11 +2,11 @@ #-------------------------------------------------------------------------------- # -# Copyright (c) 2022-2023, SparkFun Electronics Inc. All rights reserved. -# This software includes information which is proprietary to and a -# trade secret of SparkFun Electronics Inc. It is not to be disclosed -# to anyone outside of this organization. Reproduction by any means -# whatsoever is prohibited without express written permission. +# +# Copyright (c) 2022-2024, SparkFun Electronics Inc. +# +# SPDX-License-Identifier: MIT +# # #-------------------------------------------------------------------------------- VERSION = "0.5.0" diff --git a/sfeDataLoggerIoT/sfeDLBoard.h b/sfeDataLoggerIoT/sfeDLBoard.h index 287e90c..167c047 100644 --- a/sfeDataLoggerIoT/sfeDLBoard.h +++ b/sfeDataLoggerIoT/sfeDLBoard.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLButton.cpp b/sfeDataLoggerIoT/sfeDLButton.cpp index e018344..e656624 100644 --- a/sfeDataLoggerIoT/sfeDLButton.cpp +++ b/sfeDataLoggerIoT/sfeDLButton.cpp @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLButton.h b/sfeDataLoggerIoT/sfeDLButton.h index 92bf22a..86d5c33 100644 --- a/sfeDataLoggerIoT/sfeDLButton.h +++ b/sfeDataLoggerIoT/sfeDLButton.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLCommands.h b/sfeDataLoggerIoT/sfeDLCommands.h index df5e9ba..d789543 100644 --- a/sfeDataLoggerIoT/sfeDLCommands.h +++ b/sfeDataLoggerIoT/sfeDLCommands.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLDisplay.h b/sfeDataLoggerIoT/sfeDLDisplay.h index e920649..50e2ec1 100644 --- a/sfeDataLoggerIoT/sfeDLDisplay.h +++ b/sfeDataLoggerIoT/sfeDLDisplay.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLGrBattery.h b/sfeDataLoggerIoT/sfeDLGrBattery.h index 5515602..2053bf2 100644 --- a/sfeDataLoggerIoT/sfeDLGrBattery.h +++ b/sfeDataLoggerIoT/sfeDLGrBattery.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLGrWiFi.h b/sfeDataLoggerIoT/sfeDLGrWiFi.h index 098b768..e78ee7c 100644 --- a/sfeDataLoggerIoT/sfeDLGrWiFi.h +++ b/sfeDataLoggerIoT/sfeDLGrWiFi.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLGraphx.h b/sfeDataLoggerIoT/sfeDLGraphx.h index 7b1a593..79114c6 100644 --- a/sfeDataLoggerIoT/sfeDLGraphx.h +++ b/sfeDataLoggerIoT/sfeDLGraphx.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLLed.cpp b/sfeDataLoggerIoT/sfeDLLed.cpp index d41e35b..3d7ee76 100644 --- a/sfeDataLoggerIoT/sfeDLLed.cpp +++ b/sfeDataLoggerIoT/sfeDLLed.cpp @@ -2,11 +2,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ @@ -310,7 +308,7 @@ void _sfeLED::on(sfeLEDColor_t color) //--------------------------------------------------------- // Blink - change the timer value of the current color -void _sfeLED::blink(uint timeout) +void _sfeLED::blink(uint32_t timeout) { if (_disabled) return; diff --git a/sfeDataLoggerIoT/sfeDLLed.h b/sfeDataLoggerIoT/sfeDLLed.h index a17ae9c..bfae90e 100644 --- a/sfeDataLoggerIoT/sfeDLLed.h +++ b/sfeDataLoggerIoT/sfeDLLed.h @@ -2,11 +2,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLMode.cpp b/sfeDataLoggerIoT/sfeDLMode.cpp index ad87f97..c4acadf 100644 --- a/sfeDataLoggerIoT/sfeDLMode.cpp +++ b/sfeDataLoggerIoT/sfeDLMode.cpp @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLMode.h b/sfeDataLoggerIoT/sfeDLMode.h index b050992..96accee 100644 --- a/sfeDataLoggerIoT/sfeDLMode.h +++ b/sfeDataLoggerIoT/sfeDLMode.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLSystemOp.h b/sfeDataLoggerIoT/sfeDLSystemOp.h index 77117c8..d317ca4 100644 --- a/sfeDataLoggerIoT/sfeDLSystemOp.h +++ b/sfeDataLoggerIoT/sfeDLSystemOp.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLVersion.h b/sfeDataLoggerIoT/sfeDLVersion.h index 590c44f..bd5dc13 100644 --- a/sfeDataLoggerIoT/sfeDLVersion.h +++ b/sfeDataLoggerIoT/sfeDLVersion.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ @@ -21,10 +19,10 @@ #define kDLVersionNumberMinor 2 // Point version number -#define kDLVersionNumberPoint 01 +#define kDLVersionNumberPoint 02 // Version string description -#define kDLVersionDescriptor "Version 1.2.01 Development" +#define kDLVersionDescriptor "Version 1.2.02 Development" // app name/class ID string #define kDLAppClassNameID "SFE-DATALOGGER-IOT" diff --git a/sfeDataLoggerIoT/sfeDLWebServer.cpp b/sfeDataLoggerIoT/sfeDLWebServer.cpp index 0424e8e..a797f7c 100644 --- a/sfeDataLoggerIoT/sfeDLWebServer.cpp +++ b/sfeDataLoggerIoT/sfeDLWebServer.cpp @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDLWebServer.h b/sfeDataLoggerIoT/sfeDLWebServer.h index b9a3e9f..6bff626 100644 --- a/sfeDataLoggerIoT/sfeDLWebServer.h +++ b/sfeDataLoggerIoT/sfeDLWebServer.h @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDataLogger.cpp b/sfeDataLoggerIoT/sfeDataLogger.cpp index 2a60d45..33fff07 100644 --- a/sfeDataLoggerIoT/sfeDataLogger.cpp +++ b/sfeDataLoggerIoT/sfeDataLogger.cpp @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ @@ -161,7 +159,7 @@ sfeDataLogger::sfeDataLogger() _logger.addProperty(logSysInfo); // Update timer object string - _timer.setName("Logging Timer", "Set the internal between log entries"); + _timer.setName("Logging Timer", "Set the interval between log entries"); // set sleep default interval && event handler method sleepInterval = kSystemSleepSleepSec; @@ -309,7 +307,7 @@ bool sfeDataLogger::onSetup() // Version info setVersion(kDLVersionNumberMajor, kDLVersionNumberMinor, kDLVersionNumberPoint, kDLVersionDescriptor, BUILD_NUMBER); - // set the settings storage system for spark + // set the settings storage system for the framework flxSettings.setStorage(&_sysStorage); flxSettings.setFallback(&_jsonStorage); @@ -322,7 +320,7 @@ bool sfeDataLogger::onSetup() flxRegisterEventCB(flxEvent::kOnEditFinished, &flxSettings, &flxSettingsSave::saveEvent_CB); flxRegisterEventCB(flxEvent::kOnNewFile, &flxSettings, &flxSettingsSave::saveEvent_CB); - // Add serial settings to spark - the spark loop call will take care + // Add serial settings to flux - the flux loop call will take care // of everything else. flux.add(_serialSettings); @@ -710,7 +708,7 @@ bool sfeDataLogger::onStart() setupNFDevice(); // check our I2C devices - // Loop over the device list - note that it is iteratiable. + // Loop over the device list - note that it is iterable. flxLog_I_(F("Loading devices ... ")); flxDeviceContainer loadedDevices = flux.connectedDevices(); diff --git a/sfeDataLoggerIoT/sfeDataLogger.h b/sfeDataLoggerIoT/sfeDataLogger.h index 79239c1..61a7d41 100644 --- a/sfeDataLoggerIoT/sfeDataLogger.h +++ b/sfeDataLoggerIoT/sfeDataLogger.h @@ -1,17 +1,15 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ /* - * Spark Framework demo - logging + * SparkFun Data Logger Application - main header file * */ #pragma once @@ -69,7 +67,7 @@ #include // OLED -//#include +// #include #include "sfeDLButton.h" #include "sfeDLWebServer.h" diff --git a/sfeDataLoggerIoT/sfeDataLoggerAbout.cpp b/sfeDataLoggerIoT/sfeDataLoggerAbout.cpp index d941fd1..53710a6 100644 --- a/sfeDataLoggerIoT/sfeDataLoggerAbout.cpp +++ b/sfeDataLoggerIoT/sfeDataLoggerAbout.cpp @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDataLoggerIoT.ino b/sfeDataLoggerIoT/sfeDataLoggerIoT.ino index 7ccbcd9..155bd5d 100644 --- a/sfeDataLoggerIoT/sfeDataLoggerIoT.ino +++ b/sfeDataLoggerIoT/sfeDataLoggerIoT.ino @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDataLoggerProps.cpp b/sfeDataLoggerIoT/sfeDataLoggerProps.cpp index 793c563..b7dec12 100644 --- a/sfeDataLoggerIoT/sfeDataLoggerProps.cpp +++ b/sfeDataLoggerIoT/sfeDataLoggerProps.cpp @@ -1,11 +1,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */ diff --git a/sfeDataLoggerIoT/sfeDataLoggerSetup.cpp b/sfeDataLoggerIoT/sfeDataLoggerSetup.cpp index 2409812..6776ad9 100644 --- a/sfeDataLoggerIoT/sfeDataLoggerSetup.cpp +++ b/sfeDataLoggerIoT/sfeDataLoggerSetup.cpp @@ -2,11 +2,9 @@ /* *--------------------------------------------------------------------------------- * - * Copyright (c) 2022-2024, SparkFun Electronics Inc. All rights reserved. - * This software includes information which is proprietary to and a - * trade secret of SparkFun Electronics Inc. It is not to be disclosed - * to anyone outside of this organization. Reproduction by any means - * whatsoever is prohibited without express written permission. + * Copyright (c) 2022-2024, SparkFun Electronics Inc. + * + * SPDX-License-Identifier: MIT * *--------------------------------------------------------------------------------- */