Skip to content
Snippets Groups Projects
Commit dfae2e9d authored by dawehr's avatar dawehr
Browse files

Fixed issue with protection loops

It now works on the quadcopter. Messages weren't being processed in protection loop before
parent ef520ac4
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "initialize_components.h" #include "initialize_components.h"
#include "communication.h" #include "communication.h"
#define BENCH_TEST //#define BENCH_TEST
extern int Xil_AssertWait; extern int Xil_AssertWait;
...@@ -34,6 +34,7 @@ int protection_loops(modular_structs_t *structs) ...@@ -34,6 +34,7 @@ int protection_loops(modular_structs_t *structs)
while (!structs->user_input_struct.receivedBeginUpdate) { while (!structs->user_input_struct.receivedBeginUpdate) {
send_data(MessageTypes[4].ID, MessageTypes[4].subtypes[1].ID, 0, buf, length); send_data(MessageTypes[4].ID, MessageTypes[4].subtypes[1].ID, 0, buf, length);
process_received(structs);
usleep(10000); usleep(10000);
} }
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#define clock_rate 100000000 #define clock_rate 100000000
#define frequency 450 #define frequency 450
#define period_width clock_rate/frequency #define period_width clock_rate/frequency
#define pulse_throttle_low clock_rate / 1000 #define pulse_throttle_low clock_rate / 1000 // 1ms
#define pulse_throttle_high clock_rate / 500 #define pulse_throttle_high clock_rate / 500 // 2ms
#define MOTOR_0_PERCENT 115000 #define MOTOR_0_PERCENT 115000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment