Skip to content

Commit

Permalink
Merge pull request #1300 from bitcraze/tobba/passthough_msp_bug
Browse files Browse the repository at this point in the history
Fixed blujay passthough assert bugs
  • Loading branch information
tobbeanton authored Jun 29, 2023
2 parents 41a9c97 + c5df960 commit f83e426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
#define UART2_TASK_STACKSIZE configMINIMAL_STACK_SIZE
#define CRTP_SRV_TASK_STACKSIZE configMINIMAL_STACK_SIZE
#define PLATFORM_SRV_TASK_STACKSIZE configMINIMAL_STACK_SIZE
#define PASSTHROUGH_TASK_STACKSIZE configMINIMAL_STACK_SIZE
#define PASSTHROUGH_TASK_STACKSIZE (2 * configMINIMAL_STACK_SIZE)
#define BQ_OSD_TASK_STACKSIZE configMINIMAL_STACK_SIZE
#define GTGPS_DECK_TASK_STACKSIZE configMINIMAL_STACK_SIZE
#define UART1_TEST_TASK_STACKSIZE configMINIMAL_STACK_SIZE
Expand Down
5 changes: 2 additions & 3 deletions src/modules/src/vcp_esc_passthrough.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ static TaskHandle_t passthroughTaskHandle;
STATIC_MEM_TASK_ALLOC(passthroughTask, PASSTHROUGH_TASK_STACKSIZE);

static bool isInit;
static paramVarId_t motorPowerSetEnableParam;

// Passthorugh queues to handle VCP data.
static xQueueHandle ptRxQueue;
Expand Down Expand Up @@ -75,8 +74,6 @@ void passthroughInit()
ptTxQueue = STATIC_MEM_QUEUE_CREATE(ptTxQueue);
DEBUG_QUEUE_MONITOR_REGISTER(ptRxQueue);

motorPowerSetEnableParam = paramGetVarId("motorPowerSet", "enable");

passthroughTaskHandle = STATIC_MEM_TASK_CREATE(passthroughTask, passthroughTask, PASSTHROUGH_TASK_NAME, NULL, PASSTHROUGH_TASK_PRI);
}

Expand Down Expand Up @@ -154,6 +151,8 @@ void passthroughTask(void *param)
// The ability to set the powers of the motors directly might be changed
// during the 4way process (for instance while using the motor sliders in ESC Configurator ).
// Here we'll just make sure that the ability is set to false, so we don't accidentally start the motors.
paramVarId_t motorPowerSetEnableParam;
motorPowerSetEnableParam = paramGetVarId("motorPowerSet", "enable");
paramSetInt(motorPowerSetEnableParam, 0);

// Clear any notifications that was queued during 4way process.
Expand Down

0 comments on commit f83e426

Please sign in to comment.