diff --git a/groundStation/src/cli/cli_getpid.c b/groundStation/src/cli/cli_getpid.c index 55fadb4a3cfe37dad8b46d708d4b04ae16b2a2f0..4eead75438f803ecb4697df862506a768c07f1fd 100644 --- a/groundStation/src/cli/cli_getpid.c +++ b/groundStation/src/cli/cli_getpid.c @@ -34,33 +34,33 @@ int cli_getpid(struct backend_conn * conn, int argc, char **argv) { int result; if(getAll) { - pid_data.pid = ROLL; + pid_data.controller = ROLL; if ((result = getValues(conn, &pid_data))) { return result; } - pid_data.pid = PITCH; + pid_data.controller = PITCH; if ((result = getValues(conn, &pid_data))) { return result; } - pid_data.pid = YAW; + pid_data.controller = YAW; if ((result = getValues(conn, &pid_data))) { return result; } } else { if(getPitch) { - pid_data.pid = PITCH; + pid_data.controller = PITCH; if ((result = getValues(conn, &pid_data))) { return result; } } if(getRoll) { - pid_data.pid = ROLL; + pid_data.controller = ROLL; if ((result = getValues(conn, &pid_data))) { return result; } } if(getYaw) { - pid_data.pid = YAW; + pid_data.controller = YAW; if ((result = getValues(conn, &pid_data))) { return result; } @@ -77,7 +77,7 @@ int getValues(struct backend_conn * conn, struct frontend_pid_data * pid_data) { return 0; - switch(pid_data->pid) { + switch(pid_data->controller) { case PITCH : printf("Pitch Constants: P = %f\tI = %f\tD = %f\n", pid_data->p, pid_data->i, pid_data->d); @@ -94,4 +94,4 @@ int getValues(struct backend_conn * conn, struct frontend_pid_data * pid_data) { break; } return 0; -} \ No newline at end of file +} diff --git a/groundStation/src/frontend/frontend_getpid.c b/groundStation/src/frontend/frontend_getpid.c index 0b25ec270988a066ef8633187cb52ad13ed24c8c..bd6b387cc9e64d60bd0e8db09d3bc0a850afadb0 100644 --- a/groundStation/src/frontend/frontend_getpid.c +++ b/groundStation/src/frontend/frontend_getpid.c @@ -23,7 +23,7 @@ int frontend_getpid( struct backend_conn * conn, struct frontend_pid_data * pid_data) { char line[100] = ""; - switch (pid_data->pid) { + switch (pid_data->controller) { case PITCH : strncpy(line, "getpitchp\ngetpitchd\n", 20); break; @@ -43,4 +43,4 @@ int frontend_getpid( } return 0; -} \ No newline at end of file +} diff --git a/groundStation/src/frontend/pid_common.h b/groundStation/src/frontend/pid_common.h index c1dac6535d7f6a5f219da61bce7b7a17d247d963..e4f65625c13c49f6d785cc06fdb6e7c6187c1ab5 100644 --- a/groundStation/src/frontend/pid_common.h +++ b/groundStation/src/frontend/pid_common.h @@ -1,7 +1,7 @@ #ifndef PID_COMMON_H #define PID_COMMON_H -enum frontend_pid { +enum pid_controller { PITCH, ROLL, YAW, @@ -9,7 +9,7 @@ enum frontend_pid { }; struct frontend_pid_data { - enum frontend_pid pid; + enum pid_controller controller; float p; float i;