7 Commits

Author SHA1 Message Date
f0a8713249 Fixed other configurations 2020-06-02 15:57:05 +02:00
4054d668d9 Fixed warnings in VescUart 2020-06-02 15:56:06 +02:00
d9038a1325 Cleanups after rebase 2020-06-02 15:56:06 +02:00
c52fa6fda6 trigger poti calibrate feature 2020-06-02 15:56:06 +02:00
4077185010 implement invert for vesc controller; add menu items 2020-06-02 15:56:06 +02:00
4dda961d88 vesc control 2020-06-02 15:56:01 +02:00
053b324617 add vesc uart lib 2020-06-02 15:55:02 +02:00
773 changed files with 12826 additions and 68055 deletions

View File

@ -1,66 +0,0 @@
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterUnion: true
BeforeCatch: false
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 8
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never

View File

@ -1,363 +0,0 @@
name: CI
on:
workflow_dispatch:
push:
release:
types:
- created
# pull_request:
# types: [opened, synchronize, reopened]
jobs:
checkout:
runs-on: ubuntu-latest
name: Checkout (with submodules)
steps:
- name: Cache repository
uses: actions/cache@v2
id: cache-repository
with:
path: repository
key: ${{ runner.os }}-repository-${{ github.sha }}
- name: Checkout (without submodules)
uses: actions/checkout@v2
with:
path: repository
- name: Fast Submodule Checkout esp-idf
uses: 0xFEEDC0DE64/fast_submodule_checkout@main
with:
submodule: esp-idf
repo: repository
- name: Fast Submodule Checkout components/arduino-esp32
uses: 0xFEEDC0DE64/fast_submodule_checkout@main
with:
submodule: components/arduino-esp32
repo: repository
- name: Checkout remaining submodules
run: git -C repository submodule update --init --recursive $(git -C repository submodule | awk '{ if ($2 != "esp-idf" && $2 != "components/arduino-esp32") print $2 }')
checkout-history:
runs-on: ubuntu-latest
name: Checkout (with history and submodules)
steps:
- name: Cache repository
uses: actions/cache@v2
id: cache-repository
with:
path: repository
key: ${{ runner.os }}-repository-history-${{ github.sha }}
- name: Checkout (without submodules)
uses: actions/checkout@v2
with:
path: repository
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Fast Submodule Checkout esp-idf
uses: 0xFEEDC0DE64/fast_submodule_checkout@main
with:
submodule: esp-idf
repo: repository
- name: Fast Submodule Checkout components/arduino-esp32
uses: 0xFEEDC0DE64/fast_submodule_checkout@main
with:
submodule: components/arduino-esp32
repo: repository
- name: Checkout remaining submodules
run: git -C repository submodule update --init --recursive $(git -C repository submodule | awk '{ if ($2 != "esp-idf" && $2 != "components/arduino-esp32") print $2 }')
install-idf:
runs-on: ubuntu-latest
name: Install esp-idf
needs:
- checkout
steps:
- name: Cache repository
uses: actions/cache@v2
id: cache-repository
with:
path: repository
key: ${{ runner.os }}-repository-${{ github.sha }}
- name: Verify that "Cache repostory" had a hit
if: ${{ steps.cache-repository.outputs.cache-hit != 'true' }}
run: exit 1
- name: Get esp-idf release name
id: get-esp-idf-release
uses: 0xFEEDC0DE64/get_latest_tag@main
with:
repo: repository/esp-idf
- name: Cache .espressif
id: cache-espressif
uses: actions/cache@v2
with:
path: ~/.espressif
key: ${{ runner.os }}-espressif-${{ steps.get-esp-idf-release.outputs.tag_name }}
- name: Install .espressif dependencies
if: ${{ steps.cache-espressif.outputs.cache-hit != 'true' }}
run: repository/esp-idf/install.sh
install-sonar-scanner:
runs-on: ubuntu-latest
env:
SONAR_SCANNER_VERSION: 4.4.0.2170
name: Install sonar-scanner
steps:
- name: Cache sonar-scanner
uses: actions/cache@v2
id: cache-sonar-scanner
with:
path: sonar-scanner
key: ${{ runner.os }}-sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}
- name: Download and set up sonar-scanner
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
if: ${{ steps.cache-sonar-scanner.outputs.cache-hit != 'true' }}
run: |
curl -sSLo sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
unzip -o sonar-scanner.zip -d sonar-scanner/
echo "$(pwd)/sonar-scanner/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
install-sonar-build-wrapper:
runs-on: ubuntu-latest
name: Install sonar-build-wrapper
steps:
- name: Cache sonar-build-wrapper
uses: actions/cache@v2
id: cache-sonar-build-wrapper
with:
path: sonar-build-wrapper
key: ${{ runner.os }}-sonar-build-wrapper
- name: Download and set up build-wrapper (for Sonar)
env:
BUILD_WRAPPER_DOWNLOAD_URL: https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
if: ${{ steps.cache-sonar-build-wrapper.outputs.cache-hit != 'true' }}
run: |
curl -sSLo build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
unzip -o build-wrapper-linux-x86.zip -d sonar-build-wrapper/
echo "$(pwd)/sonar-build-wrapper/build-wrapper-linux-x86" >> $GITHUB_PATH
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [feedc0de, feedc0de_new, comred_new, peter, mick, nofeatures, seatbot]
name: ${{ matrix.node }}
needs:
- checkout
- install-idf
steps:
- name: Cache repository
uses: actions/cache@v2
id: cache-repository
with:
path: repository
key: ${{ runner.os }}-repository-${{ github.sha }}
- name: Verify that "Cache repostory" had a hit
if: ${{ steps.cache-repository.outputs.cache-hit != 'true' }}
run: exit 1
- name: Get esp-idf release name
id: get-esp-idf-release
uses: 0xFEEDC0DE64/get_latest_tag@main
with:
repo: repository/esp-idf
- name: Cache .espressif
id: cache-espressif
uses: actions/cache@v2
with:
path: ~/.espressif
key: ${{ runner.os }}-espressif-${{ steps.get-esp-idf-release.outputs.tag_name }}
- name: Verify that "Cache .espressif" had a hit
if: ${{ steps.cache-espressif.outputs.cache-hit != 'true' }}
run: |
echo "Cache .espressif did not hit? Did the prepare step run successfully?"
exit 1
- name: Setup ccache
uses: 0xFEEDC0DE64/setup_ccache@main
with:
key: ${{ runner.os }}-ccache-${{ matrix.node }}
- name: Unpack ignore folder
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
if: ${{ matrix.node == 'comred' || matrix.node == 'peter' || matrix.node == 'mick' || matrix.node == 'comred_new' }}
run: |
echo Unpacking ignore folder...
cd repository
tools/bobby-decrypt
- name: Build firmware
run: |
cd repository
export CCACHE_MAXSIZE=1024M CCACHE_BASEDIR="$(pwd)"
./esp-idf/install.sh
. export.sh
./switchconf.sh ${{ matrix.node }}
idf.py --ccache build
ccache -s
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Upload Build Artifact
uses: actions/upload-artifact@v2.2.4
with:
name: bobbyquad_${{ matrix.node }}
path: |
repository/build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.bin
repository/build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.elf
build-and-analyze:
runs-on: ubuntu-latest
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
SONAR_SCANNER_VERSION: 4.4.0.2170
SONAR_CACHE_DIR: sonar_cache
name: allfeatures
needs:
- checkout-history
- install-idf
- install-sonar-build-wrapper
- install-sonar-scanner
steps:
- name: Cache repository
uses: actions/cache@v2
id: cache-repository
with:
path: repository
key: ${{ runner.os }}-repository-history-${{ github.sha }}
- name: Verify that "Cache repostory" had a hit
if: ${{ steps.cache-repository.outputs.cache-hit != 'true' }}
run: exit 1
- name: Get esp-idf release name
id: get-esp-idf-release
uses: 0xFEEDC0DE64/get_latest_tag@main
with:
repo: repository/esp-idf
- name: Cache .espressif
id: cache-espressif
uses: actions/cache@v2
with:
path: ~/.espressif
key: ${{ runner.os }}-espressif-${{ steps.get-esp-idf-release.outputs.tag_name }}
- name: Verify that "Cache .espressif" had a hit
if: ${{ steps.cache-espressif.outputs.cache-hit != 'true' }}
run: |
echo "Cache .espressif did not hit? Did the prepare step run successfully?"
exit 1
- name: Cache sonar-scanner
uses: actions/cache@v2
id: cache-sonar-scanner
with:
path: sonar-scanner
key: ${{ runner.os }}-sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}
- name: Verify that "Cache sonar-scanner" had a hit
if: ${{ steps.cache-sonar-scanner.outputs.cache-hit != 'true' }}
run: |
echo "Cache sonar-scanner did not hit? Did the prepare step run successfully?"
exit 1
- name: Cache sonar-build-wrapper
uses: actions/cache@v2
id: cache-sonar-build-wrapper
with:
path: sonar-build-wrapper
key: ${{ runner.os }}-sonar-build-wrapper
- name: Verify that "Cache sonar-build-wrapper" had a hit
if: ${{ steps.cache-sonar-build-wrapper.outputs.cache-hit != 'true' }}
run: |
echo "Cache sonar-build-wrapper did not hit? Did the prepare step run successfully?"
exit 1
- name: Cache sonar-build-wrapper-output
uses: actions/cache@v2
id: cache-sonar-build-wrapper-output
with:
path: repository
key: ${{ runner.os }}-sonar-build-wrapper-output-${{ github.sha }}
- name: Set up JDK 11 (for Sonar)
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup sonar-build-wrapper
run: echo "$(pwd)/sonar-build-wrapper/build-wrapper-linux-x86" >> $GITHUB_PATH
- name: Setup ccache
uses: 0xFEEDC0DE64/setup_ccache@main
with:
key: ${{ runner.os }}-ccache-allfeatures
- name: Build firmware
run: |
cd repository
export CCACHE_MAXSIZE=1024M CCACHE_BASEDIR="$(pwd)"
./esp-idf/install.sh
. export.sh
./switchconf.sh allfeatures
build-wrapper-linux-x86-64 --out-dir "${{ env.BUILD_WRAPPER_OUT_DIR }}" idf.py --ccache build
ccache -s
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Upload Build Artifact
uses: actions/upload-artifact@v2.2.4
with:
name: bobbyquad_allfeatures
path: |
repository/build_allfeatures/bobbyquad_allfeatures.bin
repository/build_allfeatures/bobbyquad_allfeatures.elf
- name: Setup sonar-scanner
run: echo "$(pwd)/sonar-scanner/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
- name: Cache sonar-scanner-cache
uses: 0xFEEDC0DE64/cache-with-update@update-cache-on-cachehit
with:
path: ${{ env.SONAR_CACHE_DIR }}
key: ${{ runner.os }}-sonar-scanner-cache-${{ env.SONAR_SCANNER_VERSION }}
- name: Run sonar-scanner
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
cd repository
sonar-scanner \
--define sonar.host.url="https://sonarcloud.io" \
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
--define sonar.cfamily.cache.path="../${{ env.SONAR_CACHE_DIR }}"

17
.gitignore vendored
View File

