From 7f0db95f870fb9ce4602d6b9ed66422a3cb6e7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 7 Apr 2017 16:58:25 +0200 Subject: [PATCH] logger: reduce CPU load by ~1.5% Reduces CPU load from ~6.9% to 5.3% (tested on Pixracer & Pixhawk). The method is only used once, so it does not increase flash usage. --- src/modules/logger/logger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/logger/logger.h b/src/modules/logger/logger.h index 5a6055e2dc..ef30141306 100644 --- a/src/modules/logger/logger.h +++ b/src/modules/logger/logger.h @@ -215,7 +215,7 @@ private: void write_changed_parameters(); - bool copy_if_updated_multi(LoggerSubscription &sub, int multi_instance, void *buffer, bool try_to_subscribe); + inline bool copy_if_updated_multi(LoggerSubscription &sub, int multi_instance, void *buffer, bool try_to_subscribe); /** * Write exactly one ulog message to the logger and handle dropouts.