From a7af1cad1e2c3b2ae53251d6eed2695f1cb96c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jasper=20G=C3=BCldenstein?= Date: Sun, 15 Nov 2020 14:56:09 +0100 Subject: [PATCH] rf_output renaming --- keil_project/Services/RFOutput.c | 12 ++++++------ keil_project/Services/RFOutput.h | 6 +++--- keil_project/Src/main.c | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/keil_project/Services/RFOutput.c b/keil_project/Services/RFOutput.c index 1b3cfba..42f2813 100644 --- a/keil_project/Services/RFOutput.c +++ b/keil_project/Services/RFOutput.c @@ -1,9 +1,9 @@ #include "RFOutput.h" #include -char buf[100]; +char RF_OUTPUT_buf[100]; -void emetteur_rf_init(void){ +void RF_OUTPUT_Init(void){ LL_USART_InitTypeDef My_LL_Usart_Init_Struct; @@ -39,7 +39,7 @@ void emetteur_rf_init(void){ } -void emetteur_send_bytes(char* buf, int len){ +void RF_OUTPUT_SendBytes(char* buf, int len){ LL_GPIO_SetOutputPin(GPIOA,LL_GPIO_PIN_11); for(int i = 0; i < len; i++){ @@ -49,7 +49,7 @@ void emetteur_send_bytes(char* buf, int len){ LL_GPIO_ResetOutputPin(GPIOA,LL_GPIO_PIN_11); } -void emetteur_send_message(int rouli_bon, int alimentation_bon, float angle_voile){ - int len = sprintf(buf, "Alim bon: %d, Rouli bon: %d, Angle de voile: %2f\r\n", alimentation_bon, rouli_bon, angle_voile); - emetteur_send_bytes(buf, len); +void RF_OUTPUT_SendMessage(int rouli_bon, int alimentation_bon, float angle_voile){ + int len = sprintf(RF_OUTPUT_buf, "Alim bon: %d, Rouli bon: %d, Angle de voile: %2f\r\n", alimentation_bon, rouli_bon, angle_voile); + RF_OUTPUT_SendBytes(RF_OUTPUT_buf, len); } diff --git a/keil_project/Services/RFOutput.h b/keil_project/Services/RFOutput.h index 868e3a7..f9285df 100644 --- a/keil_project/Services/RFOutput.h +++ b/keil_project/Services/RFOutput.h @@ -7,9 +7,9 @@ #include "stm32f1xx_ll_usart.h" #include "stm32f1xx_ll_gpio.h" -void emetteur_rf_init(void); -void emetteur_send_bytes(char* buf, int len); -void emetteur_send_message(int rouli_bon, int alimentation_bon, float angle_voile); +void RF_OUTPUT_Init(void); +void RF_OUTPUT_SendBytes(char* buf, int len); +void RF_OUTPUT_SendMessage(int rouli_bon, int alimentation_bon, float angle_voile); diff --git a/keil_project/Src/main.c b/keil_project/Src/main.c index 41f67dd..83f7709 100644 --- a/keil_project/Src/main.c +++ b/keil_project/Src/main.c @@ -61,11 +61,11 @@ int main(void) RF_INPUT_Init(); DC_MOTOR_Init(); SAIL_Init(); - emetteur_rf_init(); + RF_OUTPUT_Init(); while(!INCR_ENCODER_IsAbsolute()) { - emetteur_send_bytes(wait_for_girouette, sizeof(wait_for_girouette)); + RF_OUTPUT_SendBytes(wait_for_girouette, sizeof(wait_for_girouette)); LL_mDelay(500); } @@ -88,7 +88,7 @@ int main(void) CONTROL_LOOP_Flag = 0; } if(TX_Flag){ - emetteur_send_message(angle_roulis_good, battery_level_good, angle_sail); + RF_OUTPUT_SendMessage(angle_roulis_good, battery_level_good, angle_sail); TX_Flag = 0; } }