Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Uebung0
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Control and Cyber-Physical Systems (Public)
Programmierung in der Automatisierungstechnik
Uebung0
Commits
bd87e098
Verified
Commit
bd87e098
authored
1 year ago
by
Stauder, Lucas
Browse files
Options
Downloads
Patches
Plain Diff
formatted and moved to int
parent
56294811
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/controller.c
+1
-6
1 addition, 6 deletions
src/controller.c
src/controller.h
+2
-2
2 additions, 2 deletions
src/controller.h
src/controller.test.cpp
+6
-6
6 additions, 6 deletions
src/controller.test.cpp
src/main.c
+2
-3
2 additions, 3 deletions
src/main.c
with
11 additions
and
17 deletions
src/controller.c
+
1
−
6
View file @
bd87e098
#include
"controller.h"
#include
"controller.h"
double
controller
(
double
w
,
double
y
,
double
maxControl
){
int
controller
(
int
w
,
int
y
,
int
maxControl
)
{
return
0
;
}
return
0
;
}
This diff is collapsed.
Click to expand it.
src/controller.h
+
2
−
2
View file @
bd87e098
#ifndef controller_H
#ifndef controller_H
#define controller_H
#define controller_H
double
controller
(
double
w
,
double
y
,
double
maxControl
);
int
controller
(
int
w
,
int
y
,
int
maxControl
);
#endif // controller_H
#endif // controller_H
This diff is collapsed.
Click to expand it.
src/controller.test.cpp
+
6
−
6
View file @
bd87e098
...
@@ -4,8 +4,8 @@ extern "C" {
...
@@ -4,8 +4,8 @@ extern "C" {
}
}
TEST_CASE
(
"PI_Regler"
)
{
TEST_CASE
(
"PI_Regler"
)
{
REQUIRE
(
controller
(
8
,
0
,
500
)
==
16
.0
);
REQUIRE
(
controller
(
8
,
0
,
500
)
==
16
);
REQUIRE
(
controller
(
-
2
,
0
,
500
)
==
-
4
.0
);
REQUIRE
(
controller
(
-
2
,
0
,
500
)
==
-
4
);
}
}
TEST_CASE
(
"limits"
)
{
TEST_CASE
(
"limits"
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main.c
+
2
−
3
View file @
bd87e098
#include
<stdio.h>
#include
<stdio.h>
#include
"controller.h"
#include
"controller.h"
int
main
()
{
int
main
()
{
return
0
;
}
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment