Fixed some software bugs (#258)

This commit is contained in:
CommanderRedYT
2022-02-08 10:59:47 +01:00
committed by GitHub
parent 62f91ae0a6
commit 79f7efeaf9
11 changed files with 20 additions and 11 deletions

View File

@ -81,5 +81,5 @@ set(BOBBYCAR_BUILDFLAGS
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including lockscreen_plugin")
message(WARNING "Including plugins")
endif()

View File

@ -79,5 +79,5 @@ set(BOBBYCAR_BUILDFLAGS
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including lockscreen_plugin")
message(WARNING "Including plugins")
endif()

View File

@ -74,5 +74,5 @@ set(BOBBYCAR_BUILDFLAGS
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including lockscreen_plugin")
message(WARNING "Including plugins")
endif()

View File

@ -79,5 +79,5 @@ set(BOBBYCAR_BUILDFLAGS
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
message(WARNING "Including lockscreen_plugin")
message(WARNING "Including plugins")
endif()

View File

@ -79,5 +79,5 @@ set(BOBBYCAR_BUILDFLAGS
#if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
# include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
# message(WARNING "Including lockscreen_plugin")
# message(WARNING "Including plugins")
#endif()

Binary file not shown.

View File

@ -373,12 +373,18 @@ void sendCanCommands()
if (back) send(MotorController<true, true>::Command::Enable, back->command.right.enable);
break;
case 1:
#ifdef HAS_SIMPLIFIED
SIMPLIFIED_CONTROLTYPE
#endif
if (front) send(MotorController<false, false>::Command::CtrlTyp, front->command.left.ctrlTyp);
if (front) send(MotorController<false, true>::Command::CtrlTyp, front->command.right.ctrlTyp);
if (back) send(MotorController<true, false>::Command::CtrlTyp, back->command.left.ctrlTyp);
if (back) send(MotorController<true, true>::Command::CtrlTyp, back->command.right.ctrlTyp);
break;
case 2:
#ifdef HAS_SIMPLIFIED
SIMPLIFIED_CONTROLMODE
#endif
if (front) send(MotorController<false, false>::Command::CtrlMod, front->command.left.ctrlMod);
if (front) send(MotorController<false, true>::Command::CtrlMod, front->command.right.ctrlMod);
if (back) send(MotorController<true, false>::Command::CtrlMod, back->command.left.ctrlMod);
@ -386,7 +392,7 @@ void sendCanCommands()
handbremse::finishedMotorUpdate = true;
break;
case 3:
#if defined(HAS_SIMPLIFIED)
#ifdef HAS_SIMPLIFIED
SIMPLIFIED_IMOTMAX
#endif
if (front) send(MotorController<false, false>::Command::IMotMax, front->command.left.iMotMax);
@ -395,7 +401,7 @@ void sendCanCommands()
if (back) send(MotorController<true, true>::Command::IMotMax, back->command.right.iMotMax);
break;
case 4:
#if defined(HAS_SIMPLIFIED)
#ifdef HAS_SIMPLIFIED
SIMPLIFIED_IDCMAX
#endif
if (front) send(MotorController<false, false>::Command::IDcMax, front->command.left.iDcMax);
@ -404,7 +410,7 @@ void sendCanCommands()
if (back) send(MotorController<true, true>::Command::IDcMax, back->command.right.iDcMax);
break;
case 5:
#if defined(HAS_SIMPLIFIED)
#ifdef HAS_SIMPLIFIED
SIMPLIFIED_NMOTMAX
#endif
if (front) send(MotorController<false, false>::Command::NMotMax, front->command.left.nMotMax);
@ -413,7 +419,7 @@ void sendCanCommands()
if (back) send(MotorController<true, true>::Command::NMotMax, back->command.right.nMotMax);
break;
case 6:
#if defined(HAS_SIMPLIFIED)
#ifdef HAS_SIMPLIFIED
SIMPLIFIED_FIELDWEAKMAX
#endif
if (front) send(MotorController<false, false>::Command::FieldWeakMax, front->command.left.fieldWeakMax);

View File

@ -9,7 +9,6 @@
#include <espchrono.h>
#ifdef CAN_PLUGIN
#pragma message "Activating Can Plugin"
#include CAN_PLUGIN
#endif

View File

@ -102,7 +102,6 @@ void Lockscreen::redraw()
else
espgui::switchScreen<MainMenu>();
#ifdef LOCKSCREEN_PLUGIN
#pragma message "Activating Lockscreen Plugin"
#include LOCKSCREEN_PLUGIN
#endif
return;

View File

@ -17,6 +17,10 @@ float avgSpeedKmh{};
float sumCurrent{};
bool isLocked{};
#ifdef GLOBALS_SOURCE
GLOBALS_SOURCE
#endif
bool simplified =
#if defined(HAS_SIMPLIFIED)
true

View File

@ -47,6 +47,7 @@ extern bool isLocked;
#ifdef GLOBALS_PLUGIN
#include GLOBALS_PLUGIN
GLOBALS_HEADER
#endif
extern bool simplified;