mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-16 04:45:22 +03:00
PID Progrsmming Framework pt1
This commit is contained in:
parent
cb1dd8d039
commit
fa077fa186
4 changed files with 72 additions and 0 deletions
|
@ -366,6 +366,8 @@ main_sources(COMMON_SRC
|
||||||
programming/global_variables.h
|
programming/global_variables.h
|
||||||
programming/programming_task.c
|
programming/programming_task.c
|
||||||
programming/programming_task.h
|
programming/programming_task.h
|
||||||
|
programming/pid.c
|
||||||
|
programming/pid.h
|
||||||
|
|
||||||
rx/crsf.c
|
rx/crsf.c
|
||||||
rx/crsf.h
|
rx/crsf.h
|
||||||
|
|
38
src/main/programming/pid.c
Normal file
38
src/main/programming/pid.c
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* This file is part of INAV Project.
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms
|
||||||
|
* of the GNU General Public License Version 3, as described below:
|
||||||
|
*
|
||||||
|
* This file is free software: you may copy, redistribute 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.
|
||||||
|
*
|
||||||
|
* This file 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 this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
FILE_COMPILE_FOR_SIZE
|
||||||
|
|
||||||
|
#ifdef USE_PROGRAMMING_FRAMEWORK
|
||||||
|
|
||||||
|
#include "programming/pid.h"
|
||||||
|
|
||||||
|
void programmingPidUpdateTask(timeUs_t currentTimeUs)
|
||||||
|
{
|
||||||
|
//Dummy
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
30
src/main/programming/pid.h
Normal file
30
src/main/programming/pid.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* This file is part of INAV Project.
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms
|
||||||
|
* of the GNU General Public License Version 3, as described below:
|
||||||
|
*
|
||||||
|
* This file is free software: you may copy, redistribute 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.
|
||||||
|
*
|
||||||
|
* This file 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 this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config/parameter_group.h"
|
||||||
|
#include "common/time.h"
|
||||||
|
|
||||||
|
void programmingPidUpdateTask(timeUs_t currentTimeUs);
|
|
@ -27,7 +27,9 @@
|
||||||
FILE_COMPILE_FOR_SIZE
|
FILE_COMPILE_FOR_SIZE
|
||||||
|
|
||||||
#include "programming/logic_condition.h"
|
#include "programming/logic_condition.h"
|
||||||
|
#include "programming/pid.h"
|
||||||
|
|
||||||
void programmingFrameworkUpdateTask(timeUs_t currentTimeUs) {
|
void programmingFrameworkUpdateTask(timeUs_t currentTimeUs) {
|
||||||
|
programmingPidUpdateTask(currentTimeUs);
|
||||||
logicConditionUpdateTask(currentTimeUs);
|
logicConditionUpdateTask(currentTimeUs);
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue