main fini

This commit is contained in:
Cavailles Kevin 2020-11-14 16:31:08 +01:00
parent 1b3ff2c0b6
commit 1b68b7f6d0

View file

@ -28,6 +28,7 @@
#include "Sail.h" #include "Sail.h"
#include "alimentation.h" #include "alimentation.h"
#include "accelerometer.h" #include "accelerometer.h"
#include "emetteur_rf.h"
#define CONTROL_LOOP_PERIOD 250 #define CONTROL_LOOP_PERIOD 250
#define MSG_TRANSFER_PERIOD 3000 #define MSG_TRANSFER_PERIOD 3000
@ -76,11 +77,10 @@ int main(void)
RF_Input_Duty = RF_INPUT_GetDutyTimeRelative(); RF_Input_Duty = RF_INPUT_GetDutyTimeRelative();
DC_MOTOR_SetSpeed(RF_Input_Duty); DC_MOTOR_SetSpeed(RF_Input_Duty);
} }
CONTROL_LOOP_Flag = 0; CONTROL_LOOP_Flag = 0;
} }
if(TX_Flag){ if(TX_Flag){
emetteur_send_message(angle_roulis_good, battery_level_good, angle_sail);
TX_Flag = 0; TX_Flag = 0;
} }
} }
@ -88,6 +88,7 @@ int main(void)
void SysTick_Handler(void) void SysTick_Handler(void)
{ {
if(counter % CONTROL_LOOP_PERIOD == 0){ if(counter % CONTROL_LOOP_PERIOD == 0){
CONTROL_LOOP_Flag = 1; CONTROL_LOOP_Flag = 1;
} }