Update cubesatsim.ino

pull/152/head
alanbjohnston 4 years ago committed by GitHub
parent 8ab0d2dbdc
commit a1d27d836d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1679,7 +1679,8 @@ void read_payload()
strcpy(payload_str, header); strcpy(payload_str, header);
print_string(str); print_string(str);
if (bmePresent) if (bmePresent)
sprintf(str, "%4.2f %6.2f %6.2f %5.2f ", // sprintf(str, "%4.2f %6.2f %6.2f %5.2f ",
sprintf(str, "%f %f %f %f ",
bme.readTemperature(), bme.readPressure() / 100.0, bme.readAltitude(SEALEVELPRESSURE_HPA), bme.readHumidity()); bme.readTemperature(), bme.readPressure() / 100.0, bme.readAltitude(SEALEVELPRESSURE_HPA), bme.readHumidity());
else else
sprintf(str, "OK BME280 0.0 0.0 0.0 0.0 "); sprintf(str, "OK BME280 0.0 0.0 0.0 0.0 ");
@ -1688,7 +1689,8 @@ void read_payload()
print_string(payload_str); print_string(payload_str);
mpu6050.update(); mpu6050.update();
sprintf(str, " MPU6050 %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f ", // sprintf(str, " MPU6050 %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f ",
sprintf(str, " MPU6050 %f %f %f %f %f %f ",
mpu6050.getGyroX(), mpu6050.getGyroY(), mpu6050.getGyroZ(), mpu6050.getAccX(), mpu6050.getAccY(), mpu6050.getAccZ()); mpu6050.getGyroX(), mpu6050.getGyroY(), mpu6050.getGyroZ(), mpu6050.getAccX(), mpu6050.getAccY(), mpu6050.getAccZ());
strcat(payload_str, str); strcat(payload_str, str);

Loading…
Cancel
Save

Powered by TurnKey Linux.