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

Changes to the DOT export to be compatible with the old version of graphviz on the lab computer

parent c45ffb9a
No related branches found
No related tags found
1 merge request!8Controller network
......@@ -202,16 +202,16 @@ int export_dot(const struct computation_graph* graph, FILE* of, int print_output
for (i = 0; i < graph->n_nodes; i++) {
struct graph_node *node = &graph->nodes[i];
// Create node
fprintf(of, "\"%s\"[shape=record\nlabel=\"\n", node->name);
fprintf(of, "<f0> %s\n", node->name); // Node name is port 0
fprintf(of, "\"%s\"[shape=record\nlabel=\"", node->name);
fprintf(of, "<f0>%s ", node->name); // Node name is port 0
int j;
// Create ports for inputs
for (j = 0; j < node->type->n_inputs; j++) {
fprintf(of, "|<f%d> --\\>%s\n", j+1, node->type->input_names[j]);
fprintf(of, " |<f%d> --\\>%s", j+1, node->type->input_names[j]);
}
// Create ports for parameters
for (j = 0; j < node->type->n_params; j++) {
fprintf(of, "|<f%d> [%s=%.3f]\n", j+1+node->type->n_inputs, node->type->param_names[j],node->param_values[j]);
fprintf(of, " |<f%d> [%s=%.3f]", j+1+node->type->n_inputs, node->type->param_names[j],node->param_values[j]);
}
fprintf(of, "\"]\n"); // Close label bracket
// Make connections from
......
No preview for this file type
digraph G {
rankdir="LR"
"Roll PID"[shape=record
label="
<f0> Roll PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=15.000]
|<f5> [Ki=0.000]
|<f6> [Kd=0.200]
"]
label="<f0>Roll PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=15.000] |<f5> [Ki=0.000] |<f6> [Kd=0.200]"]
"Roll" -> "Roll PID":f1 [label="Constant"]
"RC Roll" -> "Roll PID":f2 [label="Constant"]
"dT" -> "Roll PID":f3 [label="Constant"]
"Pitch PID"[shape=record
label="
<f0> Pitch PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=15.000]
|<f5> [Ki=0.000]
|<f6> [Kd=0.200]
"]
label="<f0>Pitch PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=15.000] |<f5> [Ki=0.000] |<f6> [Kd=0.200]"]
"Pitch" -> "Pitch PID":f1 [label="Constant"]
"RC Pitch" -> "Pitch PID":f2 [label="Constant"]
"dT" -> "Pitch PID":f3 [label="Constant"]
"Yaw PID"[shape=record
label="
<f0> Yaw PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=2.600]
|<f5> [Ki=0.000]
|<f6> [Kd=0.000]
"]
label="<f0>Yaw PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=2.600] |<f5> [Ki=0.000] |<f6> [Kd=0.000]"]
"Roll Rate PID"[shape=record
label="
<f0> Roll Rate PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=4600.000]
|<f5> [Ki=0.000]
|<f6> [Kd=550.000]
"]
label="<f0>Roll Rate PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=4600.000] |<f5> [Ki=0.000] |<f6> [Kd=550.000]"]
"dPhi" -> "Roll Rate PID":f1 [label="Constant"]
"Roll PID" -> "Roll Rate PID":f2 [label="Correction"]
"dT" -> "Roll Rate PID":f3 [label="Constant"]
"Pitch Rate PID"[shape=record
label="
<f0> Pitch Rate PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=4600.000]
|<f5> [Ki=0.000]
|<f6> [Kd=550.000]
"]
label="<f0>Pitch Rate PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=4600.000] |<f5> [Ki=0.000] |<f6> [Kd=550.000]"]
"dTheta" -> "Pitch Rate PID":f1 [label="Constant"]
"Pitch PID" -> "Pitch Rate PID":f2 [label="Correction"]
"dT" -> "Pitch Rate PID":f3 [label="Constant"]
"Yaw Rate PID"[shape=record
label="
<f0> Yaw Rate PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=435480.000]
|<f5> [Ki=0.000]
|<f6> [Kd=0.000]
"]
label="<f0>Yaw Rate PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=435480.000] |<f5> [Ki=0.000] |<f6> [Kd=0.000]"]
"dPsi" -> "Yaw Rate PID":f1 [label="Constant"]
"RC Yaw" -> "Yaw Rate PID":f2 [label="Constant"]
"dT" -> "Yaw Rate PID":f3 [label="Constant"]
"X pos PID"[shape=record
label="
<f0> X pos PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=0.000]
|<f5> [Ki=0.000]
|<f6> [Kd=0.000]
"]
label="<f0>X pos PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.000] |<f5> [Ki=0.000] |<f6> [Kd=0.000]"]
"Y pos PID"[shape=record
label="
<f0> Y pos PID
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=0.000]
|<f5> [Ki=0.000]
|<f6> [Kd=0.000]
"]
label="<f0>Y pos PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.000] |<f5> [Ki=0.000] |<f6> [Kd=0.000]"]
"Altitude"[shape=record
label="
<f0> Altitude
|<f1> --\>Cur point
|<f2> --\>Setpoint
|<f3> --\>dt
|<f4> [Kp=0.000]
|<f5> [Ki=0.000]
|<f6> [Kd=0.000]
"]
label="<f0>Altitude |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.000] |<f5> [Ki=0.000] |<f6> [Kd=0.000]"]
"P PWM Clamp"[shape=record
label="
<f0> P PWM Clamp
|<f1> --\>Bounds in
|<f2> [Min=-20000.000]
|<f3> [Max=20000.000]
"]
label="<f0>P PWM Clamp |<f1> --\>Bounds in |<f2> [Min=-20000.000] |<f3> [Max=20000.000]"]
"Pitch Rate PID" -> "P PWM Clamp":f1 [label="Correction"]
"R PWM Clamp"[shape=record
label="
<f0> R PWM Clamp
|<f1> --\>Bounds in
|<f2> [Min=-20000.000]
|<f3> [Max=20000.000]
"]
label="<f0>R PWM Clamp |<f1> --\>Bounds in |<f2> [Min=-20000.000] |<f3> [Max=20000.000]"]
"Roll Rate PID" -> "R PWM Clamp":f1 [label="Correction"]
"Y PWM Clamp"[shape=record
label="
<f0> Y PWM Clamp
|<f1> --\>Bounds in
|<f2> [Min=-20000.000]
|<f3> [Max=20000.000]
"]
label="<f0>Y PWM Clamp |<f1> --\>Bounds in |<f2> [Min=-20000.000] |<f3> [Max=20000.000]"]
"Yaw Rate PID" -> "Y PWM Clamp":f1 [label="Correction"]
"Pitch Clamp"[shape=record
label="
<f0> Pitch Clamp
|<f1> --\>Bounds in
|<f2> [Min=-0.349]
|<f3> [Max=0.349]
"]
label="<f0>Pitch Clamp |<f1> --\>Bounds in |<f2> [Min=-0.349] |<f3> [Max=0.349]"]
"Y pos PID" -> "Pitch Clamp":f1 [label="Correction"]
"Roll Clamp"[shape=record
label="
<f0> Roll Clamp
|<f1> --\>Bounds in
|<f2> [Min=-0.349]
|<f3> [Max=0.349]
"]
label="<f0>Roll Clamp |<f1> --\>Bounds in |<f2> [Min=-0.349] |<f3> [Max=0.349]"]
"X pos PID" -> "Roll Clamp":f1 [label="Correction"]
"Pitch"[shape=record
label="
<f0> Pitch
|<f1> [Constant=0.000]
"]
label="<f0>Pitch |<f1> [Constant=0.000]"]
"Roll"[shape=record
label="
<f0> Roll
|<f1> [Constant=0.000]
"]
label="<f0>Roll |<f1> [Constant=0.000]"]
"Yaw"[shape=record
label="
<f0> Yaw
|<f1> [Constant=0.000]
"]
label="<f0>Yaw |<f1> [Constant=0.000]"]
"dTheta"[shape=record
label="
<f0> dTheta
|<f1> [Constant=0.000]
"]
label="<f0>dTheta |<f1> [Constant=0.000]"]
"dPhi"[shape=record
label="
<f0> dPhi
|<f1> [Constant=0.000]
"]
label="<f0>dPhi |<f1> [Constant=0.000]"]
"dPsi"[shape=record
label="
<f0> dPsi
|<f1> [Constant=0.000]
"]
label="<f0>dPsi |<f1> [Constant=0.000]"]
"RC Pitch"[shape=record
label="
<f0> RC Pitch
|<f1> [Constant=0.000]
"]
label="<f0>RC Pitch |<f1> [Constant=0.000]"]
"RC Roll"[shape=record
label="
<f0> RC Roll
|<f1> [Constant=0.000]
"]
label="<f0>RC Roll |<f1> [Constant=0.000]"]
"RC Yaw"[shape=record
label="
<f0> RC Yaw
|<f1> [Constant=0.000]
"]
label="<f0>RC Yaw |<f1> [Constant=0.000]"]
"RC Throttle"[shape=record
label="
<f0> RC Throttle
|<f1> [Constant=0.000]
"]
label="<f0>RC Throttle |<f1> [Constant=0.000]"]
"Signal Mixer"[shape=record
label="
<f0> Signal Mixer
|<f1> --\>Throttle
|<f2> --\>Pitch
|<f3> --\>Roll
|<f4> --\>Yaw
"]
label="<f0>Signal Mixer |<f1> --\>Throttle |<f2> --\>Pitch |<f3> --\>Roll |<f4> --\>Yaw"]
"RC Throttle" -> "Signal Mixer":f1 [label="Constant"]
"P PWM Clamp" -> "Signal Mixer":f2 [label="Bounded"]
"R PWM Clamp" -> "Signal Mixer":f3 [label="Bounded"]
"Y PWM Clamp" -> "Signal Mixer":f4 [label="Bounded"]
"dT"[shape=record
label="
<f0> dT
|<f1> [Constant=0.005]
"]
label="<f0>dT |<f1> [Constant=0.005]"]
}
\ No newline at end of file
quad/sw/modular_quad_pid/gen_diagram/network.png

202 KiB | W: | H:

quad/sw/modular_quad_pid/gen_diagram/network.png

236 KiB | W: | H:

quad/sw/modular_quad_pid/gen_diagram/network.png
quad/sw/modular_quad_pid/gen_diagram/network.png
quad/sw/modular_quad_pid/gen_diagram/network.png
quad/sw/modular_quad_pid/gen_diagram/network.png
  • 2-up
  • Swipe
  • Onion skin
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