|
|
|
@ -429,7 +429,7 @@ test_imu(uint8_t argc, const Menu::arg *argv)
@@ -429,7 +429,7 @@ test_imu(uint8_t argc, const Menu::arg *argv)
|
|
|
|
|
|
|
|
|
|
while(1){ |
|
|
|
|
//delay(20); |
|
|
|
|
if (millis() - fast_loopTimer >= 5) { |
|
|
|
|
if (millis() - fast_loopTimer >=5) { |
|
|
|
|
|
|
|
|
|
// IMU |
|
|
|
|
// --- |
|
|
|
@ -795,9 +795,16 @@ test_baro(uint8_t argc, const Menu::arg *argv)
@@ -795,9 +795,16 @@ test_baro(uint8_t argc, const Menu::arg *argv)
|
|
|
|
|
init_barometer(); |
|
|
|
|
|
|
|
|
|
while(1){ |
|
|
|
|
delay(100); |
|
|
|
|
barometer.Read(); |
|
|
|
|
delay(100); |
|
|
|
|
baro_alt = read_barometer(); |
|
|
|
|
Serial.printf_P(PSTR("Baro: %dcm\n"), baro_alt); |
|
|
|
|
|
|
|
|
|
int temp_rate = (barometer._offset_press - barometer.RawPress) << 1; |
|
|
|
|
altitude_rate = (temp_rate - old_rate) * 10; |
|
|
|
|
old_rate = temp_rate; |
|
|
|
|
// 1 2 3 4 5 1 2 3 4 5 |
|
|
|
|
Serial.printf_P(PSTR("Baro: %dcm, rate:%d, %ld, %ld, %d\n"), baro_alt, altitude_rate, barometer.RawTemp, barometer.RawPress, temp_rate); |
|
|
|
|
//Serial.printf_P(PSTR("Baro, %d, %ld, %ld, %ld, %ld\n"), baro_alt, barometer.RawTemp, barometer.RawTemp2, barometer.RawPress, barometer.RawPress2); |
|
|
|
|
if(Serial.available() > 0){ |
|
|
|
|
return (0); |
|
|
|
|