Skip to content

Commit

Permalink
PID Progrsmming Framework pt1
Browse files Browse the repository at this point in the history
  • Loading branch information
DzikuVx committed Nov 28, 2020
1 parent cb1dd8d commit fa077fa
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ main_sources(COMMON_SRC
programming/global_variables.h
programming/programming_task.c
programming/programming_task.h
programming/pid.c
programming/pid.h

rx/crsf.c
rx/crsf.h
Expand Down
38 changes: 38 additions & 0 deletions src/main/programming/pid.c
Original file line number Diff line number Diff line change
@@ -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 changes: 30 additions & 0 deletions src/main/programming/pid.h
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 2 additions & 0 deletions src/main/programming/programming_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
FILE_COMPILE_FOR_SIZE

#include "programming/logic_condition.h"
#include "programming/pid.h"

void programmingFrameworkUpdateTask(timeUs_t currentTimeUs) {
programmingPidUpdateTask(currentTimeUs);
logicConditionUpdateTask(currentTimeUs);
}

0 comments on commit fa077fa

Please sign in to comment.