comments added

This commit is contained in:
vishnuk-v 2025-04-03 15:52:25 +05:30
parent dffa952ecd
commit 53bef8c526

View File

@ -45,24 +45,25 @@ int main(void)
while (1)
{
bool feed_back_present = HAL_GPIO_ReadPin(GPIOA, feed_back_Pin);
if(feed_back_present == TRUE) {
LR_mode = TRUE;
}
else {
LR_mode = FALSE;
}
bool slave_master = HAL_GPIO_ReadPin(GPIOA, RL_OUT_Pin);
if(slave_master == TRUE) {
RL_mode = TRUE;
}
else {
RL_mode = FALSE;
}
//
// bool feed_back_present = HAL_GPIO_ReadPin(GPIOA, feed_back_Pin);
// if(feed_back_present == TRUE) {
// LR_mode = TRUE;
// }
// else {
// LR_mode = FALSE;
// }
//
// bool slave_master = HAL_GPIO_ReadPin(GPIOA, RL_OUT_Pin);
// if(slave_master == TRUE) {
// RL_mode = TRUE;
// }
// else {
// RL_mode = FALSE;
// }
// / Update LED states based on current mode /
// just checking the inbuilt git
if(AMBERFLASH_mode) {
HAL_GPIO_WritePin(GPIOA, Amber_LED_OUT_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOA, Red_LED_OUT_Pin, GPIO_PIN_RESET);
@ -75,7 +76,7 @@ int main(void)
HAL_GPIO_WritePin(GPIOA, LR_OUT_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, RL_OUT_Pin, GPIO_PIN_RESET);
}
else if(LR_mode) {
else if(LR_mode) { // comment added
HAL_GPIO_WritePin(GPIOA, Amber_LED_OUT_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, Red_LED_OUT_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, LR_OUT_Pin, GPIO_PIN_SET);