Skip to content

Commit

Permalink
hoge
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuhitoyokoi committed Dec 31, 2022
1 parent 4021b87 commit 933bd02
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
2 changes: 0 additions & 2 deletions docs/bus.htm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
var map = L.map('map');
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
map.setView([35.3386861, 139.4870951], 7);
alert("msgData1");
function debug(msgData) {
var msg = JSON.parse(msgData);
alert(msg);
//map.setView([msg.latitude, msg.longitude]);
//L.marker([msg.latitude, msg.longitude],{"color": "#910000"}).addTo(map);
for (var i = 0; i < msg.length; i++) {
Expand Down
Binary file modified docs/bus.wasm
Binary file not shown.
18 changes: 9 additions & 9 deletions examples/bus.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"id": "8740d4c87aa226d5",
"type": "http request",
"z": "506a7e799b8b8c67",
"z": "54d24c374bb820d2",
"name": "",
"method": "GET",
"ret": "obj",
Expand All @@ -15,7 +15,7 @@
"authType": "",
"senderr": false,
"headers": [],
"x": 390,
"x": 330,
"y": 120,
"wires": [
[
Expand All @@ -26,7 +26,7 @@
{
"id": "7d5ef118b8c6f3cb",
"type": "inject",
"z": "506a7e799b8b8c67",
"z": "54d24c374bb820d2",
"name": "",
"props": [
{
Expand All @@ -37,14 +37,14 @@
"vt": "str"
}
],
"repeat": "1",
"repeat": "",
"crontab": "",
"once": false,
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 210,
"x": 150,
"y": 120,
"wires": [
[
Expand All @@ -55,7 +55,7 @@
{
"id": "9ae96b81d3eb6fe2",
"type": "debug",
"z": "506a7e799b8b8c67",
"z": "54d24c374bb820d2",
"name": "debug 1",
"active": true,
"tosidebar": true,
Expand All @@ -64,8 +64,8 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 560,
"x": 500,
"y": 120,
"wires": []
}
]
]
16 changes: 8 additions & 8 deletions flows.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ func flows() string { return `
{
"id": "8740d4c87aa226d5",
"type": "http request",
"z": "506a7e799b8b8c67",
"z": "54d24c374bb820d2",
"name": "",
"method": "GET",
"ret": "obj",
Expand All @@ -17,7 +17,7 @@ func flows() string { return `
"authType": "",
"senderr": false,
"headers": [],
"x": 390,
"x": 330,
"y": 120,
"wires": [
[
Expand All @@ -28,7 +28,7 @@ func flows() string { return `
{
"id": "7d5ef118b8c6f3cb",
"type": "inject",
"z": "506a7e799b8b8c67",
"z": "54d24c374bb820d2",
"name": "",
"props": [
{
Expand All @@ -39,14 +39,14 @@ func flows() string { return `
"vt": "str"
}
],
"repeat": "1",
"repeat": "",
"crontab": "",
"once": false,
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 210,
"x": 150,
"y": 120,
"wires": [
[
Expand All @@ -57,7 +57,7 @@ func flows() string { return `
{
"id": "9ae96b81d3eb6fe2",
"type": "debug",
"z": "506a7e799b8b8c67",
"z": "54d24c374bb820d2",
"name": "debug 1",
"active": true,
"tosidebar": true,
Expand All @@ -66,7 +66,7 @@ func flows() string { return `
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 560,
"x": 500,
"y": 120,
"wires": []
}
Expand Down
3 changes: 2 additions & 1 deletion red.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ func execute(nodeId string, msg string) {
var currentNodeId = flowItems[i]["id"]
var nodeWires = flowItems[i]["wires"].([]interface{})
if nodeType == "inject" && nodeId == "" {
int repeat, _ = strconv.Atoi(flowItems[i]["repeat"].(string))
go func() {
ticker := time.NewTicker(time.Second)
ticker := time.NewTicker(time.Second * repeat)
defer ticker.Stop()
done := make(chan bool)
go func() {
Expand Down

0 comments on commit 933bd02

Please sign in to comment.