Skip to content

Commit

Permalink
Merge pull request #265 from ueckoken/make-hardware-json
Browse files Browse the repository at this point in the history
Make-hardware-json
  • Loading branch information
csenet authored Nov 25, 2023
2 parents 73acd10 + 281f2e2 commit c84c9c9
Show file tree
Hide file tree
Showing 21 changed files with 448 additions and 53 deletions.
4 changes: 0 additions & 4 deletions backend/state-manager/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ func main() {
cancel()
return
}
eg.Go(func() error {
slog.Default().Info("start mqtt handler")
return mqttHandler.Start(ctx)
})

r := chi.NewRouter()
// r.Use(middleware.Recoverer)
Expand Down
3 changes: 2 additions & 1 deletion hardware/esp32-control/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"initializer_list": "cpp",
"format": "cpp",
"span": "cpp",
"mixinvector": "cpp"
"mixinvector": "cpp",
"stacktrace": "cpp"
}
}
77 changes: 77 additions & 0 deletions hardware/esp32-control/config/chofu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"name": "chofu",
"stops": [
{
"stop_id": "chofu_down_s1",
"pin": 14
},
{
"stop_id": "chofu_down_s2",
"pin": 15
},
{
"stop_id": "chofu_up_s1",
"pin": 16
},
{
"stop_id": "chofu_up_s2",
"pin": 17
}
],
"points": [
{
"point_id": "chofu_down_p1",
"pin": 13
}
],
"detectors": [
{
"block_id": "shinjyuku_down_b1",
"target": "CLOSE",
"pin": 12
},
{
"block_id": "chofu_up_b1",
"target": "CLOSE",
"pin": 22
},
{
"block_id": "chofu_down_b1",
"target": "CLOSE",
"pin": 23
},
{
"block_id": "chofu_down_b2",
"target": "CLOSE",
"pin": 25
},
{
"block_id": "hashimoto_up_b1",
"target": "OPEN",
"pin": 26
},
{
"block_id": "hachioji_up_b1",
"target": "OPEN",
"pin": 27
}
],
"nfcs": [
{
"nfc_id": "chofu_down_s1",
"pin": 4
},
{
"nfc_id": "chofu_down_s2",
"pin": 5
},
{
"nfc_id": "chofu_up_s1",
"pin": 32
},
{
"nfc_id": "chofu_up_s2",
"pin": 33
}
]
}
45 changes: 45 additions & 0 deletions hardware/esp32-control/config/hachioji.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "hachioji",
"stops": [
{
"stop_id": "hachioji_up_s1",
"pin": 13
},
{
"stop_id": "hachioji_down_s1",
"pin": 14
}
],
"detectors": [
{
"block_id": "chofu_down_b1",
"target": "OPEN",
"pin": 12
},
{
"block_id": "hachioji_up_b1",
"target": "CLOSE",
"pin": 22
},
{
"block_id": "hachioji_down_b1",
"target": "CLOSE",
"pin": 23
},
{
"block_id": "hachioji_down_b1",
"target": "OPEN",
"pin": 25
}
],
"nfcs": [
{
"nfc_id": "hachioji_up_s1",
"pin": 4
},
{
"nfc_id": "hachioji_down_s1",
"pin": 5
}
]
}
67 changes: 67 additions & 0 deletions hardware/esp32-control/config/hasen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "sakurajosui",
"stops": [
{
"stop_id": "sakurajosui_up_s1",
"pin": 14
},
{
"stop_id": "sakurajosui_up_s2",
"pin": 15
},
{
"stop_id": "sakurajosui_down_s1",
"pin": 16
},
{
"stop_id": "sakurajosui_down_s2",
"pin": 17
}
],
"points": [
{
"point_id": "sakurajosui_down_p1",
"pin": 13
}
],
"detectors": [
{
"block_id": "shinjyuku_down_b1",
"target": "OPEN",
"pin": 12
},
{
"block_id": "sakurajosui_up_b1",
"target": "CLOSE",
"pin": 22
},
{
"block_id": "chofu_up_b1",
"target": "OPEN",
"pin": 23
},
{
"block_id": "chofu_down_b1",
"target": "CLOSE",
"pin": 25
}
],
"nfcs": [
{
"nfc_id": "sakurajosui_up_s1",
"pin": 4
},
{
"nfc_id": "sakurajosui_up_s2",
"pin": 5
},
{
"nfc_id": "sakurajosui_down_s1",
"pin": 32
},
{
"nfc_id": "sakurajosui_down_s2",
"pin": 33
}
]
}
45 changes: 45 additions & 0 deletions hardware/esp32-control/config/hashimoto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "hashimoto",
"stops": [
{
"stop_id": "hashimoto_up_s1",
"pin": 13
},
{
"stop_id": "hashimoto_down_s1",
"pin": 14
}
],
"detectors": [
{
"block_id": "chofu_down_b1",
"target": "OPEN",
"pin": 12
},
{
"block_id": "hashimoto_down_b1",
"target": "CLOSE",
"pin": 22
},
{
"block_id": "hashimoto_down_b1",
"target": "OPEN",
"pin": 23
},
{
"block_id": "hashimoto_up_b1",
"target": "CLOSE",
"pin": 25
}
],
"nfcs": [
{
"nfc_id": "hashimoto_up_s1",
"pin": 4
},
{
"nfc_id": "hashimoto_down_s1",
"pin": 5
}
]
}
71 changes: 71 additions & 0 deletions hardware/esp32-control/config/sakurajosui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "sakurajosui",
"stops": [
{
"stop_id": "sakurajosui_up_s1",
"pin": 14
},
{
"stop_id": "sakurajosui_up_s2",
"pin": 15
},
{
"stop_id": "sakurajosui_down_s1",
"pin": 16
},
{
"stop_id": "sakurajosui_down_s2",
"pin": 17
}
],
"points": [
{
"point_id": "sakurajosui_down_p1",
"pin": 13
},
{
"point_id": "sakurajosui_up_p1",
"pin": 18
}
],
"detectors": [
{
"block_id": "shinjyuku_down_b1",
"target": "OPEN",
"pin": 12
},
{
"block_id": "sakurajosui_up_b1",
"target": "CLOSE",
"pin": 22
},
{
"block_id": "chofu_up_b1",
"target": "OPEN",
"pin": 23
},
{
"block_id": "chofu_down_b1",
"target": "CLOSE",
"pin": 25
}
],
"nfcs": [
{
"nfc_id": "sakurajosui_up_s1",
"pin": 4
},
{
"nfc_id": "sakurajosui_up_s2",
"pin": 5
},
{
"nfc_id": "sakurajosui_down_s1",
"pin": 32
},
{
"nfc_id": "sakurajosui_down_s2",
"pin": 33
}
]
}
45 changes: 45 additions & 0 deletions hardware/esp32-control/config/shinjyuku.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "shinjyuku",
"stops": [
{
"stop_id": "shinjyuku_down_s1",
"pin": 16
},
{
"stop_id": "shinjyuku_up_s1",
"pin": 17
}
],
"detectors": [
{
"block_id": "shinjyuku_down_b1",
"target": "CLOSE",
"pin": 12
},
{
"block_id": "shinjyuku_up_b1",
"target": "CLOSE",
"pin": 22
},
{
"block_id": "shinjyuku_up_b1",
"target": "OPEN",
"pin": 23
},
{
"block_id": "sakurajosui_up_b1",
"target": "OPEN",
"pin": 25
}
],
"nfcs": [
{
"nfc_id": "shinjyuku_down_s1",
"pin": 4
},
{
"nfc_id": "shinjyuku_up_s1",
"pin": 5
}
]
}
Loading

0 comments on commit c84c9c9

Please sign in to comment.