From 2947a0fe91149705380cd6e43fee0af8da2f4ac7 Mon Sep 17 00:00:00 2001 From: Faduf Date: Wed, 10 May 2017 20:36:36 +0200 Subject: [PATCH] Add of specific config for YuPiF4 targets --- src/main/target/YUPIF4/config.c | 39 +++++++++++++++++++++++++++++++++ src/main/target/YUPIF4/target.h | 1 + 2 files changed, 40 insertions(+) create mode 100644 src/main/target/YUPIF4/config.c diff --git a/src/main/target/YUPIF4/config.c b/src/main/target/YUPIF4/config.c new file mode 100644 index 0000000000..e680f323ee --- /dev/null +++ b/src/main/target/YUPIF4/config.c @@ -0,0 +1,39 @@ +/* + * This file is part of Cleanflight. + * + * Cleanflight is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Cleanflight is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Cleanflight. If not, see . + */ + +#include +#include + +#include + +#ifdef TARGET_CONFIG + +#include "flight/pid.h" + +// alternative defaults settings for YuPiF4 targets +void targetConfiguration(void) +{ + pidProfilesMutable(0)->pid[PID_ROLL].P = 35; + pidProfilesMutable(0)->pid[PID_ROLL].I = 45; + pidProfilesMutable(0)->pid[PID_ROLL].D = 30; + pidProfilesMutable(0)->pid[PID_PITCH].P = 40; + pidProfilesMutable(0)->pid[PID_PITCH].I = 50; + pidProfilesMutable(0)->pid[PID_PITCH].D = 30; + pidProfilesMutable(0)->pid[PID_YAW].P = 50; + pidProfilesMutable(0)->pid[PID_YAW].I = 50; +} +#endif diff --git a/src/main/target/YUPIF4/target.h b/src/main/target/YUPIF4/target.h index d68f3d957a..8f8eb186cf 100644 --- a/src/main/target/YUPIF4/target.h +++ b/src/main/target/YUPIF4/target.h @@ -17,6 +17,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "YPF4" +#define TARGET_CONFIG #define USBD_PRODUCT_STRING "YupiF4"