UI: imaging volume bugfix

This commit is contained in:
Romain Bazile 2020-12-09 14:52:12 +01:00
parent b9c292f440
commit 62f7ffa029

View file

@ -4057,7 +4057,7 @@
"repeat": "", "repeat": "",
"crontab": "", "crontab": "",
"once": true, "once": true,
"onceDelay": 0.1, "onceDelay": "0.2",
"topic": "", "topic": "",
"payload": "100", "payload": "100",
"payloadType": "num", "payloadType": "num",
@ -4949,7 +4949,7 @@
"type": "function", "type": "function",
"z": "baa1e3d9.cb29d", "z": "baa1e3d9.cb29d",
"name": "imaged volume calc", "name": "imaged volume calc",
"func": "camera = global.get(\"acq_camera\");\ncell = global.get(\"acq_celltype\");\nnb_frame = global.get(\"nb_frame\");\n\nif (camera == \"HQ Camera\"){\n volume = nb_frame * (4.15*3.14*cell/1000) / 1000;\n}\nelse if (camera == \"Camera v2.1\"){\n volume = nb_frame * (2.31*1.74*cell/1000) / 1000;\n}\nelse{\n msg.payload = \"The camera is not known to this system\";\n return msg;\n}\n\nglobal.set(\"acq_imaged_volume\", volume.toFixed(4))\n\nmsg.payload = volume.toFixed(2) + \" mL\"\nreturn msg;", "func": "camera = global.get(\"acq_camera\");\ncell = global.get(\"acq_celltype\");\nnb_frame = global.get(\"nb_frame\");\nvar volume = 0\nif (camera == \"HQ Camera\"){\n volume = nb_frame * (4.15*3.14*cell/1000) / 1000;\n}\nelse if (camera == \"Camera v2.1\"){\n volume = nb_frame * (2.31*1.74*cell/1000) / 1000;\n}\nelse{\n msg.payload = \"The camera is not known to this system\";\n return msg;\n}\n\nglobal.set(\"acq_imaged_volume\", volume.toFixed(4))\n\nmsg.payload = volume.toFixed(2) + \" mL\"\nreturn msg;",
"outputs": 1, "outputs": 1,
"noerr": 0, "noerr": 0,
"initialize": "", "initialize": "",
@ -4973,7 +4973,7 @@
"height": 1, "height": 1,
"name": "Total pumped volume", "name": "Total pumped volume",
"label": "Total pumped volume", "label": "Total pumped volume",
"format": "{{msg.payload}}", "format": "{{msg.payload}} mL",
"layout": "col-center", "layout": "col-center",
"x": 1180, "x": 1180,
"y": 300, "y": 300,
@ -4984,7 +4984,7 @@
"type": "function", "type": "function",
"z": "baa1e3d9.cb29d", "z": "baa1e3d9.cb29d",
"name": "acq_volume calc", "name": "acq_volume calc",
"func": "var imaging_pump_volume = global.get(\"imaging_pump_volume\");\nvar nb_frame = global.get(\"nb_frame\");\n\nvar acq_volume = (Number(nb_frame)*Number(imaging_pump_volume)).toFixed(2)\nglobal.set(\"acq_volume\", acq_volume)\n\nmsg.payload = acq_volume + \" mL\"\nreturn msg;", "func": "var imaging_pump_volume = global.get(\"imaging_pump_volume\");\nvar nb_frame = global.get(\"nb_frame\");\nvar acq_volume = 0\n\nacq_volume = (Number(nb_frame)*Number(imaging_pump_volume)).toFixed(2)\nglobal.set(\"acq_volume\", acq_volume)\n\nmsg.payload = acq_volume\nreturn msg;",
"outputs": 1, "outputs": 1,
"noerr": 0, "noerr": 0,
"initialize": "", "initialize": "",
@ -5541,7 +5541,7 @@
"order": 3, "order": 3,
"width": 0, "width": 0,
"height": 0, "height": 0,
"passthru": false, "passthru": true,
"outs": "end", "outs": "end",
"topic": "imaging_pump_volume", "topic": "imaging_pump_volume",
"min": "0.001", "min": "0.001",