@ -1,15 +1,2 @@
desktop.ini
/build
/build_*
/CMakeLists.txt.user*
/cmake-build-debug
/platformio.pro*
/config.cmake
/sdkconfig
/sdkconfig.old*
/ignore
/.idea
/.ccache
/main/certs/*
/.vscode/*
/ignore.tar.gz
.pio
platformio.pro*

78
.gitmodules vendored
View File

@ -1,75 +1,3 @@
[submodule "components/espcpputils"]
path = components/espcpputils
url = ../../0xFEEDC0DE64/espcpputils.git
[submodule "esp-idf"]
path = esp-idf
url = ../../bobbycar-graz/esp-idf.git
[submodule "components/cpputils"]
path = components/cpputils
url = ../../0xFEEDC0DE64/cpputils.git
[submodule "components/cxx-ring-buffer"]
path = components/cxx-ring-buffer
url = ../../0xFEEDC0DE64/cxx-ring-buffer.git
[submodule "components/date"]
path = components/date
url = ../../0xFEEDC0DE64/date.git
[submodule "components/espchrono"]
path = components/espchrono
url = ../../0xFEEDC0DE64/espchrono.git
[submodule "components/ArduinoJson"]
path = components/ArduinoJson
url = ../../0xFEEDC0DE64/ArduinoJson.git
[submodule "components/arduino-esp32"]
path = components/arduino-esp32
url = ../../0xFEEDC0DE64/arduino-esp32.git
[submodule "components/bobbycar-protocol"]
path = components/bobbycar-protocol
url = ../../bobbycar-graz/bobbycar-protocol.git
[submodule "components/fmt"]
path = components/fmt
url = ../../0xFEEDC0DE64/fmt.git
[submodule "components/espwifistack"]
path = components/espwifistack
url = ../../0xFEEDC0DE64/espwifistack.git
[submodule "components/esp-nimble-cpp"]
path = components/esp-nimble-cpp
url = ../../bobbycar-graz/esp-nimble-cpp.git
[submodule "components/espasyncota"]
path = components/espasyncota
url = ../../0xFEEDC0DE64/espasyncota.git
[submodule "components/esphttpdutils"]
path = components/esphttpdutils
url = ../../0xFEEDC0DE64/esphttpdutils.git
[submodule "components/espasynchttpreq"]
path = components/espasynchttpreq
url = ../../0xFEEDC0DE64/espasynchttpreq.git
[submodule "components/FastLED-idf"]
path = components/FastLED-idf
url = ../../0xFEEDC0DE64/FastLED-idf.git
[submodule "components/esp-gui-lib"]
path = components/esp-gui-lib
url = ../../0xFEEDC0DE64/esp-gui-lib.git
[submodule "components/espconfiglib"]
path = components/espconfiglib
url = ../../0xFEEDC0DE64/espconfiglib.git
[submodule "components/QRCode-esp32"]
path = components/QRCode-esp32
url = ../../bobbycar-graz/QRCode-esp32.git
[submodule "components/sunset"]
path = components/sunset
url = ../../bobbycar-graz/sunset.git
[submodule "esp-protocols"]
path = esp-protocols
url = ../../0xFEEDC0DE64/esp-protocols.git
[submodule "components/TFT_eSPI"]
path = components/TFT_eSPI
url = ../../0xFEEDC0DE64/TFT_eSPI.git
[submodule "esp_boost"]
path = esp_boost
url = ../../0xFEEDC0DE64/esp_boost.git
[submodule "components/esptftlib"]
path = components/esptftlib
url = ../../0xFEEDC0DE64/esptftlib.git
[submodule "components/espfontlib"]
path = components/espfontlib
url = ../../0xFEEDC0DE64/espfontlib.git
[submodule "src/bobbycar-protocol"]
path = src/bobbycar-protocol
url = git@github.com:bobbycar-graz/bobbycar-protocol.git

28
.travis.yml Normal file
View File

@ -0,0 +1,28 @@
language: python
python:
- "2.7"
cache:
directories:
- "~/.platformio"
git:
submodules: false
before_install:
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
install:
- pip install -U platformio
- platformio update
env:
- BUILD_CONFIG=feedc0de_usb
- BUILD_CONFIG=greyhash_usb
- BUILD_CONFIG=aveexy_usb
- BUILD_CONFIG=testbench_usb
- BUILD_CONFIG=mickdermack_usb
- BUILD_CONFIG=peter_usb
script:
- platformio run -e $BUILD_CONFIG

View File

@ -1,46 +1,36 @@
cmake_minimum_required(VERSION 3.16.3)
# !!! 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.
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig)
message(FATAL_ERROR "sdkconfig not found (please run ./switchconf.sh)")
cmake_minimum_required(VERSION 3.13)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
project("untitled" C CXX)
include(CMakeListsPrivate.txt)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsUser.txt)
include(CMakeListsUser.txt)
endif()
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake)
message(FATAL_ERROR "config.cmake not found (please run ./switchconf.sh)")
endif()
file(READ_SYMLINK ${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig result)
if (result STREQUAL "")
message(FATAL_ERROR "sdkconfig is not a symlink (please run ./switchconf.sh)")
endif()
file(READ_SYMLINK ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake result)
if (result STREQUAL "")
message(FATAL_ERROR "config.cmake is not a symlink (please run ./switchconf.sh)")
endif()
include(config.cmake)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
idf_build_set_property(CXX_COMPILE_OPTIONS -std=gnu++23 APPEND)
set(EXTRA_COMPONENT_DIRS
esp_boost
esp-protocols/components
add_custom_target(
Production ALL
COMMAND platformio -c clion run "$<$<NOT:$<CONFIG:All>>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
project(${BOBBY_APP_NAME})
add_custom_target(
Debug ALL
COMMAND platformio -c clion run --target debug "$<$<NOT:$<CONFIG:All>>:-e${CMAKE_BUILD_TYPE}>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
set(expected_build_folder "${CMAKE_CURRENT_SOURCE_DIR}/build")
file(READ_SYMLINK "${expected_build_folder}" expected_build_folder_resolved)
if(NOT IS_ABSOLUTE "${expected_build_folder_resolved}")
get_filename_component(dir "${expected_build_folder}" DIRECTORY)
set(expected_build_folder_resolved "${dir}/${expected_build_folder_resolved}")
endif()
add_executable(Z_DUMMY_TARGET ${SRC_LIST})
if (NOT PROJECT_BINARY_DIR STREQUAL "${expected_build_folder}" AND NOT PROJECT_BINARY_DIR STREQUAL "${expected_build_folder_resolved}")
message(FATAL_ERROR "building in ${PROJECT_BINARY_DIR} is not supported, you have to build in ${expected_build_folder} or ${expected_build_folder_resolved} (please run ./switchconf.sh)")
endif()
add_definitions(-DVESC_CONTROLLER)
add_definitions(-DFEATURE_DPAD)

173
CMakeListsPrivate.txt Normal file
View File

@ -0,0 +1,173 @@
# !!! 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.
set(CMAKE_CONFIGURATION_TYPES "esp32dev" CACHE STRING "Build Types reflect PlatformIO Environments" FORCE)
SET(CMAKE_C_COMPILER "$ENV{HOME}/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc")
SET(CMAKE_CXX_COMPILER "$ENV{HOME}/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++")
SET(CMAKE_CXX_FLAGS "-fno-rtti -fno-exceptions -std=gnu++11 -Werror=all -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-error=unused-function -Os -Wall -nostdlib -Wpointer-arith -Wno-error=unused-but-set-variable -Wno-error=unused-variable -mlongcalls -ffunction-sections -fdata-sections -fstrict-volatile-bitfields")
SET(CMAKE_C_FLAGS "-Wno-old-style-declaration -std=gnu99 -Werror=all -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-error=unused-function -Os -Wall -nostdlib -Wpointer-arith -Wno-error=unused-but-set-variable -Wno-error=unused-variable -mlongcalls -ffunction-sections -fdata-sections -fstrict-volatile-bitfields")
SET(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
if (CMAKE_BUILD_TYPE MATCHES "esp32dev")
add_definitions(-D'WITH_POSIX')
add_definitions(-D'UNITY_INCLUDE_CONFIG_H')
add_definitions(-D'IDF_VER=\"3.30300.190916\"')
add_definitions(-D'PLATFORMIO=40303')
add_definitions(-D'ARDUINO_ESP32_DEV')
add_definitions(-D'ESP32')
add_definitions(-D'ESP_PLATFORM')
add_definitions(-D'F_CPU=240000000L')
add_definitions(-D'HAVE_CONFIG_H')
add_definitions(-D'MBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"')
add_definitions(-D'GCC_NOT_5_2_0=0')
add_definitions(-D'PROJECT_NAME=\"untitled\"')
add_definitions(-D'PROJECT_VER=\"1.0.0\"')
include_directories("${CMAKE_CURRENT_LIST_DIR}/include")
include_directories("${CMAKE_CURRENT_LIST_DIR}/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/avrc/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/smp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/gatt/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/gap/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/a2dp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/sdp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/avct/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/btm/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/rfcomm/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/l2cap/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/avdt/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/stack/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/osi/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/hci/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/common/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/gatt/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/sdp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/ar/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/hh/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/dm/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/av/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/jv/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/hf_client/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/sys/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/bta/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/api/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/external/sbc/encoder/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/external/sbc/decoder/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/std/hid/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/std/battery/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/std/smp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/std/a2dp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/std/dis/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/std/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/esp/blufi/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/profile/esp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/btc/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/device/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/app_trace/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/app_update/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/asio/asio/asio/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/asio/port/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/aws_iot/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/aws_iot/aws-iot-device-sdk-embedded-C/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bootloader_support/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bootloader_support/include_bootloader")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/bt/bluedroid/api/include/api")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/coap/port/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/coap/port/include/coap")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/coap/libcoap/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/coap/libcoap/include/coap")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/console")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/driver/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/efuse/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/efuse/esp32/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp-tls")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp_adc_cal/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp_event/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp_http_client/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp_http_server/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp_https_server/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp_https_ota/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp_ringbuf/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/esp32/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/espcoredump/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/ethernet/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/expat/expat/lib")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/expat/port/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/fatfs/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/freemodbus/modbus/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/freemodbus/modbus_controller")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/freertos/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/heap/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/jsmn/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/json/cJSON")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/libsodium/libsodium/src/libsodium/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/libsodium/port_include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/log/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/lwip/include/apps")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/lwip/lwip/src/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/lwip/port/esp32/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/lwip/port/esp32/include/arch")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/include_compat")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/mbedtls/port/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/mbedtls/mbedtls/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/mdns/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/micro-ecc/micro-ecc")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/mqtt/esp-mqtt/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/nghttp/nghttp2/lib/includes")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/nghttp/port/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/newlib/platform_include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/newlib/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/nvs_flash/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/openssl/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/protobuf-c/protobuf-c")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/protocomm/include/common")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/protocomm/include/security")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/protocomm/include/transports")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/pthread/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/sdmmc/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/smartconfig_ack/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/soc/esp32/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/soc/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/spi_flash/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/spiffs/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/tcp_transport/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/tcpip_adapter/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/unity/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/unity/unity/src")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/ulp/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/vfs/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/wear_levelling/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/wifi_provisioning/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/wpa_supplicant/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/wpa_supplicant/port/include")
include_directories("$ENV{HOME}/.platformio/packages/framework-espidf/components/xtensa-debug-module/include")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/xtensa-esp32-elf")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-xtensa32/lib/gcc/xtensa-esp32-elf/5.2.0/include-fixed")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-xtensa32/lib/gcc/xtensa-esp32-elf/5.2.0/include")
include_directories("$ENV{HOME}/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include")
include_directories("$ENV{HOME}/.platformio/packages/tool-unity")
FILE(GLOB_RECURSE EXTRA_LIB_SOURCES
${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/esp32dev/*.*
)
endif()
FILE(GLOB_RECURSE SRC_LIST
${CMAKE_CURRENT_LIST_DIR}/src/*.*
${CMAKE_CURRENT_LIST_DIR}/lib/*.*
)
list(APPEND SRC_LIST ${EXTRA_LIB_SOURCES})

View File

@ -1,58 +1,13 @@
# bobbycar-boardcomputer-firmware
## Build status
## How to clone and compile?
| Service | Status |
| :--- | ---: |
| Actions (CI) | [![CI](https://github.com/bobbycar-graz/bobbycar-boardcomputer-firmware/actions/workflows/workflow.yml/badge.svg)](https://github.com/bobbycar-graz/bobbycar-boardcomputer-firmware/actions/workflows/workflow.yml) |
| Sonar | [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=bugs)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=bobbycar-graz_bobbycar-boardcomputer-firmware&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware) |
## How to clone ? (READ THIS OR YOU WILL FAIL)
```bash
```
git clone --recursive git@github.com:bobbycar-graz/bobbycar-boardcomputer-firmware.git
cd bobbycar-boardcomputer-firmware/
./esp-idf/install.sh
./switchconf.sh feedc0de
platformio run --environment bobbycar_usb --target upload
```
## How to compile
Also do the initialization if you use an IDE, otherwise build will fail.
```bash
# before you try to build anything, always do this first:
. export.sh
# if needed, switch to the right configuration for your hardware (run with --list to list available configurations)
./switchconf.sh feedc0de
# flash bootloader, partition table and app (only do once)
idf.py -p /dev/ttyUSB0 -b 921600 flash monitor
# flash only app (do this for development as it is much faster)
idf.py -p /dev/ttyUSB0 -b 921600 app-flash monitor
# alternative commands (After '. export.sh')
bobby-build # Builds the firmware
bobby-flash # Flashes the firmware
bobby-app-flash # Just flashes the app partition
bobby-monitor # Opens the serial monitor
bobby-coredump # Opens the coredump-utility
open-ide # Opens qtcreator
```
If you are inside monitor, hit Ctrl+T then Ctrl+X to exit.
Hit Ctrl+T then Ctrl+A to reflash the app and return to monitor (very handy during development)
## How to wire all connections?
![Wiring diagram](/img/wiring.png)
### -DFEATURE_DPAD
![dpad switches with 5 wires](/img/dpadsw.png)
### -DFEATURE_DPAD_3WIRESW
![3 wire switches](/img/3wiresw.png)
### -DFEATURE_ROTARY
![rotary encoder](/img/rotary.png)
![Wiring diagram](/wiring.png)

6
bobbycar.csv Normal file
View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x250000,
app1, app, ota_1, 0x260000, 0x250000,
spiffs, data, spiffs, 0x520000, 0x250000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x250000
5 app1 app ota_1 0x260000 0x250000
6 spiffs data spiffs 0x520000 0x250000

5
bobbycar_noota.csv Normal file
View File

@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x250000,
spiffs, data, spiffs, 0x260000, 0x1a0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x250000
5 spiffs data spiffs 0x260000 0x1a0000

Submodule components/date deleted from b1a75847d5

Submodule components/fmt deleted from 32e16173ce

View File

@ -1,80 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_allfeatures)
set(BOBBY_DEFAULT_USERNAME allfeatures)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
-DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
-DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=7
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW
# -DPINS_DPAD_5WIRESW_OUT=4
# -DPINS_DPAD_5WIRESW_IN1=5
# -DPINS_DPAD_5WIRESW_IN2=27
# -DPINS_DPAD_5WIRESW_IN3=18
# -DPINS_DPAD_5WIRESW_IN4=19
# -DPINS_DPAD_EXTRASW_IN5=25
-DFEATURE_DPAD_6WIRESW
-DPINS_DPAD_6WIRESW_OUT=4
-DPINS_DPAD_6WIRESW_IN1=5
-DPINS_DPAD_6WIRESW_IN2=27
-DPINS_DPAD_6WIRESW_IN3=18
-DPINS_DPAD_6WIRESW_IN4=19
-DPINS_DPAD_6WIRESW_IN5=26
-DFEATURE_GSCHISSENE_DIODE
# -DDPAD_BOARDCOMPUTER_V2
)

View File

@ -1,90 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_aveexy)
set(BOBBY_DEFAULT_USERNAME aveexy)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW
# -DPINS_DPAD_5WIRESW_OUT=4
# -DPINS_DPAD_5WIRESW_IN1=5
# -DPINS_DPAD_5WIRESW_IN2=27
# -DPINS_DPAD_5WIRESW_IN3=18
# -DPINS_DPAD_5WIRESW_IN4=19
# -DPINS_DPAD_EXTRASW_IN5=25
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
-DDPAD_BOARDCOMPUTER_V2
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT1=19
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT2=5
-DPINS_DPAD_BOARDCOMPUTER_V2_IN1=4
-DPINS_DPAD_BOARDCOMPUTER_V2_IN2=18
-DPINS_DPAD_BOARDCOMPUTER_V2_IN3=27
-DPINS_DPAD_BOARDCOMPUTER_V2_IN4=16
# -DDPAD_BOARDCOMPUTER_V2_DEBUG
)

View File

@ -1,87 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_comred)
set(BOBBY_DEFAULT_USERNAMENAME comred)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW
# -DPINS_DPAD_5WIRESW_OUT=4
# -DPINS_DPAD_5WIRESW_IN1=5
# -DPINS_DPAD_5WIRESW_IN2=27
# -DPINS_DPAD_5WIRESW_IN3=18
# -DPINS_DPAD_5WIRESW_IN4=19
# -DPINS_DPAD_EXTRASW_IN5=25
-DFEATURE_DPAD_6WIRESW
-DPINS_DPAD_6WIRESW_OUT=4
-DPINS_DPAD_6WIRESW_IN1=5
-DPINS_DPAD_6WIRESW_IN2=27
-DPINS_DPAD_6WIRESW_IN3=18
-DPINS_DPAD_6WIRESW_IN4=19
-DPINS_DPAD_6WIRESW_IN5=26
-DFEATURE_GSCHISSENE_DIODE
# -DDPAD_BOARDCOMPUTER_V2
)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including plugins")
endif()

View File

@ -1,94 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_comred_new)
set(BOBBY_DEFAULT_USERNAME comred_new)
# add_definitions(
# -DUSER_SETUP_LOADED=1
# -DLOAD_GLCD=1
# -DLOAD_FONT2=1
# -DLOAD_FONT4=1
# -DLOAD_FONT7=1
# -DILI9341_DRIVER=1
# -DTFT_MOSI=13
# -DTFT_SCLK=15
# -DTFT_CS=14
# -DTFT_DC=12
# -DTFT_RST=2
# -DSPI_FREQUENCY=40000000
# )
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW
# -DPINS_DPAD_5WIRESW_OUT=4
# -DPINS_DPAD_5WIRESW_IN1=5
# -DPINS_DPAD_5WIRESW_IN2=27
# -DPINS_DPAD_5WIRESW_IN3=18
# -DPINS_DPAD_5WIRESW_IN4=19
# -DPINS_DPAD_EXTRASW_IN5=25
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
-DDPAD_BOARDCOMPUTER_V2
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT1=19
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT2=5
-DPINS_DPAD_BOARDCOMPUTER_V2_IN1=4
-DPINS_DPAD_BOARDCOMPUTER_V2_IN2=18
-DPINS_DPAD_BOARDCOMPUTER_V2_IN3=27
-DPINS_DPAD_BOARDCOMPUTER_V2_IN4=16
# -DDPAD_BOARDCOMPUTER_V2_DEBUG
)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including plugins")
endif()

View File

@ -1,64 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_feedc0de)
set(BOBBY_DEFAULT_USERNAME feedc0de)
set(BOBBYCAR_BUILDFLAGS
# Pins
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
-DPINS_MOSFET0=4
-DPINS_MOSFET1=5
-DPINS_MOSFET2=25
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=26
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
-DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
-DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
# -DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=255
-DDEFAULT_IMOTMAX=40
-DDEFAULT_IDCMAX=42
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
-DFEATURE_DPAD_5WIRESW_2OUT
-DPINS_DPAD_5WIRESW_OUT1=18
-DPINS_DPAD_5WIRESW_OUT2=19
-DPINS_DPAD_5WIRESW_IN1=27
-DPINS_DPAD_5WIRESW_IN2=32
-DPINS_DPAD_5WIRESW_IN3=33
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
# -DDPAD_BOARDCOMPUTER_V2
)

View File

@ -1,56 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_feedc0de)
set(BOBBY_DEFAULT_USERNAME feedc0de)
set(BOBBYCAR_BUILDFLAGS
# Pins
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
-DPINS_MOSFET0=4
-DPINS_MOSFET1=5
-DPINS_MOSFET2=25
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=26
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
-DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
-DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
# -DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
# -DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=255
-DDEFAULT_IMOTMAX=40
-DDEFAULT_IDCMAX=42
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
-DDPAD_BOARDCOMPUTER_V2
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT1=19
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT2=5
-DPINS_DPAD_BOARDCOMPUTER_V2_IN1=4
-DPINS_DPAD_BOARDCOMPUTER_V2_IN2=18
-DPINS_DPAD_BOARDCOMPUTER_V2_IN3=27
-DPINS_DPAD_BOARDCOMPUTER_V2_IN4=16
)

View File

@ -1,86 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_gernot)
set(BOBBY_DEFAULT_USERNAME gernot)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
# -DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=255
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=7
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW_2OUT
# -DPINS_DPAD_5WIRESW_OUT1=18
# -DPINS_DPAD_5WIRESW_OUT2=19
# -DPINS_DPAD_5WIRESW_IN1=4
# -DPINS_DPAD_5WIRESW_IN2=5
# -DPINS_DPAD_5WIRESW_IN3=27
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
# -DDPAD_BOARDCOMPUTER_V2
)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including plugins")
endif()

View File

@ -1,78 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_greyhash)
set(BOBBY_DEFAULT_USERNAME greyhash)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
-DFEATURE_DPAD_5WIRESW_2OUT
-DPINS_DPAD_5WIRESW_OUT1=5
-DPINS_DPAD_5WIRESW_OUT2=4
-DPINS_DPAD_5WIRESW_IN1=27
-DPINS_DPAD_5WIRESW_IN2=19
-DPINS_DPAD_5WIRESW_IN3=18
# -DDPAD_BOARDCOMPUTER_V2
)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including plugins")
endif()

View File

@ -1,71 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_mick)
set(BOBBY_DEFAULT_USERNAME mick)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
-DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
# -DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=7
-DDEFAULT_FIELDADVMAX=40
# DPAD
-DFEATURE_DPAD_5WIRESW_2OUT
-DPINS_DPAD_5WIRESW_OUT1=5
-DPINS_DPAD_5WIRESW_OUT2=19
-DPINS_DPAD_5WIRESW_IN1=4
-DPINS_DPAD_5WIRESW_IN2=18
-DPINS_DPAD_5WIRESW_IN3=27
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
# -DDPAD_BOARDCOMPUTER_V2
)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including plugins")
endif()

View File

@ -1,81 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_nofeatures)
set(BOBBY_DEFAULT_USERNAME nofeatures)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
# -DFEATURE_ADC_IN
# -DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
# -DFEATURE_LEDBACKLIGHT
# -DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
# -DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=255
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=7
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW_2OUT
# -DPINS_DPAD_5WIRESW_OUT1=18
# -DPINS_DPAD_5WIRESW_OUT2=19
# -DPINS_DPAD_5WIRESW_IN1=4
# -DPINS_DPAD_5WIRESW_IN2=5
# -DPINS_DPAD_5WIRESW_IN3=27
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
# -DDPAD_BOARDCOMPUTER_V2
)

View File

@ -1,86 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_peter)
set(BOBBY_DEFAULT_USERNAME peter)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
-DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
# -DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=255
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=7
-DDEFAULT_FIELDADVMAX=40
# DPAD
-DFEATURE_DPAD_5WIRESW_2OUT
-DPINS_DPAD_5WIRESW_OUT1=18
-DPINS_DPAD_5WIRESW_OUT2=19
-DPINS_DPAD_5WIRESW_IN1=4
-DPINS_DPAD_5WIRESW_IN2=5
-DPINS_DPAD_5WIRESW_IN3=27
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
# -DDPAD_BOARDCOMPUTER_V2
)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including plugins")
endif()

View File

@ -1,79 +0,0 @@
set(BOBBY_APP_NAME bobbyquad_seatbot)
set(BOBBY_DEFAULT_USERNAME seatbot)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
-DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
-DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
-DFEATURE_DPAD_5WIRESW_2OUT
-DPINS_DPAD_5WIRESW_OUT1=4
-DPINS_DPAD_5WIRESW_OUT2=5
-DPINS_DPAD_5WIRESW_IN1=18
-DPINS_DPAD_5WIRESW_IN2=19
-DPINS_DPAD_5WIRESW_IN3=27
# -DDPAD_BOARDCOMPUTER_V2
)
#if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
# include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
# message(WARNING "Including plugins")
#endif()

View File

@ -1,90 +0,0 @@
set(BOBBY_APP_NAME testdevice)
set(BOBBY_DEFAULT_USERNAME testdevice)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DILI9341_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW
# -DPINS_DPAD_5WIRESW_OUT=4
# -DPINS_DPAD_5WIRESW_IN1=5
# -DPINS_DPAD_5WIRESW_IN2=27
# -DPINS_DPAD_5WIRESW_IN3=18
# -DPINS_DPAD_5WIRESW_IN4=19
# -DPINS_DPAD_EXTRASW_IN5=25
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
-DDPAD_BOARDCOMPUTER_V2
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT1=19
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT2=5
-DPINS_DPAD_BOARDCOMPUTER_V2_IN1=4
-DPINS_DPAD_BOARDCOMPUTER_V2_IN2=18
-DPINS_DPAD_BOARDCOMPUTER_V2_IN3=27
-DPINS_DPAD_BOARDCOMPUTER_V2_IN4=16
# -DDPAD_BOARDCOMPUTER_V2_DEBUG
)

View File

@ -1,90 +0,0 @@
set(BOBBY_APP_NAME testdevice2)
set(BOBBY_DEFAULT_USERNAME testdevice2)
add_definitions(
-DUSER_SETUP_LOADED=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT7=1
-DST7789_DRIVER=1
-DTFT_MOSI=13
-DTFT_SCLK=15
-DTFT_CS=14
-DTFT_DC=12
-DTFT_RST=2
-DSPI_FREQUENCY=40000000
)
set(BOBBYCAR_BUILDFLAGS
# Pins
-DPINS_GAS=34
-DPINS_BREMS=35
# -DFEATURE_JOYSTICK
# -DPINS_RX1=4
# -DPINS_TX1=5
# -DPINS_RX2=22
# -DPINS_TX2=23
# -DPINS_MOSFET0=18
# -DPINS_MOSFET1=19
# -DPINS_MOSFET2=21
# -DPINS_GAMETRAKX=34
# -DPINS_GAMETRAKY=39
# -DPINS_GAMETRAKDIST=36
-DPINS_LEDBACKLIGHT=23
-DPINS_LEDSTRIP=33
# Config flags
-DFEATURE_ADC_IN
-DFEATURE_CAN
# -DFEATURE_SERIAL
# -DFEATURE_MOSFETS
# -DFEATURE_BLUETOOTH
# -DFEATURE_BMS
# -DFEATURE_GAMETRAK
# -DFEATURE_POWERSUPPLY
-DFEATURE_LEDBACKLIGHT
-DLEDBACKLIGHT_INVERTED
# -DLEDSTRIP_WRONG_DIRECTION
-DHEAP_LRGST_CRASH_TEXT_FIX
# Default values
-DDEFAULT_SWAPSCREENBYTES=false
-DDEFAULT_INVERTFRONTLEFT=false
-DDEFAULT_INVERTFRONTRIGHT=true
-DDEFAULT_INVERTBACKLEFT=false
-DDEFAULT_INVERTBACKRIGHT=true
-DDEFAULT_WHEELDIAMETER=200
-DDEFAULT_IMOTMAX=28
-DDEFAULT_IDCMAX=30
-DDEFAULT_NMOTMAX=2000
-DDEFAULT_FIELDWEAKMAX=17
-DDEFAULT_FIELDADVMAX=40
# DPAD
# -DFEATURE_DPAD_5WIRESW
# -DPINS_DPAD_5WIRESW_OUT=4
# -DPINS_DPAD_5WIRESW_IN1=5
# -DPINS_DPAD_5WIRESW_IN2=27
# -DPINS_DPAD_5WIRESW_IN3=18
# -DPINS_DPAD_5WIRESW_IN4=19
# -DPINS_DPAD_EXTRASW_IN5=25
# -DFEATURE_DPAD_6WIRESW
# -DPINS_DPAD_6WIRESW_OUT=4
# -DPINS_DPAD_6WIRESW_IN1=5
# -DPINS_DPAD_6WIRESW_IN2=27
# -DPINS_DPAD_6WIRESW_IN3=18
# -DPINS_DPAD_6WIRESW_IN4=19
# -DPINS_DPAD_6WIRESW_IN5=26
# -DFEATURE_GSCHISSENE_DIODE
-DDPAD_BOARDCOMPUTER_V2
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT1=19
-DPINS_DPAD_BOARDCOMPUTER_V2_OUT2=5
-DPINS_DPAD_BOARDCOMPUTER_V2_IN1=4
-DPINS_DPAD_BOARDCOMPUTER_V2_IN2=18
-DPINS_DPAD_BOARDCOMPUTER_V2_IN3=27
-DPINS_DPAD_BOARDCOMPUTER_V2_IN4=16
# -DDPAD_BOARDCOMPUTER_V2_DEBUG
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
dependencies:
espressif/esp-idf-cxx:
component_hash: df7921090d6601b268b99b5d54d2f53bb5ea25dbd58cc53961ef7784326621de
source:
service_url: https://api.components.espressif.com/
type: service
version: 1.0.1-beta
idf:
component_hash: null
source:
type: idf
version: 5.2.0
manifest_hash: 04b1e89bb78c4187b4d7bc0cf9461b7a3475762e58fec6f3bb49a885c56532c2
target: esp32
version: 1.0.0

Submodule esp-idf deleted from 14b365579b

Submodule esp-protocols deleted from d38f04b88f

Submodule esp_boost deleted from 76e5b5075c

View File

@ -1,56 +0,0 @@
BOBBY_ROOT="$(dirname "$BASH_SOURCE")"
if [[ ! -f "${BOBBY_ROOT}/esp-idf/export.sh" ]]
then
echo "esp-idf is missing, please check out all needed submodules!"
echo "git submodule update --init --recursive"
return
fi
. ${BOBBY_ROOT}/esp-idf/export.sh
complete -W "$(./switchconf.sh --list)" ./switchconf.sh
complete -W "$(./switchconf.sh --list)" switchconf
BOBBY_INIT_FAILED=
if [[ -e "build" ]] && [[ ! -L "build" ]]
then
echo "ERROR: build folder exists but isnt a symlink!"
BOBBY_INIT_FAILED=1
fi
if [[ -e "sdkconfig" ]]
then
if [[ ! -L "sdkconfig" ]]
then
echo "ERROR: sdkconfig exists but isnt a symlink!"
BOBBY_INIT_FAILED=1
fi
else
echo "ERROR: sdkconfig does not exist"
BOBBY_INIT_FAILED=1
fi
if [[ -e "config.cmake" ]]
then
if [[ ! -L "config.cmake" ]]
then
echo "ERROR: config.cmake exists but isnt a symlink!"
BOBBY_INIT_FAILED=1
fi
else
echo "ERROR: config.cmake does not exist"
BOBBY_INIT_FAILED=1
fi
if [[ ! -z "$BOBBY_INIT_FAILED" ]]
then
echo "run ./switchconf.sh to fix all listed issues"
return
fi
export PATH=$PATH:$(pwd)/tools
alias open-ide=open_ide
alias switchconf=./switchconf.sh
alias bobby-build="idf.py build"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

BIN
icons/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
icons/checked.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
icons/unchecked.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

39
include/README Normal file
View File

@ -0,0 +1,39 @@
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

View File

@ -1,601 +0,0 @@
set(BOBBY_HEADERS
accessorhelpers.h
accessors/globalaccessors.h
accessors/settingsaccessors.h
accessors/wifiaccessors.h
accessors/wifiapconfigaccessors.h
accessors/wifistaconfigaccessors.h
actions/assertaction.h
actions/bluetoothbeginaction.h
actions/bluetoothbeginmasteraction.h
actions/bluetoothconnectbmsaction.h
actions/bluetoothdisconnectaction.h
actions/bluetoothendaction.h
actions/bluetoothflushaction.h
actions/bmsturnoffchargeaction.h
actions/bmsturnoffdischargeaction.h
actions/bmsturnonchargeaction.h
actions/bmsturnondischargeaction.h
actions/dividebyzeroaction.h
actions/erasenvsaction.h
actions/ledstripanimationactions.h
actions/ledstripblinkactions.h
actions/loadsettingsaction.h
actions/modesettingsaction.h
actions/qraction.h
actions/resetnvsaction.h
actions/savesettingsaction.h
actions/setupactions.h
actions/switchprofileaction.h
actions/tempomatmodeapplycurrentpeedaction.h
actions/updateswapfrontbackaction.h
actions/wifiscanaction.h
actions/wifistascanaction.h
actions/wifistascanclearaction.h
battery.h
ble_bobby.h
bletexthelpers.h
bluetooth_bobby.h
bluetoothmode.h
bluetoothtexthelpers.h
bmsutils.h
bobbyblinker.h
bobbybuttons.h
bobbycheckbox.h
bobbyerrorhandler.h
bobbyhupe.h
bobbyquickactions.h
bobbyschedulertask.h
bobbytypesafeenum.h
buildserver.h
can.h
changevaluedisplay_bluetoothmode.h
changevaluedisplay_bobbyquickactions.h
changevaluedisplay_controlmode.h
changevaluedisplay_controltype.h
changevaluedisplay_larsmmode_mode.h
changevaluedisplay_unifiedmodelmode.h
cloud.h
cloudtexthelpers.h
configutils_bobby.h
controller.h
debugcolorhelpers.h
debuginputhandler.h
debugtexthelpers.h
displays/batterygraphdisplay.h
displays/batteryinfodisplay.h
displays/bmsdisplay.h
displays/bobbychangevaluedisplay.h
displays/bobbydisplay.h
displays/bobbydisplaywithtitle.h
displays/bobbygraphdisplay.h
displays/bobbymenudisplay.h
displays/bobbypopupdisplay.h
displays/bobbysplitgraphdisplay.h
displays/calibratevoltagedisplay.h
displays/confiscationdisplay.h
displays/gameoflifedisplay.h
displays/gametrakcalibratedisplay.h
displays/joystickdebugdisplay.h
displays/ledstripcolorsdisplay.h
displays/lockscreen.h
displays/menudisplaywithtime.cpp
displays/menudisplaywithtime.h
displays/menus/aboutmenu.h
displays/menus/batterydebugmenu.h
displays/menus/batterymenu.h
displays/menus/blesettingsmenu.h
displays/menus/bluetoothsettingsmenu.h
displays/menus/bmsmenu.h
displays/menus/boardcomputerhardwaresettingsmenu.h
displays/menus/buzzermenu.h
displays/menus/candebugmenu.h
displays/menus/cloudsettingsmenu.h
displays/menus/commanddebugmenu.h
displays/menus/controllerhardwaresettingsmenu.h
displays/menus/crashmenu.h
displays/menus/debugmenu.h
displays/menus/defaultmodesettingsmenu.h
displays/menus/demosmenu.h
displays/menus/dynamicdebugmenu.h
displays/menus/enablemenu.h
displays/menus/espnowmenu.h
displays/menus/espnowsettingsmenu.h
displays/menus/extrabuttoncalibratemenu.h
displays/menus/featureflagsmenu.h
displays/menus/feedbackdebugmenu.h
displays/menus/gametrakmodesettingsmenu.h
displays/menus/garagemenu.h
displays/menus/gitmenu.h
displays/menus/graphsmenu.h
displays/menus/greenpassmenu.h
displays/menus/handbremssettingsmenu.h
displays/menus/invertmenu.h
displays/menus/larsmmodesettingsmenu.h
displays/menus/ledstripmenu.h
displays/menus/ledstripselectblinkmenu.h
displays/menus/ledstripselectotamode.h
displays/menus/limitssettingsmenu.h
displays/menus/lockscreensettingsmenu.h
displays/menus/mainmenu.h
displays/menus/manageprofilesmenu.h
displays/menus/mickmodesettingsmenu.h
displays/menus/modessettingsmenu.h
displays/menus/mosfetsmenu.h
displays/menus/motorfeedbackdebugmenu.h
displays/menus/motorstatedebugmenu.h
displays/menus/motortestmodesettingsmenu.h
displays/menus/networksettingsmenu.h
displays/menus/otamenu.h
displays/menus/profilesmenu.h
displays/menus/recoverymenu.h
displays/menus/remotecontrolmodesettingsmenu.h
displays/menus/selectbuildserverbranch.h
displays/menus/selectbuildservermenu.h
displays/menus/selectmodemenu.h
displays/menus/selectotabuildmenu.h
displays/menus/settingsmenu.h
displays/menus/setupquickactionsmenu.h
displays/menus/statisticsmenu.h
displays/menus/taskmanagermenu.h
displays/menus/tempomatmodesettingsmenu.h
displays/menus/timersmenu.h
displays/menus/timesettingsmenu.h
displays/menus/typesafeenumchangemenu.h
displays/menus/udpcloudsettingsmenu.h
displays/menus/wifiapclientsmenu.h
displays/menus/wifiapsettingsmenu.h
displays/menus/wifistaconfigentrymenu.h
displays/menus/wifistaconfigsmenu.h
displays/menus/wifistascanentrymenu.h
displays/menus/wifistascanmenu.h
displays/menus/wifistasettingsmenu.h
displays/metersdisplay.h
displays/pingpongdisplay.h
displays/potiscalibratedisplay.h
displays/poweroffdisplay.h
displays/powersupplydisplay.h
displays/qrcodedebug.h
displays/qrdisplay.h
displays/qrimportdisplay.h
displays/rebootscreen.h
displays/setup/ask_calibrate_other_buttons.h
displays/setup/ask_setup_clouds.h
displays/setup/basic_buttons.h
displays/setup/calibrate_potis.h
displays/setup/final_information.h
displays/setup/information.h
displays/setup/setup_cloud.h
displays/speedinfodisplay.h
displays/spirodisplay.h
displays/starfielddisplay.h
displays/statusdisplay.h
displays/updatedisplay.h
displays/xydebugdisplay.h
dnsannounce.h
dpad.h
dpad3wire.h
dpad5wire.h
dpad5wire_2out.h
dpad6wire.h
dpad_boardcomputer_v2.h
drivingstatistics.h
espnowfunctions.h
esptexthelpers.h
feedbackemulator.h
feedbackparser.h
globals.h
handbremse.h
icons/alert.h
icons/battery.h
icons/bluetooth.h
icons/bms.h
icons/bobbycar.h
icons/buzzer.h
icons/close.h
icons/demos.h
icons/git.h
icons/graph.h
icons/greenpass.h
icons/hardware.h
icons/info.h
icons/lock.h
icons/logo.h
icons/modes.h
icons/neopixel.h
icons/poweroff.h
icons/presets.h
icons/reboot.h
icons/scan.h
icons/settings.h
icons/shortcircuit.h
icons/statistics.h
icons/time.h
icons/update.h
icons/wifi.h
ledstrip.h
ledstripdefines.h
macros_bobbycar.h
modeinterface.h
modes.h
modes/defaultmode.h
modes/gametrakmode.h
modes/ignoreinputmode.h
modes/larsmmode.h
modes/mickmode.h
modes/motortestmode.h
modes/remotecontrolmode.h
modes/tempomatmode.h
modes/wheelchairmode.h
mosfets.h
motorpwmlimiter.h
newsettings.h
ota.h
potis.h
presets.h
profilesettings.h
qrimport.h
rotary.h
screens.h
serial_bobby.h
settingspersister.h
settingsutils.h
setup.h
softpwmlimiter.h
statistics.h
statustexthelper.h
taskmanager.h
tempomat.h
texthelpers/networktexthelpers.h
texthelpers/wifiaptexthelpers.h
texthelpers/wifistatexthelpers.h
time_bobbycar.h
types.h
typeutils.h
udpcloud.h
unifiedmodelmode.h
utils.h
webserver.h
webserver_displaycontrol.h
webserver_dumpnvs.h
webserver_lock.h
webserver_newsettings.h
webserver_ota.h
webserver_settings.h
widgets/doubleprogressbar.h
wifi_bobbycar.h
wifiguiutils.h
)
set(BOBBY_SOURCES
accessors/wifistaconfigaccessors.cpp
actions/assertaction.cpp
actions/bluetoothbeginaction.cpp
actions/bluetoothbeginmasteraction.cpp
actions/bluetoothconnectbmsaction.cpp
actions/bluetoothdisconnectaction.cpp
actions/bluetoothendaction.cpp
actions/bluetoothflushaction.cpp
actions/bmsturnoffchargeaction.cpp
actions/bmsturnoffdischargeaction.cpp
actions/bmsturnonchargeaction.cpp
actions/bmsturnondischargeaction.cpp
actions/dividebyzeroaction.cpp
actions/erasenvsaction.cpp
actions/ledstripanimationactions.cpp
actions/ledstripblinkactions.cpp
actions/loadsettingsaction.cpp
actions/modesettingsaction.cpp
actions/qraction.cpp
actions/resetnvsaction.cpp
actions/savesettingsaction.cpp
actions/setupactions.cpp
actions/switchprofileaction.cpp
actions/tempomatmodeapplycurrentpeedaction.cpp
actions/updateswapfrontbackaction.cpp
actions/wifiscanaction.cpp
actions/wifistascanaction.cpp
actions/wifistascanclearaction.cpp
battery.cpp
ble_bobby.cpp
bletexthelpers.cpp
bluetooth_bobby.cpp
bluetoothmode.cpp
bluetoothtexthelpers.cpp
bmsutils.cpp
bobbyblinker.cpp
bobbybuttons.cpp
bobbyerrorhandler.cpp
bobbyhupe.cpp
bobbyquickactions.cpp
buildserver.cpp
can.cpp
changevaluedisplay_bluetoothmode.cpp
changevaluedisplay_bobbyquickactions.cpp
changevaluedisplay_controlmode.cpp
changevaluedisplay_controltype.cpp
changevaluedisplay_larsmmode_mode.cpp
changevaluedisplay_unifiedmodelmode.cpp
cloud.cpp
cloudtexthelpers.cpp
configwrapper_bobby.cpp
controller.cpp
debugcolorhelpers.cpp
debuginputhandler.cpp
debugtexthelpers.cpp
displays/batterygraphdisplay.cpp
displays/batteryinfodisplay.cpp
displays/bmsdisplay.cpp
displays/bobbychangevaluedisplay.cpp
displays/bobbydisplay.cpp
displays/bobbydisplaywithtitle.cpp
displays/bobbygraphdisplay.cpp
displays/bobbymenudisplay.cpp
displays/bobbypopupdisplay.cpp
displays/bobbysplitgraphdisplay.cpp
displays/calibratevoltagedisplay.cpp
displays/confiscationdisplay.cpp
displays/gameoflifedisplay.cpp
displays/gametrakcalibratedisplay.cpp
displays/joystickdebugdisplay.cpp
displays/ledstripcolorsdisplay.cpp
displays/lockscreen.cpp
displays/menus/aboutmenu.cpp
displays/menus/batterydebugmenu.cpp
displays/menus/batterymenu.cpp
displays/menus/blesettingsmenu.cpp
displays/menus/bluetoothsettingsmenu.cpp
displays/menus/bmsmenu.cpp
displays/menus/boardcomputerhardwaresettingsmenu.cpp
displays/menus/buzzermenu.cpp
displays/menus/candebugmenu.cpp
displays/menus/cloudsettingsmenu.cpp
displays/menus/commanddebugmenu.cpp
displays/menus/controllerhardwaresettingsmenu.cpp
displays/menus/crashmenu.cpp
displays/menus/debugmenu.cpp
displays/menus/defaultmodesettingsmenu.cpp
displays/menus/demosmenu.cpp
displays/menus/dynamicdebugmenu.cpp
displays/menus/enablemenu.cpp
displays/menus/espnowmenu.cpp
displays/menus/espnowsettingsmenu.cpp
displays/menus/extrabuttoncalibratemenu.cpp
displays/menus/featureflagsmenu.cpp
displays/menus/feedbackdebugmenu.cpp
displays/menus/gametrakmodesettingsmenu.cpp
displays/menus/garagemenu.cpp
displays/menus/gitmenu.cpp
displays/menus/graphsmenu.cpp
displays/menus/greenpassmenu.cpp
displays/menus/handbremssettingsmenu.cpp
displays/menus/invertmenu.cpp
displays/menus/larsmmodesettingsmenu.cpp
displays/menus/ledstripmenu.cpp
displays/menus/ledstripselectblinkmenu.cpp
displays/menus/ledstripselectotamode.cpp
displays/menus/limitssettingsmenu.cpp
displays/menus/lockscreensettingsmenu.cpp
displays/menus/mainmenu.cpp
displays/menus/manageprofilesmenu.cpp
displays/menus/mickmodesettingsmenu.cpp
displays/menus/modessettingsmenu.cpp
displays/menus/mosfetsmenu.cpp
displays/menus/motorfeedbackdebugmenu.cpp
displays/menus/motorstatedebugmenu.cpp
displays/menus/motortestmodesettingsmenu.cpp
displays/menus/networksettingsmenu.cpp
displays/menus/otamenu.cpp
displays/menus/profilesmenu.cpp
displays/menus/recoverymenu.cpp
displays/menus/remotecontrolmodesettingsmenu.cpp
displays/menus/selectbuildserverbranch.cpp
displays/menus/selectbuildservermenu.cpp
displays/menus/selectmodemenu.cpp
displays/menus/selectotabuildmenu.cpp
displays/menus/settingsmenu.cpp
displays/menus/setupquickactionsmenu.cpp
displays/menus/statisticsmenu.cpp
displays/menus/taskmanagermenu.cpp
displays/menus/tempomatmodesettingsmenu.cpp
displays/menus/timersmenu.cpp
displays/menus/timesettingsmenu.cpp
displays/menus/typesafeenumchangemenu.cpp
displays/menus/udpcloudsettingsmenu.cpp
displays/menus/wifiapclientsmenu.cpp
displays/menus/wifiapsettingsmenu.cpp
displays/menus/wifistaconfigentrymenu.cpp
displays/menus/wifistaconfigsmenu.cpp
displays/menus/wifistascanentrymenu.cpp
displays/menus/wifistascanmenu.cpp
displays/menus/wifistasettingsmenu.cpp
displays/metersdisplay.cpp
displays/pingpongdisplay.cpp
displays/potiscalibratedisplay.cpp
displays/poweroffdisplay.cpp
displays/powersupplydisplay.cpp
displays/qrcodedebug.cpp
displays/qrdisplay.cpp
displays/qrimportdisplay.cpp
displays/rebootscreen.cpp
displays/setup/ask_calibrate_other_buttons.cpp
displays/setup/ask_setup_clouds.cpp
displays/setup/basic_buttons.cpp
displays/setup/calibrate_potis.cpp
displays/setup/final_information.cpp
displays/setup/information.cpp
displays/setup/setup_cloud.cpp
displays/speedinfodisplay.cpp
displays/spirodisplay.cpp
displays/starfielddisplay.cpp
displays/statusdisplay.cpp
displays/updatedisplay.cpp
displays/xydebugdisplay.cpp
dnsannounce.cpp
dpad.cpp
dpad3wire.cpp
dpad5wire.cpp
dpad5wire_2out.cpp
dpad6wire.cpp
dpad_boardcomputer_v2.cpp
drivingstatistics.cpp
espnowfunctions.cpp
esptexthelpers.cpp
feedbackemulator.cpp
feedbackparser.cpp
globals.cpp
handbremse.cpp
icons/alert.cpp
icons/battery.cpp
icons/bluetooth.cpp
icons/bms.cpp
icons/bobbycar.cpp
icons/buzzer.cpp
icons/close.cpp
icons/demos.cpp
icons/git.cpp
icons/graph.cpp
icons/greenpass.cpp
icons/hardware.cpp
icons/info.cpp
icons/lock.cpp
icons/logo.cpp
icons/modes.cpp
icons/neopixel.cpp
icons/poweroff.cpp
icons/presets.cpp
icons/reboot.cpp
icons/scan.cpp
icons/settings.cpp
icons/shortcircuit.cpp
icons/statistics.cpp
icons/time.cpp
icons/update.cpp
icons/wifi.cpp
ledstrip.cpp
ledstripdefines.cpp
macros_bobbycar.cpp
main.cpp
modeinterface.cpp
modes.cpp
modes/defaultmode.cpp
modes/gametrakmode.cpp
modes/ignoreinputmode.cpp
modes/larsmmode.cpp
modes/mickmode.cpp
modes/motortestmode.cpp
modes/remotecontrolmode.cpp
modes/tempomatmode.cpp
modes/wheelchairmode.cpp
mosfets.cpp
motorpwmlimiter.cpp
newsettings.cpp
ota.cpp
potis.cpp
presets.cpp
profilesettings.cpp
qrimport.cpp
rotary.cpp
screens.cpp
serial_bobby.cpp
settingspersister.cpp
settingsutils.cpp
setup.cpp
softpwmlimiter.cpp
statistics.cpp
statustexthelper.cpp
taskmanager.cpp
tempomat.cpp
texthelpers/networktexthelpers.cpp
texthelpers/wifiaptexthelpers.cpp
texthelpers/wifistatexthelpers.cpp
time_bobbycar.cpp
types.cpp
udpcloud.cpp
unifiedmodelmode.cpp
utils.cpp
webserver.cpp
webserver_displaycontrol.cpp
webserver_dumpnvs.cpp
webserver_lock.cpp
webserver_newsettings.cpp
webserver_ota.cpp
webserver_settings.cpp
widgets/doubleprogressbar.cpp
wifi_bobbycar.cpp
wifiguiutils.cpp
)
set(dependencies
freertos nvs_flash esp_http_server esp_https_ota mdns app_update esp_system esp_websocket_client driver esp_adc
arduino-esp32 ArduinoJson esp-nimble-cpp FastLED-idf TFT_eSPI QRCode-esp32
bobbycar-protocol cpputils cxx-ring-buffer date sunset
espasynchttpreq espasyncota espchrono espcpputils espconfiglib esp-gui-lib esphttpdutils espwifistack fmt
)
idf_component_register(
SRCS
${BOBBY_HEADERS}
${BOBBY_SOURCES}
INCLUDE_DIRS
.
REQUIRES
${dependencies}
)
execute_process(COMMAND git rev-parse HEAD
OUTPUT_VARIABLE GIT_REV ERROR_QUIET
)
execute_process(
COMMAND git log -1 --pretty=%B
OUTPUT_VARIABLE GIT_MESSAGE ERROR_QUIET
)
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE GIT_BRANCH
)
execute_process(
COMMAND git status --short
OUTPUT_VARIABLE GIT_STATUS
)
if (NOT GIT_STATUS STREQUAL "")
set(GIT_STATUS "dirty")
else()
set(GIT_STATUS "clean")
endif()
string(STRIP "${GIT_REV}" GIT_REV)
string(SUBSTRING "${GIT_REV}" 1 7 GIT_SHORT_REV)
string(STRIP "${GIT_MESSAGE}" GIT_MESSAGE)
string(REPLACE "\n" " " GIT_MESSAGE "${GIT_MESSAGE}")
string(REPLACE "\"" "\\\"" GIT_MESSAGE "${GIT_MESSAGE}")
string(SUBSTRING "${GIT_MESSAGE}" 0 100 GIT_MESSAGE)
string(STRIP "${GIT_BRANCH}" GIT_BRANCH)
message(WARNING "Git revision: ${GIT_REV}")
message(WARNING "Git short revision: ${GIT_SHORT_REV}")
message(WARNING "Git message: ${GIT_MESSAGE}")
message(WARNING "Git branch: ${GIT_BRANCH}")
message(WARNING "Git status: ${GIT_STATUS}")
if(NOT DEFINED BOBBY_DEFAULT_USERNAME)
message(FATAL_ERROR "Please define BOBBY_DEFAULT_USERNAME")
endif()
target_compile_options(${COMPONENT_TARGET}
PRIVATE
-fstack-reuse=all
-fstack-protector-all
-fdiagnostics-color=always
-Wno-unused-function
-Wno-deprecated-declarations
-Wno-missing-field-initializers
-Wno-parentheses
-DGIT_REV="${GIT_REV}"
-DGIT_SHORT_REV="${GIT_SHORT_REV}"
-DGIT_MESSAGE="${GIT_MESSAGE}"
-DGIT_BRANCH="${GIT_BRANCH}"
-DBOBBY_DEFAULT_USERNAME="${BOBBY_DEFAULT_USERNAME}"
${BOBBYCAR_BUILDFLAGS}
)

View File

@ -1,78 +0,0 @@
#pragma once
// system includes
#include <cstdint>
#include <expected>
// 3rdparty lib includes
#include <accessorinterface.h>
// local includes
#include "utils.h"
#include "newsettings.h"
//! Special type of RefAccessor that also saves settings after setValue()
template<typename T>
struct RefAccessorSaveSettings : public virtual espgui::RefAccessor<T>
{
typename espgui::AccessorInterface<T>::setter_result_t setValue(T value) override
{
espgui::RefAccessor<T>::setValue(value);
if (!saveProfileSettings())
return std::unexpected("saveProfileSettings() failed!");
return {};
};
};
template<typename T>
struct NewSettingsAccessor : public virtual espgui::AccessorInterface<T>
{
virtual ConfigWrapper<T>& getConfig() const = 0;
T getValue() const override
{
return getConfig().value();
}
typename espgui::AccessorInterface<T>::setter_result_t setValue(T value) override
{
return configs.write_config(getConfig(), value);
}
};
template<typename T>
struct NewSettingsChronoAdaptorAccessor;
template<>
struct NewSettingsChronoAdaptorAccessor<espchrono::minutes32> : public virtual espgui::AccessorInterface<int32_t>
{
virtual ConfigWrapper<espchrono::minutes32>& getConfig() const = 0;
int32_t getValue() const override
{
return getConfig().value().count();
}
typename espgui::AccessorInterface<int32_t>::setter_result_t setValue(int32_t value) override
{
return configs.write_config(getConfig(), espchrono::minutes32{value});
}
};
template<>
struct NewSettingsChronoAdaptorAccessor<espchrono::milliseconds32> : public virtual espgui::AccessorInterface<int32_t>
{
virtual ConfigWrapper<espchrono::milliseconds32>& getConfig() const = 0;
int32_t getValue() const override
{
return getConfig().value().count();
}
typename espgui::AccessorInterface<int32_t>::setter_result_t setValue(int32_t value) override
{
return configs.write_config(getConfig(), espchrono::milliseconds32{value});
}
};

View File

@ -1,12 +0,0 @@
#pragma once
// local includes
#include "accessorinterface.h"
#include "globals.h"
#include "modes/tempomatmode.h"
struct AvgSpeedAccessor : public espgui::RefAccessor<float> { float &getRef() const override { return avgSpeed; } };
struct AvgSpeedKmhAccessor : public espgui::RefAccessor<float> { float &getRef() const override { return avgSpeedKmh; } };
struct SumCurrentAccessor : public espgui::RefAccessor<float> { float &getRef() const override { return sumCurrent; } };
struct TempomatModeCruiseMotTgtAccessor : public espgui::RefAccessor<int16_t> { int16_t &getRef() const override { return modes::tempomatMode.nCruiseMotTgt; } };

View File

@ -1,279 +0,0 @@
#pragma once
// system includes
#include <expected>
// 3rdparty lib includes
#include <accessorinterface.h>
// local includes
#include "globals.h"
#include "utils.h"
#include "accessorhelpers.h"
#include "newsettings.h"
// Bluetooth
struct BluetoothNameAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.bluetoothName; } };
// Buzzer
struct ReverseBeepAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.reverseBeep; } };
struct ReverseBeepFreq0Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.reverseBeepFreq0; } };
struct ReverseBeepFreq1Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.reverseBeepFreq1; } };
struct ReverseBeepDuration0Accessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.reverseBeepDuration0; } };
struct ReverseBeepDuration1Accessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.reverseBeepDuration1; } };
// Limits
struct IMotMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.limits.iMotMax; } };
struct IDcMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.limits.iDcMax; } };
struct NMotMaxKmhAccessor : public virtual espgui::AccessorInterface<int16_t>
{
int16_t getValue() const override { return convertToKmh(profileSettings.limits.nMotMax); }
espgui::AccessorInterface<int16_t>::setter_result_t setValue(int16_t value) override
{
profileSettings.limits.nMotMax = convertFromKmh(value);
if (!saveProfileSettings())
return std::unexpected("saveProfileSettings() failed!");
return {};
}
};
struct NMotMaxRpmAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.limits.nMotMax; } };
struct FieldWeakMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.limits.fieldWeakMax; } };
struct PhaseAdvMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.limits.phaseAdvMax; } };
// Bluetooth Low Energy
struct BleEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.bleSettings.bleEnabled; } };
struct BleFenceEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.bleSettings.bleFenceEnabled; } };
// Cloud
struct CloudEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.cloudSettings.cloudEnabled; } };
struct CloudTransmitTimeoutAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.cloudSettings.cloudTransmitTimeout; } };
struct CloudSendStatisticsAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.cloudSettings.sendStatistic; } };
struct CloudURLAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.cloudUrl; } };
struct CloudKeyAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.cloudSettings.cloudKey; } };
// Time
//struct TimezoneOffsetAccessor : public NewSettingsAccessor<int32_t> { ConfigWrapper<int32_t> &getConfig() const override { return configs.timezoneOffset; } };
struct TimezoneOffsetAccessor : public NewSettingsChronoAdaptorAccessor<espchrono::minutes32> { ConfigWrapper<espchrono::minutes32> &getConfig() const override { return configs.timezoneOffset; } };
struct DaylightSavingModeAccessor : public NewSettingsAccessor<espchrono::DayLightSavingMode> { ConfigWrapper<espchrono::DayLightSavingMode> &getConfig() const override { return configs.timeDst; } };
struct TimeServerEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.timeServerEnabled; } };
struct TimeServerAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.timeServer; } };
struct TimeSyncModeAccessor : public NewSettingsAccessor<sntp_sync_mode_t> { ConfigWrapper<sntp_sync_mode_t> &getConfig() const override { return configs.timeSyncMode; } };
//struct TimeSyncIntervalAccessor : public NewSettingsAccessor<int32_t> { ConfigWrapper<int32_t> &getConfig() const override { return configs.timeSyncInterval; } };
struct TimeSyncIntervalAccessor : public NewSettingsChronoAdaptorAccessor<espchrono::milliseconds32> { ConfigWrapper<espchrono::milliseconds32> &getConfig() const override { return configs.timeSyncInterval; } };
// Controller Hardware
struct FrontLeftEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.enableFrontLeft; } };
struct FrontRightEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.enableFrontRight; } };
struct BackLeftEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.enableBackLeft; } };
struct BackRightEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.enableBackRight; } };
struct FrontLeftInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.invertFrontLeft; } };
struct FrontRightInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.invertFrontRight; } };
struct BackLeftInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.invertBackLeft; } };
struct BackRightInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.controllerHardware.invertBackRight; } };
struct WheelDiameterMmAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.controllerHardware.wheelDiameter; } };
struct WheelDiameterInchAccessor : public virtual espgui::AccessorInterface<float>
{
float getValue() const override { return convertToInch(configs.controllerHardware.wheelDiameter.value()); }
espgui::AccessorInterface<int16_t>::setter_result_t setValue(float value) override
{
// profileSettings.controllerHardware.wheelDiameter = convertFromInch(value);
// if (!saveProfileSettings())
// return std::unexpected("saveProfileSettings() failed!");
// return {};
return configs.write_config(configs.controllerHardware.wheelDiameter, convertFromInch(value));
}
};
struct NumMagnetPolesAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.controllerHardware.numMagnetPoles; } };
struct SwapFrontBackAccessor : public virtual espgui::AccessorInterface<bool> {
bool getValue() const override { return configs.controllerHardware.swapFrontBack.value(); }
setter_result_t setValue(bool value) override
{
const auto err = configs.write_config(configs.controllerHardware.swapFrontBack, value);
#ifdef FEATURE_SERIAL
updateSwapFrontBack();
#endif
return err;
}
};
// CAN
#ifdef FEATURE_CAN
struct SendFrontCanCmdAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.controllerHardware.sendFrontCanCmd; } };
struct SendBackCanCmdAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.controllerHardware.sendBackCanCmd; } };
struct CanTransmitTimeoutAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.controllerHardware.canTransmitTimeout; } };
struct CanReceiveTimeoutAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.controllerHardware.canReceiveTimeout; } };
#endif
// Input devices
struct SampleCountAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.sampleCount; } };
struct GasMinAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.gasMin; } };
struct GasMaxAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.gasMax; } };
struct BremsMinAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.bremsMin; } };
struct BremsMaxAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.bremsMax; } };
#if defined(FEATURE_DPAD) || defined(FEATURE_DPAD_3WIRESW) || defined(FEATURE_DPAD_5WIRESW) || defined(FEATURE_DPAD_5WIRESW_2OUT) || defined (FEATURE_DPAD_6WIRESW) || defined (DPAD_BOARDCOMPUTER_V2)
struct DPadDebounceAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadDebounce; } };
struct ButtonDelayAccessor : public NewSettingsAccessor<uint16_t> { ConfigWrapper<uint16_t> &getConfig() const override { return configs.buttonReadDelay; } };
#endif
#ifdef FEATURE_GAMETRAK
struct GametrakXMinAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.gametrakXMin; } };
struct GametrakXMaxAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.gametrakXMax; } };
struct GametrakYMinAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.gametrakYMin; } };
struct GametrakYMaxAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.gametrakYMax; } };
struct GametrakDistMinAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.gametrakDistMin; } };
struct GametrakDistMaxAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.gametrakDistMax; } };
#endif
struct StatsUpdateRateAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.timersSettings.statsUpdateRate; } };
// Cloud
struct CloudCollectRateAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.timersSettings.cloudCollectRate; } };
struct CloudSendRateAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.timersSettings.cloudSendRate; } };
struct UdpCloudSendIntervalAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.boardcomputerHardware.timersSettings.udpSendRateMs; } };
struct UdpCloudEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.udpCloudSettings.udpCloudEnabled; } };
struct UdpCloudDebugEnableAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.udpCloudSettings.enableCloudDebug; } };
struct UdpCloudHostAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.udpCloudSettings.udpCloudHost; } };
struct UdpCloudPortAccessor : public NewSettingsAccessor<uint16_t> { ConfigWrapper<uint16_t> &getConfig() const override { return configs.udpCloudSettings.udpCloudPort; } };
// DefaultMode
struct DefaultModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return profileSettings.defaultMode.modelMode; } };
struct DefaultModeAllowRemoteControlAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.defaultMode.allowRemoteControl; } };
struct DefaultModeSquareGasAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.defaultMode.squareGas; } };
struct DefaultModeSquareBremsAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.defaultMode.squareBrems; } };
struct DefaultModeEnableSmoothingUpAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.defaultMode.enableSmoothingUp; } };
struct DefaultModeEnableSmoothingDownAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.defaultMode.enableSmoothingDown; } };
struct DefaultModeEnableFieldWeakSmoothingUpAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.defaultMode.enableFieldWeakSmoothingUp; } };
struct DefaultModeEnableFieldWeakSmoothingDownAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return profileSettings.defaultMode.enableFieldWeakSmoothingDown; } };
struct DefaultModeEnableFieldWeakSmoothingLowerLimitAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.fwSmoothLowerLimit; } };
struct DefaultModeSmoothingAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.smoothing; } };
struct DefaultModeFrontPercentageAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.frontPercentage; } };
struct DefaultModeBackPercentageAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.backPercentage; } };
struct DefaultModeAddSchwelleAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.add_schwelle; } };
struct DefaultModeGas1WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.gas1_wert; } };
struct DefaultModeGas2WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.gas2_wert; } };
struct DefaultModeBrems1WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.brems1_wert; } };
struct DefaultModeBrems2WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return profileSettings.defaultMode.brems2_wert; } };
// TempomatMode
struct TempomatModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return profileSettings.tempomatMode.modelMode; } };
// LarsmMode
struct LarsmModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return profileSettings.larsmMode.modelMode; } };
struct LarsmModeModeAccessor : public RefAccessorSaveSettings<LarsmModeMode> { LarsmModeMode &getRef() const override { return profileSettings.larsmMode.mode; } };
struct LarsmModeIterationsAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return profileSettings.larsmMode.iterations; } };
// MotortestMode
struct MotortestModeMultiplikatorAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return profileSettings.motortestMode.multiplikator; } };
struct MotortestMaxPwmAccessor : public RefAccessorSaveSettings<uint16_t> { uint16_t &getRef() const override { return profileSettings.motortestMode.maxPwm; } };
// MickMode
struct MickModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return profileSettings.mickMode.modelMode; } };
struct MickModeSmoothingAccessor : public RefAccessorSaveSettings<uint16_t> { uint16_t &getRef() const override { return profileSettings.mickMode.smoothing; } };
// Remote Control Mode
struct RemoteControlModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return profileSettings.remoteControlMode.modelMode; } };
// Ledstrip
struct EnableLedAnimationAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.enableLedAnimation; } };
struct EnableBrakeLightsAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.enableBrakeLights; } };
struct LedsCountAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.ledstrip.ledsCount; } };
struct CenterOffsetAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.ledstrip.centerOffset; } };
struct SmallOffsetAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.ledstrip.smallOffset; } };
struct BigOffsetAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.ledstrip.bigOffset; } };
struct LedStripMaxMilliampsAccessor : public NewSettingsAccessor<uint32_t> { ConfigWrapper<uint32_t> &getConfig() const override { return configs.ledstrip.maxMilliamps; } };
struct LedStripMaxAmpereAccessor : public virtual espgui::AccessorInterface<float>
{
float getValue() const override
{
return configs.ledstrip.maxMilliamps.value() / 1000.f;
}
espgui::AccessorInterface<float>::setter_result_t setValue(float value) override
{
return configs.write_config(configs.ledstrip.maxMilliamps, value * 1000);
}
};
struct EnableBeepWhenBlinkAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.enableBeepWhenBlink; } };
struct EnableFullBlinkAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.enableFullBlink; } };
struct EnableLedstripStVOAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.enableStVO; } };
struct LedsStVOFrontOffsetAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.ledstrip.stvoFrontOffset; } };
struct LedsStVOFrontLengthAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.ledstrip.stvoFrontLength; } };
struct EnableLedstripStVOFrontlight : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.stvoFrontEnable; } };
struct AnimationMultiplierAccessor : public NewSettingsAccessor<int16_t> { ConfigWrapper<int16_t> &getConfig() const override { return configs.ledstrip.animationMultiplier; } };
struct LedstripBrightnessAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.ledstrip.brightness; } };
struct LedstripEnableBlinkAnimationAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.enableAnimBlink; } };
struct LedstripOtaAnimationAccessor : public NewSettingsAccessor<OtaAnimationModes> { ConfigWrapper<OtaAnimationModes> &getConfig() const override { return configs.ledstrip.otaMode; } };
struct LedstripEnableVisualizeBlinkAnimationAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.enableVisualizeBlink; } };
struct LedstripAutomaticLightAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.automaticLight; } };
struct LedstripBrakeLightUseAccelAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.brakeLights_useAccel; } };
struct LedstripBrakeLightUsePowerAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.ledstrip.brakeLights_usePower; } };
// Battery
struct BatterySeriesCellsAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.battery.cellsSeries; } };
struct BatteryParallelCellsAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.battery.cellsParallel; } };
struct BatteryWHperKMAccessor : public NewSettingsAccessor<uint16_t> { ConfigWrapper<uint16_t> &getConfig() const override { return configs.battery.watthoursPerKilometer; } };
struct BatteryApplyCalibrationAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.battery.applyCalibration; } };
// Lockscreen
struct LockscreenAllowPresetSwitchAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.lockscreen.allowPresetSwitch; } };
template<uint8_t index>
struct LockscreenPinDigitAccessor : public NewSettingsAccessor<int8_t> { ConfigWrapper<int8_t> &getConfig() const override { return configs.lockscreen.pin[index]; } };
struct LockscreenKeepLockedAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.lockscreen.keepLockedAfterReboot; } };
// Handbremse
struct HandbremsEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.handbremse.enable; } };
struct HandbremsModeAccessor : public NewSettingsAccessor<HandbremseMode> { ConfigWrapper<HandbremseMode> &getConfig() const override { return configs.handbremse.mode; } };
struct HandbremsTimeoutAccessor : public NewSettingsAccessor<uint16_t> { ConfigWrapper<uint16_t> &getConfig() const override { return configs.handbremse.triggerTimeout; } };
struct HandbremsAutomaticAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.handbremse.automatic; } };
struct HandbremsVisualizeAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.handbremse.visualize; } };
// ESP Now
struct ESPNowSyncTimeEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.espnow.syncTime; } };
struct ESPNowSyncTimeWithOthersEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.espnow.syncTimeWithOthers; } };
struct ESPNowSyncBlinkEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.espnow.syncBlink; } };
// Button Mapping accessors
struct ButtonLeftAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingLeft; } };
struct ButtonRightAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingRight; } };
struct ButtonUpAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingUp; } };
struct ButtonDownAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingDown; } };
struct ButtonLeft2Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingLeft2; } };
struct ButtonRight2Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingRight2; } };
struct ButtonUp2Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingUp2; } };
struct ButtonDown2Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingDown2; } };
struct ButtonProfile0Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingProfile0; } };
struct ButtonProfile1Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingProfile1; } };
struct ButtonProfile2Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingProfile2; } };
struct ButtonProfile3Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingProfile3; } };
struct ButtonExtra1Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingExtra1; } };
struct ButtonExtra2Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingExtra2; } };
struct ButtonExtra3Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingExtra3; } };
struct ButtonExtra4Accessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.dpadMappingExtra4; } };
// Can
struct CanResetOnErrorAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.canResetOnError; } };
struct CanReinstallDriverAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.canUninstallOnReset; } };
// Quick Actions
struct QuickActionLeft2Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionLeft2; } };
struct QuickActionRight2Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionRight2; } };
struct QuickActionUp2Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionUp2; } };
struct QuickActionDown2Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionDown2; } };
struct QuickActionExtra1Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionExtra1; } };
struct QuickActionExtra2Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionExtra2; } };
struct QuickActionExtra3Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionExtra3; } };
struct QuickActionExtra4Accessor : public NewSettingsAccessor<BobbyQuickActions> { ConfigWrapper<BobbyQuickActions> &getConfig() const override { return configs.quickActionExtra4; } };
// boardcomputer-hardware
struct FlipScreenAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.boardcomputerHardware.flipScreen; } };
// Other
struct AnhaengerIdAccessor : public NewSettingsAccessor<uint16_t> { ConfigWrapper<uint16_t> &getConfig() const override { return configs.anhaenger_id; } };
struct UsernameAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.otaUsername; } };

View File

@ -1 +0,0 @@
#include "wifiaccessors.h"

View File

@ -1,4 +0,0 @@
#pragma once
// local includes
#include "accessorinterface.h"

View File

@ -1,15 +0,0 @@
#pragma once
// local includes
#include "accessorhelpers.h"
#include "newsettings.h"
struct WifiApEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.wifiApEnabled; } };
//struct WifiApDisableWhenOnlineAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.wifiDisableApWhenOnline; } };
struct WifiApSsidAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.wifiApName; } };
struct WifiApKeyAccessor : public NewSettingsAccessor<std::string> { ConfigWrapper<std::string> &getConfig() const override { return configs.wifiApKey; } };
struct WifiApIpAccessor : public NewSettingsAccessor<wifi_stack::ip_address_t> { ConfigWrapper<wifi_stack::ip_address_t> &getConfig() const override { return configs.wifiApIp; } };
struct WifiApMaskAccessor : public NewSettingsAccessor<wifi_stack::ip_address_t> { ConfigWrapper<wifi_stack::ip_address_t> &getConfig() const override { return configs.wifiApMask; } };
struct WifiApChannelAccessor : public NewSettingsAccessor<uint8_t> { ConfigWrapper<uint8_t> &getConfig() const override { return configs.wifiApChannel; } };
struct WifiApAuthmodeAccessor : public NewSettingsAccessor<wifi_auth_mode_t> { ConfigWrapper<wifi_auth_mode_t> &getConfig() const override { return configs.wifiApAuthmode; } };
struct WiFiApHiddenAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.wifiApHidden; } };

View File

@ -1,3 +0,0 @@
#include "wifistaconfigaccessors.h"

View File

@ -1,107 +0,0 @@
#pragma once
#include "sdkconfig.h"
// system includes
#include <string>
// 3rdparty lib includes
#include <accessorinterface.h>
#include <espwifiutils.h>
// local includes
#include "newsettings.h"
#include "accessorhelpers.h"
struct WifiStaEnabledAccessor : public NewSettingsAccessor<bool> { ConfigWrapper<bool> &getConfig() const override { return configs.wifiStaEnabled; } };
struct WifiStaMinRssiAccessor : public NewSettingsAccessor<int8_t> { ConfigWrapper<int8_t> &getConfig() const override { return configs.wifiStaMinRssi; } };
class WifiStaConfigSsidAccessor : public virtual NewSettingsAccessor<std::string>
{
public:
WifiStaConfigSsidAccessor(int index) : m_index{index} {}
ConfigWrapper<std::string>& getConfig() const override { return configs.wifi_configs[m_index].ssid; }
private:
const int m_index;
};
class WifiStaConfigKeyAccessor : public virtual NewSettingsAccessor<std::string>
{
public:
WifiStaConfigKeyAccessor(int index) : m_index{index} {}
ConfigWrapper<std::string>& getConfig() const override { return configs.wifi_configs[m_index].key; }
private:
const int m_index;
};
class WifiStaConfigUseStaticIpAccessor : public virtual NewSettingsAccessor<bool>
{
public:
WifiStaConfigUseStaticIpAccessor(int index) : m_index{index} {}
ConfigWrapper<bool>& getConfig() const override { return configs.wifi_configs[m_index].useStaticIp; }
private:
const int m_index;
};
class WifiStaConfigStaticIpAccessor : public virtual NewSettingsAccessor<wifi_stack::ip_address_t>
{
public:
WifiStaConfigStaticIpAccessor(int index) : m_index{index} {}
ConfigWrapper<wifi_stack::ip_address_t>& getConfig() const override { return configs.wifi_configs[m_index].staticIp; }
private:
const int m_index;
};
class WifiStaConfigStaticSubnetAccessor : public virtual NewSettingsAccessor<wifi_stack::ip_address_t>
{
public:
WifiStaConfigStaticSubnetAccessor(int index) : m_index{index} {}
ConfigWrapper<wifi_stack::ip_address_t>& getConfig() const override { return configs.wifi_configs[m_index].staticSubnet; }
private:
const int m_index;
};
class WifiStaConfigStaticGatewayAccessor : public virtual NewSettingsAccessor<wifi_stack::ip_address_t>
{
public:
WifiStaConfigStaticGatewayAccessor(int index) : m_index{index} {}
ConfigWrapper<wifi_stack::ip_address_t>& getConfig() const override { return configs.wifi_configs[m_index].staticGateway; }
private:
const int m_index;
};
class WifiStaConfigUseStaticDnsAccessor : public virtual NewSettingsAccessor<bool>
{
public:
WifiStaConfigUseStaticDnsAccessor(int index) : m_index{index} {}
ConfigWrapper<bool>& getConfig() const override { return configs.wifi_configs[m_index].useStaticDns; }
private:
const int m_index;
};
class WifiStaConfigStaticDns0Accessor : public virtual NewSettingsAccessor<wifi_stack::ip_address_t>
{
public:
WifiStaConfigStaticDns0Accessor(int index) : m_index{index} {}
ConfigWrapper<wifi_stack::ip_address_t>& getConfig() const override { return configs.wifi_configs[m_index].staticDns0; }
private:
const int m_index;
};
class WifiStaConfigStaticDns1Accessor : public virtual NewSettingsAccessor<wifi_stack::ip_address_t>
{
public:
WifiStaConfigStaticDns1Accessor(int index) : m_index{index} {}
ConfigWrapper<wifi_stack::ip_address_t>& getConfig() const override { return configs.wifi_configs[m_index].staticDns1; }
private:
const int m_index;
};
class WifiStaConfigStaticDns2Accessor : public virtual NewSettingsAccessor<wifi_stack::ip_address_t>
{
public:
WifiStaConfigStaticDns2Accessor(int index) : m_index{index} {}
ConfigWrapper<wifi_stack::ip_address_t>& getConfig() const override { return configs.wifi_configs[m_index].staticDns2; }
private:
const int m_index;
};

View File

@ -1,9 +0,0 @@
#include "assertaction.h"
// system includes
#include <cassert>
void AssertAction::triggered()
{
assert(0);
}

View File

@ -1,10 +0,0 @@
#pragma once
// 3rdparty lib includes
#include "actioninterface.h"
class AssertAction : public virtual espgui::ActionInterface
{
public:
void triggered() override;
};

View File

@ -1,16 +0,0 @@
#include "bluetoothbeginaction.h"
// local includes
#include "globals.h"
#include "newsettings.h"
#ifdef FEATURE_BLUETOOTH
void BluetoothBeginAction::triggered()
{
if (!bluetoothSerial.begin(configs.bluetoothName.value.c_str()))
{
//Serial.println("Could not begin bluetooth");
// TODO: better error handling
}
}
#endif

View File

@ -1,12 +0,0 @@
#pragma once
// 3rdparty lib includes
#include <actioninterface.h>
#ifdef FEATURE_BLUETOOTH
class BluetoothBeginAction : public virtual espgui::ActionInterface
{
public:
void triggered() override;
};
#endif

Some files were not shown because too many files have changed in this diff Show More