Added option to change hw params.

This commit is contained in:
Magnus Persson
2022-01-20 16:59:24 +01:00
parent 35f66e0458
commit 20771b3244
13 changed files with 475 additions and 252 deletions

71
src/resources.hpp Normal file
View File

@ -0,0 +1,71 @@
/*
MIT License
Copyright (c) 2021-22 Magnus
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.
*/
#ifndef SRC_RESOURCES_HPP_
#define SRC_RESOURCES_HPP_
// Common strings used in json formats.
#define PARAM_ID "id"
#define PARAM_MDNS "mdns"
#define PARAM_OTA "ota-url"
#define PARAM_SSID "wifi-ssid"
#define PARAM_PASS "wifi-pass"
#define PARAM_PUSH_BREWFATHER "brewfather-push"
#define PARAM_PUSH_HTTP "http-push"
#define PARAM_PUSH_HTTP2 "http-push2"
#define PARAM_PUSH_INFLUXDB2 "influxdb2-push"
#define PARAM_PUSH_INFLUXDB2_ORG "influxdb2-org"
#define PARAM_PUSH_INFLUXDB2_BUCKET "influxdb2-bucket"
#define PARAM_PUSH_INFLUXDB2_AUTH "influxdb2-auth"
#define PARAM_PUSH_MQTT "mqtt-push"
#define PARAM_PUSH_MQTT_USER "mqtt-user"
#define PARAM_PUSH_MQTT_PASS "mqtt-pass"
#define PARAM_PUSH_MQTT_TOPIC "mqtt-topic"
#define PARAM_SLEEP_INTERVAL "sleep-interval"
#define PARAM_TEMPFORMAT "temp-format"
#define PARAM_VOLTAGEFACTOR "voltage-factor"
#define PARAM_GRAVITY_FORMULA "gravity-formula"
#define PARAM_GRAVITY_FORMAT "gravity-format"
#define PARAM_GRAVITY_TEMP_ADJ "gravity-temp-adjustment"
#define PARAM_TEMP_ADJ "temp-adjustment-value"
#define PARAM_GYRO_CALIBRATION "gyro-calibration-data"
#define PARAM_GYRO_TEMP "gyro-temp"
#define PARAM_FORMULA_DATA "formula-calculation-data"
#define PARAM_APP_NAME "app-name"
#define PARAM_APP_VER "app-ver"
#define PARAM_ANGLE "angle"
#define PARAM_GRAVITY "gravity"
#define PARAM_TEMP_C "temp-c"
#define PARAM_TEMP_F "temp-f"
#define PARAM_BATTERY "battery"
#define PARAM_SLEEP_MODE "sleep-mode"
#define PARAM_RSSI "rssi"
#define PARAM_ERROR "error"
#define PARAM_HW_GYRO_READ_COUNT "gyro-read-count"
#define PARAM_HW_GYRO_READ_DELAY "gyro-read-delay"
#define PARAM_HW_GYRO_MOVING_THREASHOLD "gyro-moving-threashold"
#define PARAM_HW_FORMULA_DEVIATION "formula-max-deviation"
#define PARAM_HW_FORMULA_CALIBRATION_TEMP "formula-calibration-temp"
#define PARAM_HW_WIFI_PORTALTIMEOUT "wifi-portaltimeout"
#endif // SRC_RESOURCES_HPP_