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

Added type_id to node types. Linked graph_blocks to virtual quad. Fixed issues with commands array

parent c125577f
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ const struct graph_node_type node_pow_type = { ...@@ -19,7 +19,7 @@ const struct graph_node_type node_pow_type = {
.n_params = 1, .n_params = 1,
.execute = pow_nodes, .execute = pow_nodes,
.reset = reset, .reset = reset,
.state_size = 0 .state_size = 0,
}; };
int graph_add_node_pow(struct computation_graph *graph, const char* name) { int graph_add_node_pow(struct computation_graph *graph, const char* name) {
......
TOP=../.. TOP=../..
NAME = virt_quad NAME = virt_quad
REQLIBS = -lquad_app -lcomputation_graph -lm -lcommands REQLIBS = -lquad_app -lcomputation_graph -lm -lcommands -lgraph_blocks
include $(TOP)/executable.mk include $(TOP)/executable.mk
CC=gcc
test: test.c
$(CC) -o test_log -I. -I../src/quad_app -I../src/computation_graph test.c ../src/quad_app/*.c ../src/computation_graph/*.c -lm
# MicroCART On-board Quad Log
# Sample size: 3
time accel_x accel_y accel_z gyro_x gyro_y gyro_z Altitude PID_Correction X pos PID_Correction Y pos PID_Correction Pitch PID_Correction Roll PID_Correction Yaw PID_Correction Pitch Rate PID_Correction Roll Rate PID_Correction Yaw Rate PID_Correction Pitch_Constant Roll_Constant Yaw_Constant VRPN X_Constant VRPN Y_Constant VRPN Alt_Constant VRPN Pitch_Constant VRPN Roll_Constant X Setpoint_Constant Y Setpoint_Constant Alt Setpoint_Constant Yaw Setpoint_Constant Signal Mixer_PWM 0 Signal Mixer_PWM 1 Signal Mixer_PWM 2 Signal Mixer_PWM 3
s G G G rad/s rad/s rad/s 10ns_dutycycle rad rad rad/s rad/s rad/s 10ns_dutycycle 10ns_dutycycle 10ns_dutycycle rad rad rad m m m rad rad m m m rad 10ns_dutycycle 10ns_dutycycle 10ns_dutycycle 10ns_dutycycle
0.000000 0.000000 0.000000 0.000000 0.000000 4722366482869645213696.000000 -nan 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 4722366482869645213696.000000 -nan 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 4722366482869645213696.000000 -nan 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#include <stddef.h>
#include "type_def.h"
#include "log_data.h"
#include "control_algorithm.h"
int zybo_uart_write(struct UARTDriver *self, unsigned char c) {
printf("%c", c);
return 0;
}
int main() {
modular_structs_t structs;
structs.hardware_struct.uart.write = zybo_uart_write;
control_algorithm_init(&(structs.parameter_struct));
initialize_logging(&structs.log_struct, &structs.parameter_struct);
log_data(&(structs.log_struct), &(structs.parameter_struct));
log_data(&(structs.log_struct), &(structs.parameter_struct));
log_data(&(structs.log_struct), &(structs.parameter_struct));
printLogging(&structs.hardware_struct, &(structs.log_struct), &(structs.parameter_struct));
return 0;
}
File added
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