Skip to content

Commit

Permalink
Clean warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gdepuille committed Apr 11, 2024
1 parent b9b8ac7 commit 7e3f685
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
14 changes: 0 additions & 14 deletions Core/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,6 @@ void Error_Handler(void);
// k = 3/4 = 0,75
#define GAIN_DIFFERENTIEL 0.75

// Pourcentage des céllule LIPO
#define CELL_100 4.20
#define CELL_90 4.10
#define CELL_80 3.97
#define CELL_70 3.92
#define CELL_60 3.87
#define CELL_50 3.83
#define CELL_40 3.79
#define CELL_30 3.75
#define CELL_20 3.7
#define CELL_10 3.6
#define CELL_5 3.3
#define CELL_0 3.0

// Résolution pour le courant de l'ACS711 15A alimenté en 3.3V, 90mV / A
#define ACS_RESOLUTION 90.0/1000.0

Expand Down
6 changes: 3 additions & 3 deletions Core/Src/app_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,13 @@ void StartDefaultTask(void *argument)
TxHeader.FDFormat = FDCAN_CLASSIC_CAN;
TxHeader.TxEventFifoControl = FDCAN_NO_TX_EVENTS;
TxHeader.MessageMarker = 0;
TxHeader.Identifier = 0;
TxHeader.DataLength = 0;

bool auPrec = -1;

/* Infinite loop */
#pragma clang diagnostic push
#pragma ide diagnostic ignored "EndlessLoop"
// ReSharper disable once CppDFAEndlessLoop
while(true) {
LOG_INFO("mainTask: Read AU");
au = HAL_GPIO_ReadPin(AU_GPIO_Port, AU_Pin) == GPIO_PIN_RESET;
Expand Down Expand Up @@ -272,7 +273,6 @@ void StartDefaultTask(void *argument)
}
osDelay(50);
}
#pragma clang diagnostic pop
/* USER CODE END StartDefaultTask */
}

Expand Down
1 change: 1 addition & 0 deletions Core/Src/fdcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ void MX_FDCAN1_Init(void)
FDCAN_REJECT_REMOTE,
FDCAN_REJECT_REMOTE
);

/* USER CODE END FDCAN1_Init 2 */

}
Expand Down
16 changes: 7 additions & 9 deletions Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,14 @@ int main(void)

/* Infinite loop */
/* USER CODE BEGIN WHILE */
#pragma clang diagnostic push
#pragma ide diagnostic ignored "EndlessLoop"
while (1)
// ReSharper disable once CppDFAEndlessLoop
while (true)
{
/* USER CODE END WHILE */

/* USER CODE BEGIN 3 */
LOG_WARN("main: Execution après init de FreeRTOS. Tres bizarre");
}
#pragma clang diagnostic pop
/* USER CODE END 3 */
}

Expand Down Expand Up @@ -210,12 +208,13 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
LOG_ERROR("main: ERROR HANDLER");

/* User can add his own implementation to report the HAL error return state */
__disable_irq();
LOG_ERROR("main: ERROR HANDLER");
#pragma clang diagnostic push
#pragma ide diagnostic ignored "EndlessLoop"
while (1)

// ReSharper disable once CppDFAEndlessLoop
while (true)
{
HAL_GPIO_WritePin(HEART_BEAT_GPIO_Port, HEART_BEAT_Pin, GPIO_PIN_RESET);
osDelay(1000);
Expand All @@ -224,7 +223,6 @@ void Error_Handler(void)
osDelay(100);
}
}
#pragma clang diagnostic pop
/* USER CODE END Error_Handler_Debug */
}

Expand Down

0 comments on commit 7e3f685

Please sign in to comment.