diff --git a/keil_project/Src/main.c b/keil_project/Src/main.c index 01bbc70..413e264 100644 --- a/keil_project/Src/main.c +++ b/keil_project/Src/main.c @@ -28,6 +28,7 @@ #include "Sail.h" #include "alimentation.h" #include "accelerometer.h" +#include "emetteur_rf.h" #define CONTROL_LOOP_PERIOD 250 #define MSG_TRANSFER_PERIOD 3000 @@ -76,11 +77,10 @@ int main(void) RF_Input_Duty = RF_INPUT_GetDutyTimeRelative(); DC_MOTOR_SetSpeed(RF_Input_Duty); } - CONTROL_LOOP_Flag = 0; } if(TX_Flag){ - + emetteur_send_message(angle_roulis_good, battery_level_good, angle_sail); TX_Flag = 0; } } @@ -88,6 +88,7 @@ int main(void) void SysTick_Handler(void) { + if(counter % CONTROL_LOOP_PERIOD == 0){ CONTROL_LOOP_Flag = 1; }