mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 02:51:37 +08:00
Refactored debug() and log() in CDev
These functions used vprintf which is not available on all platforms. They also do not enable line and file debug output. Changed to macros that preserve the output format. Uses new macro that can be used to implement per object, runtime selectable logging Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -161,7 +161,7 @@ ETSAirspeed::collect()
|
||||
// caller could end up using this value as part of an
|
||||
// average
|
||||
perf_count(_comms_errors);
|
||||
log("zero value from sensor");
|
||||
DEVICE_LOG("zero value from sensor");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ ETSAirspeed::cycle()
|
||||
/* measurement phase */
|
||||
ret = measure();
|
||||
if (OK != ret) {
|
||||
debug("measure error");
|
||||
DEVICE_DEBUG("measure error");
|
||||
}
|
||||
|
||||
_sensor_ok = (ret == OK);
|
||||
|
||||
Reference in New Issue
Block a user