rf_output renaming

This commit is contained in:
Jasper Güldenstein 2020-11-15 14:56:09 +01:00
parent e125c339a0
commit a7af1cad1e
3 changed files with 12 additions and 12 deletions

View file

@ -1,9 +1,9 @@
#include "RFOutput.h"
#include <stdio.h>
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);
}

View file

@ -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);

View file

@ -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;
}
}