Mock can updat and multi conductivity reading
This commit is contained in:
parent
d53170fbb0
commit
d7e5d1e34e
|
|
@ -40,7 +40,9 @@ class CANBackend:
|
||||||
"PS2": 6.2,
|
"PS2": 6.2,
|
||||||
"PS3": 6.2,
|
"PS3": 6.2,
|
||||||
"PS4": 6.2,
|
"PS4": 6.2,
|
||||||
"Cond": 1* np.random.random(),
|
"Conductivity_Feed": 1* np.random.random(),
|
||||||
|
"Conductivity_Permeate": 1 * np.random.random(),
|
||||||
|
"Conductivity_Product": 1 * np.random.random(),
|
||||||
"MV02": round(100 * np.random.random(), 2),
|
"MV02": round(100 * np.random.random(), 2),
|
||||||
"MV02_sp": round(100 * np.random.random(), 2),
|
"MV02_sp": round(100 * np.random.random(), 2),
|
||||||
"MV03": round(100 * np.random.random(), 2),
|
"MV03": round(100 * np.random.random(), 2),
|
||||||
|
|
|
||||||
2
main.py
2
main.py
|
|
@ -420,7 +420,7 @@ if __name__ == "__main__":
|
||||||
uvicorn.run(
|
uvicorn.run(
|
||||||
"main:app",
|
"main:app",
|
||||||
host="127.0.0.1",
|
host="127.0.0.1",
|
||||||
port=8080,
|
port=8081,
|
||||||
reload=True,
|
reload=True,
|
||||||
reload_dirs=["."],
|
reload_dirs=["."],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
{ x: time0, y: [0], name: 'Pro', mode: 'lines' },
|
{ x: time0, y: [0], name: 'Pro', mode: 'lines' },
|
||||||
{ x: time0, y: [0], name: 'Pretentate', mode: 'lines' }
|
{ x: time0, y: [0], name: 'Pretentate', mode: 'lines' }
|
||||||
], {
|
], {
|
||||||
title: 'Pressures 1', xaxis: { type: 'date' }, yaxis: { title: 'Pressure (bar)' }
|
title: 'Pro and Pretentate ', xaxis: { type: 'date' }, yaxis: { title: 'Pressure (bar)' }
|
||||||
});
|
});
|
||||||
|
|
||||||
Plotly.newPlot('pressure-plot-2', [
|
Plotly.newPlot('pressure-plot-2', [
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
<div id="Pro-plot" class="plot"></div>
|
<div id="Pro-plot" class="plot"></div>
|
||||||
<div id="Qdilute-plot" class="plot"></div>
|
<div id="Qdilute-plot" class="plot"></div>
|
||||||
<div id="Qdrain-plot" class="plot"></div>
|
<div id="Qdrain-plot" class="plot"></div>
|
||||||
|
<div id="Cdilute-plot" class="plot"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
const time0 = [new Date()];
|
const time0 = [new Date()];
|
||||||
|
|
@ -47,6 +48,7 @@ const plots = [
|
||||||
{ id: 'Qdrain-plot', quantity: 'Qdrain', title: 'Qdrain per PU' },
|
{ id: 'Qdrain-plot', quantity: 'Qdrain', title: 'Qdrain per PU' },
|
||||||
{ id: 'Pro-plot', quantity: 'Pro', title: 'Pro per PU' },
|
{ id: 'Pro-plot', quantity: 'Pro', title: 'Pro per PU' },
|
||||||
{ id: 'Pdilute-plot', quantity: 'Pdilute', title: 'Pdilute per PU', ref: 2.5 },
|
{ id: 'Pdilute-plot', quantity: 'Pdilute', title: 'Pdilute per PU', ref: 2.5 },
|
||||||
|
{ id: 'Cdilute-plot', quantity: 'Cdilute', title: 'Cdilute per PU'},
|
||||||
];
|
];
|
||||||
|
|
||||||
function makeTraces(quantity) {
|
function makeTraces(quantity) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user