diff options
author | David Jacobs <davejacobs@google.com> | 2019-12-16 18:36:44 -0500 |
---|---|---|
committer | Anthony Stange <stange@google.com> | 2019-12-18 15:27:12 +0000 |
commit | 98f1a92c3f698f656b6adda339a4ebbdd8e7eb8c (patch) | |
tree | 8199552775c079da756a4adb245428fd59ddccf3 | |
parent | 86028528d62951e8b323d0aba55a6e85563253a0 (diff) | |
download | contexthub-98f1a92c3f698f656b6adda339a4ebbdd8e7eb8c.tar.gz |
[ImuCal] Minimal calibration info loggingandroid-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android10-qpr3-s1-releaseandroid10-qpr3-release
- With NANO_SENSOR_CAL_DBG_ENABLED not defined, all log messages
are disabled except LOGI in nano_calibration.cc. This reduces
the ImuCal's nanoapp memory footprint to reach the padding
limits while still providing our minimal calibration logging
updates useful for device verification.
text data bss dec hex
27316 2600 18712 48628 bdf4
MemSize:0x7fe8 Align:0x1000 Padded:0x8000 Padding:88
MemSize:0x4af0 Align:0x1000 Padded:0x5000 Padding:1296
Total Padded MemSize: 0xd000 (53248)
--Original---------------------------
MemSize:0x8288 Align:0x1000 Padded:0x9000 Padding:3448
MemSize:0x4af0 Align:0x1000 Padded:0x5000 Padding:1296
Total Padded MemSize: 0xe000 (57344)
Bug: 146219309
Test: Built firmware.
Merged-In: I476e04be50b8f324cab5fc0ccd72a825db514e42
Change-Id: I476e04be50b8f324cab5fc0ccd72a825db514e42
(cherry picked from commit ba4f3429b63d1bcb0cb2c72e10ed465022949cf3)
-rw-r--r-- | firmware/os/algos/calibration/nano_calibration/nano_calibration.cc | 9 |
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, |