From 9f3e782ee70a229a7b1a373b503d9c80a3a17d62 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 6 Sep 2020 08:55:21 -0400 Subject: [PATCH] Added RXTemperature from the BME280 sensor reading --- afsk/main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/afsk/main.c b/afsk/main.c index f3822f6e..019c6798 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -851,7 +851,7 @@ int get_tlm_fox() { int posXi = 0, negXi = 0, posYi = 0, negYi = 0, posZi = 0, negZi = 0; int head_offset = 0; // int xAngularVelocity = (-0.69)*(-10)*(-10) + 45.3 * (-10) + 2078, yAngularVelocity = (-0.69)*(-6)*(-6) + 45.3 * (-6) + 2078, zAngularVelocity = (-0.69)*(6)*(6) + 45.3 * (6) + 2078; // XAxisAngularVelocity - int xAngularVelocity = 2078, yAngularVelocity = 2078, zAngularVelocity = 2078; // XAxisAngularVelocity Y and Z set to 0 + int xAngularVelocity = 2078, yAngularVelocity = 2078, zAngularVelocity = 2078, int RXTemperature = 0; // XAxisAngularVelocity Y and Z set to 0 short int buffer_test[bufLen]; int buffSize; @@ -1049,8 +1049,11 @@ if (payload == ON) for (count1 = 0; count1 < 7; count1++) // skipping over BME280 data { if (token != NULL) - token = strtok(NULL, space); - } + token = strtok(NULL, space); + if (count1 = 2) + RXTemperature = atof(token); + } + printf("RX Temperature: %f \n", RXTemperature); if (token != NULL) { gyroX = atof(token);