From 4ea5b1acf17864d8b1e6f4d9b71e75e82d8590b7 Mon Sep 17 00:00:00 2001 From: Carsten1987 <75756062+Carsten1987@users.noreply.github.com> Date: Sat, 8 Jul 2023 17:26:14 +0200 Subject: [PATCH] Add extern-C to use Lib also in C++-Code --- PID.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PID.h b/PID.h index 5a5c39d..c2f8a82 100644 --- a/PID.h +++ b/PID.h @@ -1,6 +1,10 @@ #ifndef PID_CONTROLLER_H #define PID_CONTROLLER_H +#ifdef __cplusplus + extern "C" { +#endif + typedef struct { /* Controller gains */ @@ -36,4 +40,8 @@ typedef struct { void PIDController_Init(PIDController *pid); float PIDController_Update(PIDController *pid, float setpoint, float measurement); +#ifdef __cplusplus +} +#endif + #endif