summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-01-15 15:56:39 -0800
committerXin Li <delphij@google.com>2020-01-15 15:56:39 -0800
commit528f0a7c873bf72ed653e04c7078da48020d0702 (patch)
treeee604ccd9340f80f7e395f7a61a897fd15ae3508
parent1a27b954cbf225bfbb1d1b8051950504ccbf047f (diff)
parent8051945f946b996e4185b30038a19e506caca7e6 (diff)
downloadcontexthub-528f0a7c873bf72ed653e04c7078da48020d0702.tar.gz
DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-masterandroid10-sidebranch
Bug: 146167222 Change-Id: Ia93cf5d79217da6d48808cd89b0fb201ef8188c3
-rw-r--r--firmware/os/algos/calibration/nano_calibration/nano_calibration.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/os/algos/calibration/nano_calibration/nano_calibration.cc b/firmware/os/algos/calibration/nano_calibration/nano_calibration.cc
index 0df2ae6b..8dcbda7b 100644
--- a/firmware/os/algos/calibration/nano_calibration/nano_calibration.cc
+++ b/firmware/os/algos/calibration/nano_calibration/nano_calibration.cc
@@ -30,21 +30,24 @@ using ::online_calibration::SensorIndex;
using ::online_calibration::SensorType;
// NanoSensorCal logging macros.
-#ifdef NANO_SENSOR_CAL_DBG_ENABLED
#ifndef LOG_TAG
#define LOG_TAG "[ImuCal]"
#endif
+
+#ifdef NANO_SENSOR_CAL_DBG_ENABLED
#define NANO_CAL_LOGD(tag, format, ...) LOGD("%s " format, tag, ##__VA_ARGS__)
-#define NANO_CAL_LOGI(tag, format, ...) LOGI("%s " format, tag, ##__VA_ARGS__)
#define NANO_CAL_LOGW(tag, format, ...) LOGW("%s " format, tag, ##__VA_ARGS__)
#define NANO_CAL_LOGE(tag, format, ...) LOGE("%s " format, tag, ##__VA_ARGS__)
#else
#define NANO_CAL_LOGD(tag, format, ...) CHRE_LOG_NULL(format, ##__VA_ARGS__)
-#define NANO_CAL_LOGI(tag, format, ...) CHRE_LOG_NULL(format, ##__VA_ARGS__)
#define NANO_CAL_LOGW(tag, format, ...) CHRE_LOG_NULL(format, ##__VA_ARGS__)
#define NANO_CAL_LOGE(tag, format, ...) CHRE_LOG_NULL(format, ##__VA_ARGS__)
#endif // NANO_SENSOR_CAL_DBG_ENABLED
+// NOTE: LOGI is defined to ensure calibration updates are always logged for
+// field diagnosis and verification.
+#define NANO_CAL_LOGI(tag, format, ...) LOGI("%s " format, tag, ##__VA_ARGS__)
+
} // namespace
void NanoSensorCal::Initialize(OnlineCalibrationThreeAxis *accel_cal,