main.json: add git branch selection

This commit is contained in:
Romain Bazile 2021-05-06 03:11:45 +02:00
parent c6ed5bcf6e
commit 67b7e8e3ee

View file

@ -6136,7 +6136,7 @@
"z": "9daf9e2b.019fc", "z": "9daf9e2b.019fc",
"name": "", "name": "",
"group": "1be83144.4fe4bf", "group": "1be83144.4fe4bf",
"order": 10, "order": 15,
"width": 2, "width": 2,
"height": 1, "height": 1,
"passthru": false, "passthru": false,
@ -6148,8 +6148,8 @@
"payload": "reboot", "payload": "reboot",
"payloadType": "str", "payloadType": "str",
"topic": "reboot", "topic": "reboot",
"x": 400, "x": 420,
"y": 420, "y": 680,
"wires": [ "wires": [
[ [
"4af9112d.87767" "4af9112d.87767"
@ -6167,8 +6167,8 @@
"timer": "2", "timer": "2",
"oldrc": false, "oldrc": false,
"name": "cmd", "name": "cmd",
"x": 870, "x": 710,
"y": 460, "y": 720,
"wires": [ "wires": [
[], [],
[], [],
@ -6181,7 +6181,7 @@
"z": "9daf9e2b.019fc", "z": "9daf9e2b.019fc",
"name": "", "name": "",
"group": "1be83144.4fe4bf", "group": "1be83144.4fe4bf",
"order": 8, "order": 17,
"width": 2, "width": 2,
"height": 1, "height": 1,
"passthru": false, "passthru": false,
@ -6193,8 +6193,8 @@
"payload": "shutdown", "payload": "shutdown",
"payloadType": "str", "payloadType": "str",
"topic": "shutdown", "topic": "shutdown",
"x": 390, "x": 410,
"y": 500, "y": 760,
"wires": [ "wires": [
[ [
"4af9112d.87767" "4af9112d.87767"
@ -6227,8 +6227,8 @@
"timer": "", "timer": "",
"oldrc": false, "oldrc": false,
"name": "", "name": "",
"x": 1100, "x": 1120,
"y": 340, "y": 600,
"wires": [ "wires": [
[], [],
[ [
@ -6252,8 +6252,8 @@
"randomLast": "5", "randomLast": "5",
"randomUnits": "seconds", "randomUnits": "seconds",
"drop": false, "drop": false,
"x": 700, "x": 720,
"y": 340, "y": 600,
"wires": [ "wires": [
[ [
"fa914867.0a0658" "fa914867.0a0658"
@ -6266,7 +6266,7 @@
"z": "9daf9e2b.019fc", "z": "9daf9e2b.019fc",
"name": "Restart Python", "name": "Restart Python",
"group": "1be83144.4fe4bf", "group": "1be83144.4fe4bf",
"order": 6, "order": 12,
"width": 4, "width": 4,
"height": 1, "height": 1,
"passthru": true, "passthru": true,
@ -6278,8 +6278,9 @@
"payload": "", "payload": "",
"payloadType": "str", "payloadType": "str",
"topic": "", "topic": "",
"x": 380, "topicType": "str",
"y": 340, "x": 400,
"y": 600,
"wires": [ "wires": [
[ [
"1575db82.742854", "1575db82.742854",
@ -6299,8 +6300,8 @@
"timer": "", "timer": "",
"oldrc": false, "oldrc": false,
"name": "Python soft kill", "name": "Python soft kill",
"x": 720, "x": 740,
"y": 400, "y": 660,
"wires": [ "wires": [
[], [],
[], [],
@ -6318,8 +6319,8 @@
"timer": "", "timer": "",
"oldrc": false, "oldrc": false,
"name": "Raspimjpeg soft kill", "name": "Raspimjpeg soft kill",
"x": 730, "x": 750,
"y": 280, "y": 540,
"wires": [ "wires": [
[], [],
[], [],
@ -6340,8 +6341,8 @@
"fwdInMessages": false, "fwdInMessages": false,
"resendOnRefresh": false, "resendOnRefresh": false,
"templateScope": "local", "templateScope": "local",
"x": 1660, "x": 1700,
"y": 380, "y": 640,
"wires": [ "wires": [
[] []
] ]
@ -6356,8 +6357,8 @@
"noerr": 0, "noerr": 0,
"initialize": "", "initialize": "",
"finalize": "", "finalize": "",
"x": 1480, "x": 1500,
"y": 300, "y": 560,
"wires": [ "wires": [
[ [
"d12008a0.47be4" "d12008a0.47be4"
@ -6382,8 +6383,8 @@
"payload": "", "payload": "",
"payloadType": "str", "payloadType": "str",
"topic": "", "topic": "",
"x": 1320, "x": 1340,
"y": 460, "y": 720,
"wires": [ "wires": [
[ [
"73500be7.9ab7c4" "73500be7.9ab7c4"
@ -6397,8 +6398,8 @@
"name": "Catch Errors", "name": "Catch Errors",
"scope": null, "scope": null,
"uncaught": false, "uncaught": false,
"x": 1070, "x": 1090,
"y": 400, "y": 660,
"wires": [ "wires": [
[ [
"f9a871d5.a73828" "f9a871d5.a73828"
@ -6415,8 +6416,8 @@
"noerr": 0, "noerr": 0,
"initialize": "", "initialize": "",
"finalize": "", "finalize": "",
"x": 1240, "x": 1260,
"y": 400, "y": 660,
"wires": [ "wires": [
[ [
"8b511c2b.9c24c8" "8b511c2b.9c24c8"
@ -6433,8 +6434,8 @@
"noerr": 0, "noerr": 0,
"initialize": "", "initialize": "",
"finalize": "", "finalize": "",
"x": 1480, "x": 1500,
"y": 460, "y": 720,
"wires": [ "wires": [
[ [
"d12008a0.47be4" "d12008a0.47be4"
@ -6458,8 +6459,8 @@
"topic": "", "topic": "",
"payload": "start", "payload": "start",
"payloadType": "str", "payloadType": "str",
"x": 130, "x": 150,
"y": 340, "y": 600,
"wires": [ "wires": [
[ [
"466eb611.4da048" "466eb611.4da048"
@ -6658,11 +6659,11 @@
"z": "9daf9e2b.019fc", "z": "9daf9e2b.019fc",
"name": "Update", "name": "Update",
"group": "1be83144.4fe4bf", "group": "1be83144.4fe4bf",
"order": 3, "order": 9,
"width": 6, "width": 6,
"height": 1, "height": 1,
"passthru": false, "passthru": false,
"label": "Update", "label": "System Update",
"tooltip": "", "tooltip": "",
"color": "", "color": "",
"bgcolor": "", "bgcolor": "",
@ -6670,8 +6671,9 @@
"payload": "", "payload": "",
"payloadType": "str", "payloadType": "str",
"topic": "update", "topic": "update",
"x": 400, "topicType": "str",
"y": 220, "x": 440,
"y": 460,
"wires": [ "wires": [
[ [
"2d2ef1fd.40e6e6" "2d2ef1fd.40e6e6"
@ -6689,8 +6691,8 @@
"timer": "", "timer": "",
"oldrc": false, "oldrc": false,
"name": "Update", "name": "Update",
"x": 700, "x": 720,
"y": 220, "y": 460,
"wires": [ "wires": [
[ [
"64f61762.68c788", "64f61762.68c788",
@ -6717,7 +6719,7 @@
"fwdInMessages": true, "fwdInMessages": true,
"resendOnRefresh": true, "resendOnRefresh": true,
"templateScope": "local", "templateScope": "local",
"x": 390, "x": 410,
"y": 180, "y": 180,
"wires": [ "wires": [
[] []
@ -6737,8 +6739,8 @@
"raw": false, "raw": false,
"topic": "", "topic": "",
"name": "Update notif", "name": "Update notif",
"x": 970, "x": 1030,
"y": 200, "y": 440,
"wires": [ "wires": [
[] []
] ]
@ -8872,5 +8874,387 @@
"ce7087fc.dcc9e8" "ce7087fc.dcc9e8"
] ]
] ]
},
{
"id": "b3448fbb.351d28",
"type": "rpi-gpio out",
"z": "1371dec5.76e671",
"name": "Fan",
"pin": "33",
"set": false,
"level": "0",
"freq": "25000",
"out": "pwm",
"x": 1110,
"y": 40,
"wires": []
},
{
"id": "f6ff420b.0af648",
"type": "ui_slider",
"z": "bccd1f23.87219",
"name": "focus_speed",
"label": "Focus Speed",
"tooltip": "in µm/sec",
"group": "fbd92986.1028c8",
"order": 5,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "focus_speed",
"topicType": "str",
"min": "250",
"max": "2500",
"step": "250",
"x": 550,
"y": 460,
"wires": [
[
"dc48dc42.98d18"
]
]
},
{
"id": "2d371e59.b0e50a",
"type": "inject",
"z": "bccd1f23.87219",
"name": "Default: 1000µm/s",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "0.5",
"topic": "",
"payload": "1000",
"payloadType": "num",
"x": 130,
"y": 460,
"wires": [
[
"f6ff420b.0af648"
]
]
},
{
"id": "167cda35.c9b6ae",
"type": "ui_button",
"z": "bccd1f23.87219",
"name": "",
"group": "fbd92986.1028c8",
"order": 1,
"width": 3,
"height": 1,
"passthru": false,
"label": "UP 100um",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-angle-up fa-3x",
"payload": "{\"action\":\"move\",\"direction\":\"UP\",\"distance\":0.1}",
"payloadType": "json",
"topic": "actuator/focus",
"topicType": "str",
"x": 350,
"y": 520,
"wires": [
[
"62030521.88317c"
]
]
},
{
"id": "72a7c597.9374fc",
"type": "ui_button",
"z": "bccd1f23.87219",
"name": "",
"group": "fbd92986.1028c8",
"order": 6,
"width": 3,
"height": 1,
"passthru": false,
"label": "DOWN 100um",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-angle-down fa-3x",
"payload": "{\"action\":\"move\",\"direction\":\"DOWN\",\"distance\":0.1}",
"payloadType": "json",
"topic": "actuator/focus",
"topicType": "str",
"x": 340,
"y": 600,
"wires": [
[
"62030521.88317c"
]
]
},
{
"id": "e73fd87d.d24e4",
"type": "function",
"z": "b771c342.49603",
"name": "get acq_minimum_mesh",
"func": "msg.payload = msg.payload.acq_minimum_mesh;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 330,
"y": 360,
"wires": [
[
"5517c129.1617e"
]
]
},
{
"id": "489c8e06.cc7d6",
"type": "function",
"z": "b771c342.49603",
"name": "get acq_maximum_mesh",
"func": "msg.payload = msg.payload.acq_maximum_mesh;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 330,
"y": 400,
"wires": [
[
"9f3edbe2.43c728"
]
]
},
{
"id": "9f3edbe2.43c728",
"type": "ui_numeric",
"z": "b771c342.49603",
"name": "acq_maximum_mesh",
"label": "Max fraction size (μm)",
"tooltip": "",
"group": "3e1ba03d.f01d8",
"order": 8,
"width": 5,
"height": 1,
"wrap": false,
"passthru": true,
"topic": "acq_maximum_mesh",
"topicType": "str",
"format": "{{value}}",
"min": "200",
"max": "2000",
"step": "100",
"x": 640,
"y": 400,
"wires": [
[
"9f501f49.45645"
]
]
},
{
"id": "5517c129.1617e",
"type": "ui_numeric",
"z": "b771c342.49603",
"name": "acq_minimum_mesh",
"label": "Min fraction size (μm)",
"tooltip": "",
"group": "3e1ba03d.f01d8",
"order": 7,
"width": 5,
"height": 1,
"wrap": false,
"passthru": true,
"topic": "acq_minimum_mesh",
"topicType": "str",
"format": "{{value}}",
"min": 0,
"max": "300",
"step": "10",
"x": 640,
"y": 360,
"wires": [
[
"9f501f49.45645"
]
]
},
{
"id": "83c5a708.a5715",
"type": "exec",
"z": "9daf9e2b.019fc",
"command": "git --git-dir=/home/pi/PlanktonScope/.git describe --long --tags",
"addpay": false,
"append": "",
"useSpawn": "true",
"timer": "",
"oldrc": false,
"name": "Get git revision",
"x": 640,
"y": 340,
"wires": [
[
"af2b8d95.195bb8"
],
[],
[]
]
},
{
"id": "d334d264.8a7728",
"type": "exec",
"z": "9daf9e2b.019fc",
"command": "git --git-dir=/home/pi/PlanktonScope/.git branch --list",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "Get git branch",
"x": 640,
"y": 260,
"wires": [
[
"e5e8e66c.899588"
],
[],
[]
]
},
{
"id": "e4342b66.72972",
"type": "ui_button",
"z": "9daf9e2b.019fc",
"name": "get git branch",
"group": "1be83144.4fe4bf",
"order": 4,
"width": 4,
"height": 1,
"passthru": false,
"label": "Update branch list",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "mi-compare_arrows",
"payload": "",
"payloadType": "str",
"topic": "",
"topicType": "str",
"x": 410,
"y": 260,
"wires": [
[
"d334d264.8a7728"
]
]
},
{
"id": "3f13b9f8.bac94e",
"type": "ui_dropdown",
"z": "9daf9e2b.019fc",
"name": "Git branch list",
"label": "Switch branch to",
"tooltip": "",
"place": "branch",
"group": "1be83144.4fe4bf",
"order": 5,
"width": 6,
"height": 1,
"passthru": false,
"multiple": false,
"options": [],
"payload": "",
"topic": "topic",
"topicType": "msg",
"x": 1020,
"y": 260,
"wires": [
[
"d037a624.60bea8"
]
]
},
{
"id": "e5e8e66c.899588",
"type": "function",
"z": "9daf9e2b.019fc",
"name": "filter branch",
"func": "msg.options = msg.payload.trimEnd().split('\\n')\nmsg.payload = msg.options.find((str) => str.startsWith('*'));\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 830,
"y": 260,
"wires": [
[
"3f13b9f8.bac94e"
]
]
},
{
"id": "c1fb03f7.e675f8",
"type": "inject",
"z": "9daf9e2b.019fc",
"name": "once",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "",
"topic": "",
"payload": "start",
"payloadType": "str",
"x": 430,
"y": 300,
"wires": [
[
"d334d264.8a7728",
"83c5a708.a5715"
]
]
},
{
"id": "d037a624.60bea8",
"type": "exec",
"z": "9daf9e2b.019fc",
"command": "git --git-dir=/home/pi/PlanktonScope/.git checkout",
"addpay": true,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "git checkout branch",
"x": 1270,
"y": 260,
"wires": [
[],
[
"d334d264.8a7728",
"83c5a708.a5715"
],
[]
]
},
{
"id": "af2b8d95.195bb8",
"type": "ui_text",
"z": "9daf9e2b.019fc",
"group": "1be83144.4fe4bf",
"order": 2,
"width": 12,
"height": 1,
"name": "",
"label": "Current code version",
"format": "{{msg.payload}}",
"layout": "row-center",
"x": 1040,
"y": 340,
"wires": []
} }
] ]