onboardsdk
Loading...
Searching...
No Matches
be-drone-depth.cpp
#include <fmt/core.h> // For fmt::format
#include <spdlog/spdlog.h> // Allows reading log level from env variable
#include <chrono> // For chrono_literals
#include <iostream> // For cout
#include <thread> // For sleep_for
#include "drone/PioneerDrone.hpp"
int main() {
using namespace std::chrono_literals; // For this_thread::sleep_for(1s);
using namespace std;
// Set log level to warn to mute log messages
spdlog::set_level(spdlog::level::warn);
this_thread::sleep_for(1s);
cout << fmt::format("Depth: {:.3f}", drone.get_depth()) << endl;
}
float get_depth(bool wait_for_data=true) const
Get the depth.
Class representing a drone.
Definition PioneerDrone.hpp:31