Merge pull request #343 from bobbycar-graz/aveexy
This commit is contained in:
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
@ -154,7 +154,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [feedc0de, comred, comred_new, peter, mick, nofeatures, seatbot, gernot]
|
||||
node: [feedc0de, comred, comred_new, peter, mick, nofeatures, seatbot, gernot, aveexy]
|
||||
name: ${{ matrix.node }}
|
||||
needs:
|
||||
- checkout
|
||||
|
90
config_aveexy.cmake
Normal file
90
config_aveexy.cmake
Normal file
@ -0,0 +1,90 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_aveexy)
|
||||
set(BOBBY_DEFAULT_OTA_NAME 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
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_comred)
|
||||
set(BOBBY_DEFAULT_OTA_NAME comred)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_comred_new)
|
||||
set(BOBBY_DEFAULT_OTA_NAME comred_new)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_feedc0de)
|
||||
set(BOBBY_DEFAULT_OTA_NAME feedc0de)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_gernot)
|
||||
set(BOBBY_DEFAULT_OTA_NAME gernot)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_greyhash)
|
||||
set(BOBBY_DEFAULT_OTA_NAME greyhash)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_mick)
|
||||
set(BOBBY_DEFAULT_OTA_NAME mick)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_nofeatures)
|
||||
set(BOBBY_DEFAULT_OTA_NAME nofeatures)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_peter)
|
||||
set(BOBBY_DEFAULT_OTA_NAME peter)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_seatbot)
|
||||
set(BOBBY_DEFAULT_OTA_NAME seatbot)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
|
@ -542,5 +542,6 @@ target_compile_options(${COMPONENT_TARGET}
|
||||
-DGIT_SHORT_REV="${GIT_SHORT_REV}"
|
||||
-DGIT_MESSAGE="${GIT_MESSAGE}"
|
||||
-DGIT_BRANCH="${GIT_BRANCH}"
|
||||
-DBOBBY_DEFAULT_OTA_NAME="${BOBBY_DEFAULT_OTA_NAME}"
|
||||
${BOBBYCAR_BUILDFLAGS}
|
||||
)
|
||||
|
@ -9,9 +9,9 @@
|
||||
#include <screenmanager.h>
|
||||
|
||||
// local includes
|
||||
#include "newsettings.h"
|
||||
#include "displays/menus/boardcomputerhardwaresettingsmenu.h"
|
||||
#include "bobbyerrorhandler.h"
|
||||
#include "displays/statusdisplay.h"
|
||||
#include "newsettings.h"
|
||||
|
||||
namespace {
|
||||
constexpr const char TAG[] = "BUTTON";
|
||||
@ -59,23 +59,45 @@ void ButtonCalibrateDisplay::update()
|
||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ESP_LOGI(TAG, "Left button set to %d", m_leftButton);
|
||||
}
|
||||
|
||||
if (auto result = configs.write_config(configs.dpadMappingRight, m_rightButton); !result)
|
||||
{
|
||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ESP_LOGI(TAG, "Right button set to %d", m_rightButton);
|
||||
}
|
||||
if (auto result = configs.write_config(configs.dpadMappingUp, m_upButton); !result)
|
||||
{
|
||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ESP_LOGI(TAG, "Up button set to %d", m_upButton);
|
||||
}
|
||||
if (auto result = configs.write_config(configs.dpadMappingDown, m_downButton); !result)
|
||||
{
|
||||
BobbyErrorHandler{}.errorOccured(std::move(result).error());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ESP_LOGI(TAG, "Down button set to %d", m_downButton);
|
||||
}
|
||||
|
||||
espgui::popScreen();
|
||||
if (espgui::displayStack.empty())
|
||||
{
|
||||
espgui::switchScreen<StatusDisplay>();
|
||||
}
|
||||
else
|
||||
espgui::popScreen();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,11 @@ std::string defaultHostname()
|
||||
return "bobby";
|
||||
}
|
||||
|
||||
std::string defaultUsername()
|
||||
{
|
||||
return fmt::format("bobby_{}", BOBBY_DEFAULT_OTA_NAME);
|
||||
}
|
||||
|
||||
ConfigManager<ConfigContainer> configs;
|
||||
|
||||
INSTANTIATE_CONFIGMANAGER_TEMPLATES(ConfigContainer)
|
||||
|
@ -31,6 +31,7 @@
|
||||
using namespace espconfig;
|
||||
|
||||
std::string defaultHostname();
|
||||
std::string defaultUsername();
|
||||
|
||||
constexpr const auto INPUT_MAPPING_NONE = std::numeric_limits<uint8_t>::max();
|
||||
|
||||
@ -224,7 +225,7 @@ class ConfigContainer
|
||||
public:
|
||||
// default allowReset constraints nvsName
|
||||
ConfigWrapperLegacy<std::optional<mac_t>> baseMacAddressOverride{std::nullopt, DoReset, {}, "baseMacAddrOver" };
|
||||
ConfigWrapperLegacy<std::string> hostname {defaultHostname, DoReset, StringMinMaxSize<4, 32>, "hostname" };
|
||||
ConfigWrapperLegacy<std::string> hostname {defaultUsername, DoReset, StringMinMaxSize<4, 32>, "hostname" };
|
||||
ConfigWrapperLegacy<bool> wifiStaEnabled {true, DoReset, {}, "wifiStaEnabled" };
|
||||
std::array<WiFiConfig, 10> wifi_configs {
|
||||
WiFiConfig {"wifi_ssid0", "wifi_key0", "wifi_usestatic0", "wifi_static_ip0", "wifi_stati_sub0", "wifi_stat_gate0", "wifi_usestadns0", "wifi_stat_dnsA0", "wifi_stat_dnsB0", "wifi_stat_dnsC0", "bobbycar", "12345678"},
|
||||
@ -241,7 +242,7 @@ public:
|
||||
ConfigWrapperLegacy<int8_t> wifiStaMinRssi {-90, DoReset, {}, "wifiStaMinRssi" };
|
||||
|
||||
ConfigWrapperLegacy<bool> wifiApEnabled {true, DoReset, {}, "wifiApEnabled" };
|
||||
ConfigWrapperLegacy<std::string> wifiApName {defaultHostname, DoReset, StringMinMaxSize<4, 32>, "wifiApName" };
|
||||
ConfigWrapperLegacy<std::string> wifiApName {defaultUsername, DoReset, StringMinMaxSize<4, 32>, "wifiApName" };
|
||||
ConfigWrapperLegacy<std::string> wifiApKey {"Passwort_123", DoReset, StringOr<StringEmpty, StringMinMaxSize<8, 64>>, "wifiApKey" };
|
||||
ConfigWrapperLegacy<wifi_stack::ip_address_t> wifiApIp{wifi_stack::ip_address_t{10, 0, 0, 1},DoReset, {}, "wifiApIp" };
|
||||
ConfigWrapperLegacy<wifi_stack::ip_address_t> wifiApMask{wifi_stack::ip_address_t{255, 255, 255, 0},DoReset, {}, "wifiApMask" };
|
||||
@ -305,7 +306,7 @@ public:
|
||||
WirelessDoorsConfig { "door_id4", "door_token4" }
|
||||
};
|
||||
|
||||
ConfigWrapperLegacy<std::string> bluetoothName {defaultHostname, DoReset, StringMinMaxSize<4, 32>, "bluetoothName" };
|
||||
ConfigWrapperLegacy<std::string> bluetoothName {defaultUsername, DoReset, StringMinMaxSize<4, 32>, "bluetoothName" };
|
||||
|
||||
ConfigWrapperLegacy<bool> reverseBeep {false, DoReset, {}, "reverseBeep" };
|
||||
ConfigWrapperLegacy<uint8_t> reverseBeepFreq0 {3, DoReset, {}, "revBeepFreq0" };
|
||||
@ -317,7 +318,7 @@ public:
|
||||
ConfigWrapperLegacy<std::string> udpCloudHost {std::string{}, DoReset, {}, "udpCloudHost" };
|
||||
|
||||
ConfigWrapperLegacy<std::string> otaUrl {std::string{}, DoReset, StringOr<StringEmpty, StringValidUrl>, "otaUrl" };
|
||||
ConfigWrapperLegacy<std::string> otaUsername {std::string{}, DoReset, {}, "otaUsername" };
|
||||
ConfigWrapperLegacy<std::string> otaUsername {std::string{BOBBY_DEFAULT_OTA_NAME}, DoReset, {}, "otaUsername" };
|
||||
ConfigWrapperLegacy<std::string> otaServerUrl {std::string{}, DoReset, StringOr<StringEmpty, StringValidUrl>, "otaServerUrl" };
|
||||
ConfigWrapperLegacy<std::string> otaServerBranch {std::string{}, DoReset, {}, "otaServerBranch" };
|
||||
std::array<ConfiguredOtaServer, 5> otaServers {
|
||||
|
1850
sdkconfig_aveexy
Normal file
1850
sdkconfig_aveexy
Normal file
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@ VALID_CONFIGS=(
|
||||
"seatbot"
|
||||
"gernot"
|
||||
"comred_new"
|
||||
"aveexy"
|
||||
)
|
||||
|
||||
print_usage() {
|
||||
|
Reference in New Issue
Block a user