projects
/
Mograsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
440a9a9
)
Introduced getters for executionSpeed
author
Daniel Kirschten
<daniel.kirschten@gmx.de>
Mon, 30 Sep 2019 16:33:04 +0000
(18:33 +0200)
committer
Daniel Kirschten
<daniel.kirschten@gmx.de>
Mon, 30 Sep 2019 16:35:28 +0000
(18:35 +0200)
plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java
patch
|
blob
|
history
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
patch
|
blob
|
history
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineDebugTarget.java
patch
|
blob
|
history
diff --git
a/plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java
b/plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java
index
94dd552
..
04c0fc8
100644
(file)
--- a/
plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java
+++ b/
plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java
@@
-51,6
+51,11
@@
public class PauseableTimeFunction implements TimeFunction
return 1 / 1000d / speedFactor;
}
+ public double getSpeedFactor()
+ {
+ return speedFactor;
+ }
+
public void setSpeedFactor(double factor)
{
if (factor <= 0)
diff --git
a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
index
c0cfeb1
..
1eff411
100644
(file)
--- a/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
+++ b/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
@@
-132,6
+132,11
@@
public class LogicExecuter
return isPaused.get();
}
+ public double getSpeedFactor()
+ {
+ return tf.getSpeedFactor();
+ }
+
public void setSpeedFactor(double factor)
{
tf.setSpeedFactor(factor);
diff --git
a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineDebugTarget.java
b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineDebugTarget.java
index
328c589
..
a060bd5
100644
(file)
--- a/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineDebugTarget.java
+++ b/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineDebugTarget.java
@@
-74,9
+74,15
@@
public class MachineDebugTarget extends PlatformObject implements IDebugTarget,
return launch;
}
+ public double getExecutionSpeed()
+ {
+ return exec.getSpeedFactor();
+ }
+
public void setExecutionSpeed(double speed)
{
- exec.setSpeedFactor(speed);
+ if (getExecutionSpeed() != speed)
+ exec.setSpeedFactor(speed);
}
@Override