reverted breaking changes from ADIS_HS2022

main
Jonas Arnold 4 years ago
parent c17121fa9a
commit c3ad815129
  1. 6
      ADIS_Sumo/Sumo/Maze.c
  2. 5
      ADIS_Sumo/source/IncludeMcuLibConfig.h
  3. 14
      ADIS_Sumo/source/Shell.c
  4. 3
      ADIS_Sumo/source/platform.c
  5. 6
      ADIS_Sumo/source/platform.h

@ -144,13 +144,7 @@ uint8_t MAZE_EvaluteTurn(bool *finished, bool *deadEndGoBw) {
*deadEndGoBw = FALSE; /* default */ *deadEndGoBw = FALSE; /* default */
currLineKind = REF_GetLineKind(REF_LINE_KIND_MODE_MAZE); currLineKind = REF_GetLineKind(REF_LINE_KIND_MODE_MAZE);
if (currLineKind==REF_LINE_NONE) { /* nothing, must be dead end */ if (currLineKind==REF_LINE_NONE) { /* nothing, must be dead end */
#if PL_GO_DEADEND_BW
TURN_Turn(TURN_STEP_LINE_BW, NULL); /* step back so we are again on the line for line following */
turn = TURN_STRAIGHT;
*deadEndGoBw = TRUE;
#else
turn = TURN_LEFT180; turn = TURN_LEFT180;
#endif
} else { } else {
HISTORY_Clear(); /* clear history values */ HISTORY_Clear(); /* clear history values */
HISTORY_SampleSensors(); /* store current values */ HISTORY_SampleSensors(); /* store current values */

@ -120,10 +120,5 @@
/* ---------------------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------------------*/
/* FXOS8700 accelerometer */ /* FXOS8700 accelerometer */
#define McuFXOS8700_CONFIG_I2C_DEVICE_ADDRESS (0x1D) #define McuFXOS8700_CONFIG_I2C_DEVICE_ADDRESS (0x1D)
/* ------------------- McuLog -----------------------*/
#define McuLog_CONFIG_IS_ENABLED (1)
#define McuLog_CONFIG_LOG_TIMESTAMP_DATE (0)
#define McuLog_CONFIG_LOG_TIMESTAMP_TIME (1)
#define McuLog_CONFIG_NOF_CONSOLE_LOGGER (2)
/* ---------------------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------------------*/

@ -54,7 +54,6 @@
#if PL_CONFIG_HAS_ACCEL #if PL_CONFIG_HAS_ACCEL
#include "McuFXOS8700.h" #include "McuFXOS8700.h"
#endif #endif
#include "McuLog.h"
static const McuShell_ParseCommandCallback CmdParserTable[] = static const McuShell_ParseCommandCallback CmdParserTable[] =
{ {
@ -112,7 +111,6 @@ static const McuShell_ParseCommandCallback CmdParserTable[] =
#if PL_CONFIG_HAS_ACCEL #if PL_CONFIG_HAS_ACCEL
McuFXOS8700_ParseCommand, McuFXOS8700_ParseCommand,
#endif #endif
McuLog_ParseCommand,
NULL /* Sentinel */ NULL /* Sentinel */
}; };
@ -195,7 +193,7 @@ static void ShellTask(void *pv) {
unsigned int i; unsigned int i;
(void)pv; /* not used */ (void)pv; /* not used */
McuLog_info("Shell task started.\r\n"); McuShell_SendStr((uint8_t*)"Shell task started.\r\n", McuShell_GetStdio()->stdOut);
for(i=0;i<sizeof(ios)/sizeof(ios[0]);i++) { for(i=0;i<sizeof(ios)/sizeof(ios[0]);i++) {
ios[i].buf[0] = '\0'; ios[i].buf[0] = '\0';
} }
@ -224,16 +222,6 @@ void SHELL_Init(void) {
#if PL_CONFIG_USE_ESP32 #if PL_CONFIG_USE_ESP32
McuESP32_SetRxFromESPStdio(&ESP_ToShellStdio); /* copy ESP UART to shell console */ McuESP32_SetRxFromESPStdio(&ESP_ToShellStdio); /* copy ESP UART to shell console */
#endif #endif
#if McuLog_CONFIG_IS_ENABLED
#if PL_CONFIG_USE_RTT && PL_CONFIG_USE_UART_SHELL && McuLog_CONFIG_NOF_CONSOLE_LOGGER==2 /* both */
McuLog_set_console(McuRTT_GetStdio(), 0);
McuLog_set_console(&McuShellUart_stdio, 1);
#elif PL_CONFIG_USE_RTT /* only RTT */
McuLog_set_console(McuRTT_GetStdio(), 0);
#elif PL_CONFIG_USE_UART_SHELL /* only UART */
McuLog_set_console(&McuShellUart_stdio, 0);
#endif
#endif
} }
void SHELL_Deinit(void) {} void SHELL_Deinit(void) {}

@ -65,7 +65,6 @@
#if PL_CONFIG_APP_LINE_MAZE #if PL_CONFIG_APP_LINE_MAZE
#include "maze.h" #include "maze.h"
#endif #endif
#include "McuLog.h"
#if PL_CONFIG_HAS_NVM_CONFIG #if PL_CONFIG_HAS_NVM_CONFIG
static void InitNVMCValues(void) { static void InitNVMCValues(void) {
@ -149,7 +148,7 @@ void PL_Init(void) {
#endif #endif
TRG_Init(); TRG_Init();
TMR_Init(); TMR_Init();
McuLog_Init();
#if PL_CONFIG_USE_QUADRATURE #if PL_CONFIG_USE_QUADRATURE
QuadCounter_Init(); QuadCounter_Init();
#endif #endif

@ -9,7 +9,7 @@
/* robot type */ /* robot type */
#define PL_IS_INTRO_ZUMO_K22 (1) /* Zumo robot with NXP K22FX512 */ #define PL_IS_INTRO_ZUMO_K22 (1) /* Zumo robot with NXP K22FX512 */
#define PL_IS_INTRO_ZUMO_K22_V2 (1) /* 1: Sumo with magnetic encoders, 0: V1 Robot with optical encoders */ #define PL_IS_INTRO_ZUMO_K22_V2 (1) /* 1: Sumo with magnetic encoders, 0: V1 Robot with optical encoders */ /* \todo should get rid of it */
/* ESP32 related */ /* ESP32 related */
#define PL_CONFIG_HAS_ESP32_SHIELD (1) /* if having ESP32 shield mounted */ #define PL_CONFIG_HAS_ESP32_SHIELD (1) /* if having ESP32 shield mounted */
@ -66,8 +66,8 @@
#define PL_CONFIG_HAS_NVM_CONFIG (1) #define PL_CONFIG_HAS_NVM_CONFIG (1)
/* application modes, one has to be enabled */ /* application modes, one has to be enabled */
#define PL_CONFIG_APP_LINE_FOLLOWING (1 && PL_CONFIG_USE_LINE_SENSOR && PL_CONFIG_USE_PID) #define PL_CONFIG_APP_LINE_FOLLOWING (0 && PL_CONFIG_USE_LINE_SENSOR && PL_CONFIG_USE_PID)
#define PL_CONFIG_APP_LINE_MAZE (0 && PL_CONFIG_USE_LINE_SENSOR && PL_CONFIG_USE_PID) #define PL_CONFIG_APP_LINE_MAZE (1 && PL_CONFIG_USE_LINE_SENSOR && PL_CONFIG_USE_PID)
#define PL_CONFIG_APP_SUMO (0) #define PL_CONFIG_APP_SUMO (0)
#define PL_SLOWER_SPEED (1) /* PID, Sumo, LineFollow & Maze */ #define PL_SLOWER_SPEED (1) /* PID, Sumo, LineFollow & Maze */

Loading…
Cancel
Save