some improve
This commit is contained in:
@@ -387,12 +387,12 @@ void StartCalcsUartTask(void const * argument)
|
|||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
|
||||||
xSemaphoreTake(semaphoreBin, portMAX_DELAY);
|
//xSemaphoreTake(semaphoreBin, portMAX_DELAY);
|
||||||
if(xSemaphoreTake(mutex, portMAX_DELAY) == pdTRUE) {
|
if(xSemaphoreTake(mutex, portMAX_DELAY) == pdTRUE) {
|
||||||
int8_t res = status_mes(data_out, sizeof(data_out) / sizeof(data_out), &data);
|
int8_t res = status_mes(data_out, sizeof(data_out) / sizeof(data_out), &data);
|
||||||
if(res == 0)
|
if(res == 0)
|
||||||
{
|
{
|
||||||
char str[30];
|
char str[40];
|
||||||
sprintf (str, "Gyro%u! Temp = %i; Rate = %i.", flag_cs, data.temp, data.rate);
|
sprintf (str, "Gyro%u! Temp = %i; Rate = %i.", flag_cs, data.temp, data.rate);
|
||||||
HAL_UART_Transmit_DMA(&huart1, (uint8_t*)str, sizeof(str));
|
HAL_UART_Transmit_DMA(&huart1, (uint8_t*)str, sizeof(str));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user