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

Undoing accidental commits to commands.c and quad callbacks.c.

parent 29cb319f
No related branches found
No related tags found
No related merge requests found
......@@ -74,20 +74,18 @@ command_cb cb_setrollrated __attribute__((weak, alias("cb_default")));
command_cb cb_setpitchratep __attribute__((weak, alias("cb_default")));
command_cb cb_setpitchratei __attribute__((weak, alias("cb_default")));
command_cb cb_setpitchrated __attribute__((weak, alias("cb_default")));
command_cb cb_setxp __attribute__((weak, alias("cb_default")));
command_cb cb_setxi __attribute__((weak, alias("cb_default")));
command_cb cb_setxd __attribute__((weak, alias("cb_default")));
command_cb cb_setyp __attribute__((weak, alias("cb_default")));
command_cb cb_setyi __attribute__((weak, alias("cb_default")));
command_cb cb_setyd __attribute__((weak, alias("cb_default")));
command_cb cb_setlatp __attribute__((weak, alias("cb_default")));
command_cb cb_setlati __attribute__((weak, alias("cb_default")));
command_cb cb_setlatd __attribute__((weak, alias("cb_default")));
command_cb cb_setlongp __attribute__((weak, alias("cb_default")));
command_cb cb_setlongi __attribute__((weak, alias("cb_default")));
command_cb cb_setlongd __attribute__((weak, alias("cb_default")));
command_cb cb_setheightp __attribute__((weak, alias("cb_default")));
command_cb cb_setheighti __attribute__((weak, alias("cb_default")));
command_cb cb_setheightd __attribute__((weak, alias("cb_default")));
command_cb cb_setheight __attribute__((weak, alias("cb_default")));
command_cb cb_setx __attribute__((weak, alias("cb_default")));
command_cb cb_sety __attribute__((weak, alias("cb_default")));
command_cb cb_setlon __attribute__((weak, alias("cb_default")));
command_cb cb_setlat __attribute__((weak, alias("cb_default")));
command_cb cb_setlong __attribute__((weak, alias("cb_default")));
command_cb cb_setyaw __attribute__((weak, alias("cb_default")));
command_cb cb_setpitch __attribute__((weak, alias("cb_default")));
command_cb cb_setroll __attribute__((weak, alias("cb_default")));
......@@ -111,20 +109,18 @@ command_cb cb_getrollrated __attribute__((weak, alias("cb_default")));
command_cb cb_getpitchratep __attribute__((weak, alias("cb_default")));
command_cb cb_getpitchratei __attribute__((weak, alias("cb_default")));
command_cb cb_getpitchrated __attribute__((weak, alias("cb_default")));
command_cb cb_getxp __attribute__((weak, alias("cb_default")));
command_cb cb_getxi __attribute__((weak, alias("cb_default")));
command_cb cb_getxd __attribute__((weak, alias("cb_default")));
command_cb cb_getyp __attribute__((weak, alias("cb_default")));
command_cb cb_getyi __attribute__((weak, alias("cb_default")));
command_cb cb_getyd __attribute__((weak, alias("cb_default")));
command_cb cb_getlatp __attribute__((weak, alias("cb_default")));
command_cb cb_getlati __attribute__((weak, alias("cb_default")));
command_cb cb_getlatd __attribute__((weak, alias("cb_default")));
command_cb cb_getlongp __attribute__((weak, alias("cb_default")));
command_cb cb_getlongi __attribute__((weak, alias("cb_default")));
command_cb cb_getlongd __attribute__((weak, alias("cb_default")));
command_cb cb_getheightp __attribute__((weak, alias("cb_default")));
command_cb cb_getheighti __attribute__((weak, alias("cb_default")));
command_cb cb_getheightd __attribute__((weak, alias("cb_default")));
command_cb cb_getheight __attribute__((weak, alias("cb_default")));
command_cb cb_getx __attribute__((weak, alias("cb_default")));
command_cb cb_gety __attribute__((weak, alias("cb_default")));
command_cb cb_getlon __attribute__((weak, alias("cb_default")));
command_cb cb_getlat __attribute__((weak, alias("cb_default")));
command_cb cb_getlong __attribute__((weak, alias("cb_default")));
command_cb cb_getyaw __attribute__((weak, alias("cb_default")));
command_cb cb_getpitch __attribute__((weak, alias("cb_default")));
command_cb cb_getroll __attribute__((weak, alias("cb_default")));
......@@ -148,20 +144,18 @@ command_cb cb_resprollrated __attribute__((weak, alias("cb_default")));
command_cb cb_resppitchratep __attribute__((weak, alias("cb_default")));
command_cb cb_resppitchratei __attribute__((weak, alias("cb_default")));
command_cb cb_resppitchrated __attribute__((weak, alias("cb_default")));
command_cb cb_respxp __attribute__((weak, alias("cb_default")));
command_cb cb_respxi __attribute__((weak, alias("cb_default")));
command_cb cb_respxd __attribute__((weak, alias("cb_default")));
command_cb cb_respyp __attribute__((weak, alias("cb_default")));
command_cb cb_respyi __attribute__((weak, alias("cb_default")));
command_cb cb_respyd __attribute__((weak, alias("cb_default")));
command_cb cb_resplatp __attribute__((weak, alias("cb_default")));
command_cb cb_resplati __attribute__((weak, alias("cb_default")));
command_cb cb_resplatd __attribute__((weak, alias("cb_default")));
command_cb cb_resplongp __attribute__((weak, alias("cb_default")));
command_cb cb_resplongi __attribute__((weak, alias("cb_default")));
command_cb cb_resplongd __attribute__((weak, alias("cb_default")));
command_cb cb_respheightp __attribute__((weak, alias("cb_default")));
command_cb cb_respheighti __attribute__((weak, alias("cb_default")));
command_cb cb_respheightd __attribute__((weak, alias("cb_default")));
command_cb cb_respheight __attribute__((weak, alias("cb_default")));
command_cb cb_respx __attribute__((weak, alias("cb_default")));
command_cb cb_respy __attribute__((weak, alias("cb_default")));
command_cb cb_resplon __attribute__((weak, alias("cb_default")));
command_cb cb_resplat __attribute__((weak, alias("cb_default")));
command_cb cb_resplong __attribute__((weak, alias("cb_default")));
command_cb cb_respyaw __attribute__((weak, alias("cb_default")));
command_cb cb_resppitch __attribute__((weak, alias("cb_default")));
command_cb cb_resproll __attribute__((weak, alias("cb_default")));
......@@ -450,71 +444,71 @@ struct MessageType MessageTypes[MAX_TYPE] =
// Function pointer
&cb_setheightd
},
// x p constant subtype
// lat p constant subtype
{
// ID
0x15,
// Command text
"setxp",
"setlatp",
// Type of the command data
floatType,
// Function pointer
&cb_setxp
&cb_setlatp
},
// x i constant subtype
// lat i constant subtype
{
// ID
0x16,
// Command text
"setxi",
"setlati",
// Type of the command data
floatType,
// Function pointer
&cb_setxi
&cb_setlati
},
// x d constant subtype
// lat d constant subtype
{
// ID
0x17,
// Command text
"setxd",
"setlatd",
// Type of the command data
floatType,
// Function pointer
&cb_setxd
&cb_setlatd
},
// y p constant subtype
// long p constant subtype
{
// ID
0x18,
// Command text
"setyp",
"setlongp",
// Type of the command data
floatType,
// Function pointer
&cb_setyp
&cb_setlongp
},
// y i constant subtype
// long i constant subtype
{
// ID
0x19,
// Command text
"setyi",
"setlongi",
// Type of the command data
floatType,
// Function pointer
&cb_setyi
&cb_setlongi
},
// y d constant subtype
// long d constant subtype
{
// ID
0x1A,
// Command text
"setyd",
"setlongd",
// Type of the command data
floatType,
// Function pointer
&cb_setyd
&cb_setlongd
},
// height setpoint subtype
{
......@@ -527,27 +521,27 @@ struct MessageType MessageTypes[MAX_TYPE] =
// Function pointer
&cb_setheight
},
// x setpoint subtype
// lat setpoint subtype
{
// ID
0x1C,
// Command text
"setx",
"setlat",
// Type of the command data
floatType,
// Function pointer
&cb_setx
&cb_setlat
},
// y setpoint subtype
// long setpoint subtype
{
// ID
0x1D,
// Command text
"sety",
"setlong",
// Type of the command data
floatType,
// Function pointer
&cb_sety
&cb_setlong
},
// yaw setpoint subtype
{
......@@ -823,71 +817,71 @@ struct MessageType MessageTypes[MAX_TYPE] =
// Function pointer
&cb_getheightd
},
// x p constant subtype
// lat p constant subtype
{
// ID
0x15,
// Command text
"getxp",
"getlatp",
// Type of the command data
floatType,
// Function pointer
&cb_getxp
&cb_getlatp
},
// x i constant subtype
// lat i constant subtype
{
// ID
0x16,
// Command text
"getxi",
"getlati",
// Type of the command data
floatType,
// Function pointer
&cb_getxi
&cb_getlati
},
// x d constant subtype
// lat d constant subtype
{
// ID
0x17,
// Command text
"getxd",
"getlatd",
// Type of the command data
floatType,
// Function pointer
&cb_getxd
&cb_getlatd
},
// y p constant subtype
// long p constant subtype
{
// ID
0x18,
// Command text
"getyp",
"getlongp",
// Type of the command data
floatType,
// Function pointer
&cb_getyp
&cb_getlongp
},
// y i constant subtype
// long i constant subtype
{
// ID
0x19,
// Command text
"getyi",
"getlongi",
// Type of the command data
floatType,
// Function pointer
&cb_getyi
&cb_getlongi
},
// y d constant subtype
// long d constant subtype
{
// ID
0x1A,
// Command text
"getyd",
"getlongd",
// Type of the command data
floatType,
// Function pointer
&cb_getyd
&cb_getlongd
},
// height setpoint subtype
{
......@@ -900,27 +894,27 @@ struct MessageType MessageTypes[MAX_TYPE] =
// Function pointer
&cb_getheight
},
// x getpoint subtype
// lat getpoint subtype
{
// ID
0x1C,
// Command text
"getx",
"getlat",
// Type of the command data
floatType,
// Function pointer
&cb_getx
&cb_getlat
},
// y getpoint subtype
// long getpoint subtype
{
// ID
0x1D,
// Command text
"gety",
"getlong",
// Type of the command data
floatType,
// Function pointer
&cb_gety
&cb_getlong
},
// yaw getpoint subtype
{
......@@ -1197,71 +1191,71 @@ struct MessageType MessageTypes[MAX_TYPE] =
// Function pointer
&cb_respheightd
},
// x p constant subtype
// lat p constant subtype
{
// ID
0x15,
// Command text
"respxp",
"resplatp",
// Type of the command data
floatType,
// Function pointer
&cb_respxp
&cb_resplatp
},
// x i constant subtype
// lat i constant subtype
{
// ID
0x16,
// Command text
"respxi",
"resplati",
// Type of the command data
floatType,
// Function pointer
&cb_respxi
&cb_resplati
},
// x d constant subtype
// lat d constant subtype
{
// ID
0x17,
// Command text
"respxd",
"resplatd",
// Type of the command data
floatType,
// Function pointer
&cb_respxd
&cb_resplatd
},
// y p constant subtype
// long p constant subtype
{
// ID
0x18,
// Command text
"respyp",
"resplongp",
// Type of the command data
floatType,
// Function pointer
&cb_respyp
&cb_resplongp
},
// y i constant subtype
// long i constant subtype
{
// ID
0x19,
// Command text
"respyi",
"resplongi",
// Type of the command data
floatType,
// Function pointer
&cb_respyi
&cb_resplongi
},
// y d constant subtype
// long d constant subtype
{
// ID
0x1A,
// Command text
"respyd",
"resplongd",
// Type of the command data
floatType,
// Function pointer
&cb_respyd
&cb_resplongd
},
// height setpoint subtype
{
......@@ -1274,27 +1268,27 @@ struct MessageType MessageTypes[MAX_TYPE] =
// Function pointer
&cb_respheight
},
// x resppoint subtype
// lat resppoint subtype
{
// ID
0x1C,
// Command text
"respx",
"resplat",
// Type of the command data
floatType,
// Function pointer
&cb_respx
&cb_resplat
},
// y resppoint subtype
// long resppoint subtype
{
// ID
0x1D,
// Command text
"respy",
"resplong",
// Type of the command data
floatType,
// Function pointer
&cb_respy
&cb_resplong
},
// yaw resppoint subtype
{
......
......@@ -63,9 +63,6 @@ int cb_update(modular_structs_t *structs)
return 0;
}
/* Misc. callbacks */
// This is called on the ground station to begin sending VRPN to the quad
int cb_beginupdate(modular_structs_t *structs) {
structs->user_input_struct.receivedBeginUpdate = 1;
......@@ -86,18 +83,15 @@ int cb_response(modular_structs_t *structs)
return 0;
}
/* Callbacks for configuration (setters)*/
int cb_setyawp(modular_structs_t *structs)
int cb_setyaw(modular_structs_t *structs)
{
structs->parameter_struct.yaw_angle_pid.Kp = uart_buff_data_get_float(0);
structs->setpoint_struct.desiredQuadPosition.yaw = uart_buff_data_get_float(0);
return 0;
}
int cb_setyawi(modular_structs_t *structs)
int cb_setyawp(modular_structs_t *structs)
{
structs->parameter_struct.yaw_angle_pid.Ki = uart_buff_data_get_float(0);
structs->parameter_struct.yaw_angle_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
......@@ -107,15 +101,15 @@ int cb_setyawd(modular_structs_t *structs)
return 0;
}
int cb_setrollp(modular_structs_t *structs)
int cb_setroll(modular_structs_t *structs)
{
structs->parameter_struct.roll_angle_pid.Kp = uart_buff_data_get_float(0);
structs->setpoint_struct.desiredQuadPosition.roll = uart_buff_data_get_float(0);
return 0;
}
int cb_setrolli(modular_structs_t *structs)
int cb_setrollp(modular_structs_t *structs)
{
structs->parameter_struct.roll_angle_pid.Ki = uart_buff_data_get_float(0);
structs->parameter_struct.roll_angle_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
......@@ -125,15 +119,15 @@ int cb_setrolld(modular_structs_t *structs)
return 0;
}
int cb_setpitchp(modular_structs_t *structs)
int cb_setpitch(modular_structs_t *structs)
{
structs->parameter_struct.pitch_angle_pid.Kp = uart_buff_data_get_float(0);
structs->setpoint_struct.desiredQuadPosition.pitch = uart_buff_data_get_float(0);
return 0;
}
int cb_setpitchi(modular_structs_t *structs)
int cb_setpitchp(modular_structs_t *structs)
{
structs->parameter_struct.pitch_angle_pid.Ki = uart_buff_data_get_float(0);
structs->parameter_struct.pitch_angle_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
......@@ -143,93 +137,9 @@ int cb_setpitchd(modular_structs_t *structs)
return 0;
}
int cb_setyawratep(modular_structs_t *structs)
{
structs->parameter_struct.yaw_ang_vel_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
int cb_setyawratei(modular_structs_t *structs)
{
structs->parameter_struct.yaw_ang_vel_pid.Ki = uart_buff_data_get_float(0);
return 0;
}
int cb_setyawrated(modular_structs_t *structs)
{
structs->parameter_struct.yaw_ang_vel_pid.Kd = uart_buff_data_get_float(0);
return 0;
}
int cb_setrollratep(modular_structs_t *structs)
{
structs->parameter_struct.roll_ang_vel_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
int cb_setrollratei(modular_structs_t *structs)
{
structs->parameter_struct.roll_ang_vel_pid.Ki = uart_buff_data_get_float(0);
return 0;
}
int cb_setrollrated(modular_structs_t *structs)
{
structs->parameter_struct.roll_ang_vel_pid.Kd = uart_buff_data_get_float(0);
return 0;
}
int cb_setpitchratep(modular_structs_t *structs)
{
structs->parameter_struct.pitch_ang_vel_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
int cb_setpitchratei(modular_structs_t *structs)
{
structs->parameter_struct.pitch_ang_vel_pid.Ki = uart_buff_data_get_float(0);
return 0;
}
int cb_setpitchrated(modular_structs_t *structs)
{
structs->parameter_struct.pitch_ang_vel_pid.Kd = uart_buff_data_get_float(0);
return 0;
}
int cb_setxp(modular_structs_t *structs)
{
structs->parameter_struct.local_x_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
int cb_setxi(modular_structs_t *structs)
{
structs->parameter_struct.local_x_pid.Ki = uart_buff_data_get_float(0);
return 0;
}
int cb_setxd(modular_structs_t *structs)
{
structs->parameter_struct.local_x_pid.Kd = uart_buff_data_get_float(0);
return 0;
}
int cb_setyp(modular_structs_t *structs)
{
structs->parameter_struct.local_y_pid.Kp = uart_buff_data_get_float(0);
return 0;
}
int cb_setyi(modular_structs_t *structs)
{
structs->parameter_struct.local_y_pid.Ki = uart_buff_data_get_float(0);
return 0;
}
int cb_setyd(modular_structs_t *structs)
int cb_setheight(modular_structs_t *structs)
{
structs->parameter_struct.local_y_pid.Kd = uart_buff_data_get_float(0);
structs->setpoint_struct.desiredQuadPosition.alt_pos = uart_buff_data_get_float(0);
return 0;
}
......@@ -247,244 +157,3 @@ int cb_setheightd(modular_structs_t *structs)
{
structs->parameter_struct.alt_pid.Kd = uart_buff_data_get_float(0);
}
int cb_setheight(modular_structs_t *structs)
{
structs->setpoint_struct.desiredQuadPosition.alt_pos = uart_buff_data_get_float(0);
return 0;
}
int cb_setx(modular_structs_t *structs)
{
structs->setpoint_struct.desiredQuadPosition.x_pos = uart_buff_data_get_float(0);
return 0;
}
// TODO cb_sety will replace cb_setlat in commands.c once we talk about it
int cb_sety(modular_structs_t *structs)
{
structs->setpoint_struct.desiredQuadPosition.y_pos = uart_buff_data_get_float(0);
return 0;
}
int cb_setlon(modular_structs_t *structs)
{
// TODO need to be able to take in a lat, lon position and convert it to quad x, y pos
return 0;
}
int cb_setlat(modular_structs_t *structs)
{
// TODO need to be able to take in a lat, lon position and convert it to quad x, y pos
return 0;
}
int cb_setyaw(modular_structs_t *structs)
{
structs->setpoint_struct.desiredQuadPosition.yaw = uart_buff_data_get_float(0);
return 0;
}
int cb_setpitch(modular_structs_t *structs)
{
structs->setpoint_struct.desiredQuadPosition.pitch = uart_buff_data_get_float(0);
return 0;
}
int cb_setroll(modular_structs_t *structs)
{
structs->setpoint_struct.desiredQuadPosition.roll = uart_buff_data_get_float(0);
return 0;
}
/* callbacks for getters */
int cb_getyawp(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.yaw_angle_pid.Kp);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[0].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getyawi(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.yaw_angle_pid.Ki);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[1].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getyawd(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.yaw_angle_pid.Kd);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[2].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getrollp(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.roll_angle_pid.Kp);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[3].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getrolli(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.roll_angle_pid.Ki);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[4].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getrolld(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.roll_angle_pid.Kd);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[5].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getpitchp(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.pitch_angle_pid.Kp);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[6].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getpitchi(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.pitch_angle_pid.Ki);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[7].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getpitchd(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.pitch_angle_pid.Kd);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[8].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getyawratep(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.yaw_ang_vel_pid.Kp);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[9].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getyawratei(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.yaw_ang_vel_pid.Ki);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[10].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getyawrated(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.yaw_ang_vel_pid.Kd);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[11].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getrollratep(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.roll_ang_vel_pid.Kp);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[12].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getrollratei(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.roll_ang_vel_pid.Ki);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[13].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getrollrated(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.roll_ang_vel_pid.Kd);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[14].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getpitchratep(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.pitch_ang_vel_pid.Kp);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[15].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getpitchratei(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.pitch_ang_vel_pid.Ki);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[16].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
int cb_getpitchrated(modular_structs_t* structs) {
char buf[255];
// Message logging number of messages received and size of payload received
int length = snprintf(buf, sizeof buf, "%f", structs->parameter_struct.pitch_ang_vel_pid.Kd);
send_data(MessageTypes[2].ID, MessageTypes[2].subtypes[17].ID, 0, buf, length >= sizeof(buf) ? 255 : length + 1);
return 0;
}
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