Fixed some software bugs (#258)
This commit is contained in:
@ -81,5 +81,5 @@ set(BOBBYCAR_BUILDFLAGS
|
|||||||
|
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||||
include("${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()
|
endif()
|
||||||
|
@ -79,5 +79,5 @@ set(BOBBYCAR_BUILDFLAGS
|
|||||||
|
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||||
include("${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()
|
endif()
|
||||||
|
@ -74,5 +74,5 @@ set(BOBBYCAR_BUILDFLAGS
|
|||||||
|
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||||
include("${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()
|
endif()
|
||||||
|
@ -79,5 +79,5 @@ set(BOBBYCAR_BUILDFLAGS
|
|||||||
|
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||||
include("${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()
|
endif()
|
||||||
|
@ -79,5 +79,5 @@ set(BOBBYCAR_BUILDFLAGS
|
|||||||
|
|
||||||
#if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
#if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||||
# include("${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()
|
#endif()
|
||||||
|
Binary file not shown.
14
main/can.cpp
14
main/can.cpp
@ -373,12 +373,18 @@ void sendCanCommands()
|
|||||||
if (back) send(MotorController<true, true>::Command::Enable, back->command.right.enable);
|
if (back) send(MotorController<true, true>::Command::Enable, back->command.right.enable);
|
||||||
break;
|
break;
|
||||||
case 1:
|
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, false>::Command::CtrlTyp, front->command.left.ctrlTyp);
|
||||||
if (front) send(MotorController<false, true>::Command::CtrlTyp, front->command.right.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, false>::Command::CtrlTyp, back->command.left.ctrlTyp);
|
||||||
if (back) send(MotorController<true, true>::Command::CtrlTyp, back->command.right.ctrlTyp);
|
if (back) send(MotorController<true, true>::Command::CtrlTyp, back->command.right.ctrlTyp);
|
||||||
break;
|
break;
|
||||||
case 2:
|
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, false>::Command::CtrlMod, front->command.left.ctrlMod);
|
||||||
if (front) send(MotorController<false, true>::Command::CtrlMod, front->command.right.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);
|
if (back) send(MotorController<true, false>::Command::CtrlMod, back->command.left.ctrlMod);
|
||||||
@ -386,7 +392,7 @@ void sendCanCommands()
|
|||||||
handbremse::finishedMotorUpdate = true;
|
handbremse::finishedMotorUpdate = true;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
#if defined(HAS_SIMPLIFIED)
|
#ifdef HAS_SIMPLIFIED
|
||||||
SIMPLIFIED_IMOTMAX
|
SIMPLIFIED_IMOTMAX
|
||||||
#endif
|
#endif
|
||||||
if (front) send(MotorController<false, false>::Command::IMotMax, front->command.left.iMotMax);
|
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);
|
if (back) send(MotorController<true, true>::Command::IMotMax, back->command.right.iMotMax);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
#if defined(HAS_SIMPLIFIED)
|
#ifdef HAS_SIMPLIFIED
|
||||||
SIMPLIFIED_IDCMAX
|
SIMPLIFIED_IDCMAX
|
||||||
#endif
|
#endif
|
||||||
if (front) send(MotorController<false, false>::Command::IDcMax, front->command.left.iDcMax);
|
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);
|
if (back) send(MotorController<true, true>::Command::IDcMax, back->command.right.iDcMax);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
#if defined(HAS_SIMPLIFIED)
|
#ifdef HAS_SIMPLIFIED
|
||||||
SIMPLIFIED_NMOTMAX
|
SIMPLIFIED_NMOTMAX
|
||||||
#endif
|
#endif
|
||||||
if (front) send(MotorController<false, false>::Command::NMotMax, front->command.left.nMotMax);
|
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);
|
if (back) send(MotorController<true, true>::Command::NMotMax, back->command.right.nMotMax);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
#if defined(HAS_SIMPLIFIED)
|
#ifdef HAS_SIMPLIFIED
|
||||||
SIMPLIFIED_FIELDWEAKMAX
|
SIMPLIFIED_FIELDWEAKMAX
|
||||||
#endif
|
#endif
|
||||||
if (front) send(MotorController<false, false>::Command::FieldWeakMax, front->command.left.fieldWeakMax);
|
if (front) send(MotorController<false, false>::Command::FieldWeakMax, front->command.left.fieldWeakMax);
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include <espchrono.h>
|
#include <espchrono.h>
|
||||||
|
|
||||||
#ifdef CAN_PLUGIN
|
#ifdef CAN_PLUGIN
|
||||||
#pragma message "Activating Can Plugin"
|
|
||||||
#include CAN_PLUGIN
|
#include CAN_PLUGIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -102,7 +102,6 @@ void Lockscreen::redraw()
|
|||||||
else
|
else
|
||||||
espgui::switchScreen<MainMenu>();
|
espgui::switchScreen<MainMenu>();
|
||||||
#ifdef LOCKSCREEN_PLUGIN
|
#ifdef LOCKSCREEN_PLUGIN
|
||||||
#pragma message "Activating Lockscreen Plugin"
|
|
||||||
#include LOCKSCREEN_PLUGIN
|
#include LOCKSCREEN_PLUGIN
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
@ -17,6 +17,10 @@ float avgSpeedKmh{};
|
|||||||
float sumCurrent{};
|
float sumCurrent{};
|
||||||
bool isLocked{};
|
bool isLocked{};
|
||||||
|
|
||||||
|
#ifdef GLOBALS_SOURCE
|
||||||
|
GLOBALS_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
bool simplified =
|
bool simplified =
|
||||||
#if defined(HAS_SIMPLIFIED)
|
#if defined(HAS_SIMPLIFIED)
|
||||||
true
|
true
|
||||||
|
@ -47,6 +47,7 @@ extern bool isLocked;
|
|||||||
|
|
||||||
#ifdef GLOBALS_PLUGIN
|
#ifdef GLOBALS_PLUGIN
|
||||||
#include GLOBALS_PLUGIN
|
#include GLOBALS_PLUGIN
|
||||||
|
GLOBALS_HEADER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern bool simplified;
|
extern bool simplified;
|
||||||
|
Reference in New Issue
Block a user