Skip to content

Commit f395408

Browse files
Merge pull request #20 from Spruik/feat/simulation-speed-as-environmental-variable
Add simulation TICK environmental variable
2 parents 3441c05 + c6ad8da commit f395408

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ The name of the MQTT user with subscribe and publish permissions.
182182

183183
The password for the MQTT user with subscribe and publish permissions.
184184

185+
### TICK
186+
187+
The tick speed of the simulation in milliseconds. This is optional. Default is 1000.
188+
185189
## Enterprise Simulation
186190

187191
Use docker-compose to simulate multiple independent lines at once. E.g.
@@ -218,6 +222,9 @@ For any issue, there are fundamentally three ways an individual can contribute:
218222

219223
## Changelog
220224

225+
- 1.0.8
226+
- Add simulation TICK env variable
227+
221228
- 1.0.7
222229
- Update ini library from 1.3.5 to 1.3.8
223230
- Add docker container labels

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "packaging-machine-language-mqtt-simulator",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "Manufacturing line simulator interfaced using PackML over MQTT.",
55
"keywords": [
66
"packml",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ mqttClient.on('connect', (packet) => {
124124
tags.status.unitModeCurrent = unitMode
125125
})
126126
// Simulate
127-
global.sim = simulation.simulate(mode, state, tags)
127+
global.sim = simulation.simulate(mode, state, tags, process.env.TICK || 1000,)
128128
})
129129

130130
mqttClient.on('close', () => {

0 commit comments

Comments
 (0)