Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
bb6a0058
Commit
bb6a0058
authored
7 years ago
by
Ludovic Apvrille
Browse files
Options
Downloads
Patches
Plain Diff
Update on pressure controller graphical interface
parent
782c5983
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
executablecode/Makefile.src
+1
-1
1 addition, 1 deletion
executablecode/Makefile.src
executablecode/example/MainPressureController.java
+13
-4
13 additions, 4 deletions
executablecode/example/MainPressureController.java
with
14 additions
and
5 deletions
executablecode/Makefile.src
+
1
−
1
View file @
bb6a0058
SRCS
=
generated_src/main.c generated_src/ResqueTeam.c generated_src/SoftwareOfRoverRobot.c generated_src/RobotWebsite.c generated_src/RobotApplication.c generated_src/Sensors.c
\ No newline at end of file
SRCS
=
generated_src/main.c generated_src/AlarmActuator.c generated_src/PressureSensor.c generated_src/PressureController.c generated_src/AlarmManager.c generated_src/MainController.c generated_src/Timer__alarmTimer__AlarmManager.c
\ No newline at end of file
This diff is collapsed.
Click to expand it.
executablecode/example/MainPressureController.java
+
13
−
4
View file @
bb6a0058
...
...
@@ -10,7 +10,7 @@ import java.util.*;
public
class
MainPressureController
extends
JFrame
implements
Feeder
,
ChangeListener
{
static
final
int
PRESSURE_MIN
=
1
;
static
final
int
PRESSURE_MIN
=
5
;
static
final
int
PRESSURE_MAX
=
30
;
static
final
int
PRESSURE_INIT
=
15
;
//initial pressure
...
...
@@ -24,13 +24,16 @@ public class MainPressureController extends JFrame implements Feeder, ChangeList
public
MainPressureController
()
{
super
(
"Pressure Controller demonstration"
);
setSize
(
400
,
150
);
setVisible
(
true
);
ds
=
new
DatagramServer
();
ds
.
setFeeder
(
this
);
initComponents
();
ds
.
runServer
();
setSize
(
400
,
150
);
setVisible
(
true
);
}
public
void
initComponents
()
{
...
...
@@ -83,7 +86,13 @@ public class MainPressureController extends JFrame implements Feeder, ChangeList
public
void
stateChanged
(
ChangeEvent
e
)
{
System
.
out
.
println
(
"Value of pressure changed:"
+
pressureValue
.
getValue
());
if
(
ds
!=
null
)
{
ds
.
sendDatagramTo
(
"PRESSURE="
+
pressureValue
.
getValue
());
String
tmp
=
""
+
pressureValue
.
getValue
();
if
(
tmp
.
length
()
<
1
)
{
tmp
=
"00"
;
}
else
if
(
tmp
.
length
()
<
2
)
{
tmp
=
"0"
+
tmp
;
}
ds
.
sendDatagramTo
(
"PRESSURE="
+
tmp
);
}
}
...
...
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