From 041543a0b3cd4016a942667d2892bf1da3b6cd14 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Wed, 1 Jun 2022 10:29:00 -0500 Subject: [PATCH] Deprecate public variable `CycleTimeReport::average_loop_time` Signed-off-by: Michael Richters --- .../src/kaleidoscope/plugin/CycleTimeReport.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.h b/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.h index 5b70dd4d..07a94c59 100644 --- a/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.h +++ b/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.h @@ -21,6 +21,15 @@ #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin +// ----------------------------------------------------------------------------- +// Deprecation warning messages +#include "kaleidoscope_internal/deprecations.h" // for DEPRECATED + +#define _DEPRECATED_MESSAGE_CYCLETIMEREPORT_AVG_TIME \ + "The `CycleTimeReport.average_loop_time` variable is deprecated. See\n" \ + "the current documentation for CycleTimeReport for details.\n" \ + "This variable will be removed after 2022-09-01." +// ----------------------------------------------------------------------------- namespace kaleidoscope { namespace plugin { @@ -32,7 +41,10 @@ class CycleTimeReport : public kaleidoscope::Plugin { EventHandlerResult beforeEachCycle(); EventHandlerResult afterEachCycle(); +#ifndef NDEPRECATED + DEPRECATED(CYCLETIMEREPORT_AVG_TIME) static uint32_t average_loop_time; +#endif private: static uint16_t last_report_time_;