Merge pull request #313 from bobbycar-graz/gernot_config
Eini mit der gernot config
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, peter, mick, nofeatures, seatbot]
|
||||
node: [feedc0de, comred, peter, mick, nofeatures, seatbot, gernot]
|
||||
name: ${{ matrix.node }}
|
||||
needs:
|
||||
- checkout
|
||||
|
Submodule components/bobbycar-protocol updated: 9e256acdaa...caaa92eca9
84
config_gernot.cmake
Normal file
84
config_gernot.cmake
Normal file
@ -0,0 +1,84 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_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
|
||||
)
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
message(WARNING "Including plugins")
|
||||
endif()
|
27
main/can.cpp
27
main/can.cpp
@ -14,6 +14,7 @@
|
||||
#include <espchrono.h>
|
||||
#include <tickchrono.h>
|
||||
#include <screenmanager.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "bobbycar-can.h"
|
||||
@ -173,27 +174,27 @@ bool parseBoardcomputerCanMessage(const twai_message_t &message)
|
||||
case Boardcomputer::Command::RawButtonPressed:
|
||||
if (espgui::currentDisplay)
|
||||
espgui::currentDisplay->rawButtonPressed(*((const uint8_t*)message.data));
|
||||
break;
|
||||
return true;
|
||||
case Boardcomputer::Command::RawButtonReleased:
|
||||
if (espgui::currentDisplay)
|
||||
espgui::currentDisplay->rawButtonReleased(*((const uint8_t*)message.data));
|
||||
break;
|
||||
return true;
|
||||
case Boardcomputer::Command::ButtonPressed:
|
||||
if (espgui::currentDisplay)
|
||||
espgui::currentDisplay->rawButtonPressed(espgui::Button(*((const uint8_t*)message.data)));
|
||||
break;
|
||||
espgui::currentDisplay->buttonPressed(espgui::Button(*((const uint8_t*)message.data)));
|
||||
return true;
|
||||
case Boardcomputer::Command::ButtonReleased:
|
||||
if (espgui::currentDisplay)
|
||||
espgui::currentDisplay->rawButtonPressed(espgui::Button(*((const uint8_t*)message.data)));
|
||||
break;
|
||||
espgui::currentDisplay->buttonReleased(espgui::Button(*((const uint8_t*)message.data)));
|
||||
return true;
|
||||
case Boardcomputer::Command::RawGas:
|
||||
can_gas = *((int16_t*)message.data);
|
||||
last_can_gas = espchrono::millis_clock::now();
|
||||
break;
|
||||
return true;
|
||||
case Boardcomputer::Command::RawBrems:
|
||||
can_brems = *((int16_t*)message.data);
|
||||
last_can_brems = espchrono::millis_clock::now();
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -362,10 +363,10 @@ void sendCanCommands()
|
||||
if (const auto index = settingsPersister.currentlyOpenProfileIndex())
|
||||
switch (*index)
|
||||
{
|
||||
case 0: buttonLeds |= Boardcomputer::ButtonProfile0; break;
|
||||
case 1: buttonLeds |= Boardcomputer::ButtonProfile1; break;
|
||||
case 2: buttonLeds |= Boardcomputer::ButtonProfile2; break;
|
||||
case 3: buttonLeds |= Boardcomputer::ButtonProfile3; break;
|
||||
case 0: buttonLeds |= std::to_underlying(Boardcomputer::Button::Profile0); break;
|
||||
case 1: buttonLeds |= std::to_underlying(Boardcomputer::Button::Profile1); break;
|
||||
case 2: buttonLeds |= std::to_underlying(Boardcomputer::Button::Profile2); break;
|
||||
case 3: buttonLeds |= std::to_underlying(Boardcomputer::Button::Profile3); break;
|
||||
}
|
||||
|
||||
static struct {
|
||||
@ -373,7 +374,7 @@ void sendCanCommands()
|
||||
uint8_t freq = 0;
|
||||
uint8_t pattern = 0;
|
||||
} front, back;
|
||||
uint16_t buttonLeds{};
|
||||
std::underlying_type_t<Boardcomputer::Button> buttonLeds{};
|
||||
} lastValues;
|
||||
|
||||
static int i{};
|
||||
|
1812
sdkconfig_gernot
Normal file
1812
sdkconfig_gernot
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,7 @@ VALID_CONFIGS=(
|
||||
"nofeatures"
|
||||
"allfeatures"
|
||||
"seatbot"
|
||||
"gernot"
|
||||
)
|
||||
|
||||
print_usage() {
|
||||
|
Reference in New Issue
Block a user