框架更新

This commit is contained in:
kai
2024-05-01 23:27:27 +08:00
2 changed files with 7 additions and 5 deletions

View File

@@ -95,11 +95,13 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
HAL_NVIC_SetPriority(OTG_FS_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
/* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
// 上电后重新枚举usb设备
// 上电后重新枚举usb设备
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
DWT_Delay(100);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
DWT_Delay(100);
DWT_Delay(0.1);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_SET);
DWT_Delay(0.1);
/* USER CODE END USB_OTG_FS_MspInit 1 */
}
}

View File

@@ -300,7 +300,7 @@ void DJIMotorControl()
// 若该电机处于停止状态,直接将buff置零
if (motor->stop_flag == MOTOR_STOP)
memset(sender_assignment[group].tx_buff + 2 * num, 0, 16u);
memset(sender_assignment[group].tx_buff + 2 * num, 0, sizeof(uint16_t));
}
// 遍历flag,检查是否要发送这一帧报文