Skip to content
Snippets Groups Projects
Commit a8e17f1b authored by Luca Erbetta's avatar Luca Erbetta :rocket:
Browse files

[GS] Updated backup ground station

parent ab927e07
No related branches found
No related tags found
No related merge requests found
...@@ -82,8 +82,8 @@ void handleMavlinkMessage(const mavlink_message_t* msg) ...@@ -82,8 +82,8 @@ void handleMavlinkMessage(const mavlink_message_t* msg)
switch (msg->msgid) switch (msg->msgid)
{ {
case MAVLINK_MSG_ID_HR_TM: case MAVLINK_MSG_ID_HR_TM:
fprintf(stdout, "%d,%f\n", (int)mavlink_msg_hr_tm_get_timestamp(msg), fprintf(stdout, "%d,%d,%f\n", (int)mavlink_msg_hr_tm_get_timestamp(msg),
(float)mavlink_msg_hr_tm_get_pressure(msg)); mavlink_msg_hr_tm_get_bitfield_1(msg), mavlink_msg_hr_tm_get_pressure(msg));
fflush(stdout); fflush(stdout);
break; break;
default: default:
......
...@@ -26,7 +26,7 @@ SAMPLES = 1000 ...@@ -26,7 +26,7 @@ SAMPLES = 1000
def animate(i, xs, ys): def animate(i, xs, ys):
line = sys.stdin.readline() line = sys.stdin.readline()
line = line[0:-2] line = line[0:-2]
x, y= line.split(',') x, b, y= line.split(',')
x = float(x) x = float(x)
y = float(y) y = float(y)
global last global last
...@@ -35,7 +35,7 @@ def animate(i, xs, ys): ...@@ -35,7 +35,7 @@ def animate(i, xs, ys):
xs.append(x) xs.append(x)
ys.append(y) ys.append(y)
print(x, y) print(x, y, b)
if(len(xs) > SAMPLES): if(len(xs) > SAMPLES):
xs = xs[-SAMPLES:] xs = xs[-SAMPLES:]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment