AP_Baro: fix example output
PX4 boards can only start console after USB is connected so we need to check it is available
This commit is contained in:
parent
4a3917a349
commit
f6687a2d6c
@ -32,6 +32,10 @@ void setup()
|
||||
|
||||
void loop()
|
||||
{
|
||||
if (!hal.console->is_initialized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// run accumulate() at 50Hz and update() at 10Hz
|
||||
if ((AP_HAL::micros() - timer) > 20 * 1000UL) {
|
||||
timer = AP_HAL::micros();
|
||||
|
Loading…
Reference in New Issue
Block a user