Merge branch 'main' of https://git.nehemis.fr/aniketSaha/NorthStar-HMI
This commit is contained in:
commit
5b11f8006c
|
|
@ -210,11 +210,11 @@ class CANBackend:
|
|||
"Conductivity_Product" : int.from_bytes(data[5:7], 'little') / 100.0,
|
||||
})
|
||||
|
||||
print("Conductivity_Product",int.from_bytes(data[5:7], 'little') / 100.0)
|
||||
|
||||
# ========== Docking Parameters ==========
|
||||
elif cob_id == 0x2AC and len(data) >= 8:
|
||||
elif cob_id == 0x2AC and len(data) >= 2:
|
||||
self.latest_data[0].update({
|
||||
"Ploop_sp": int.from_bytes(data[0:2], 'little'),
|
||||
"Pdilute_sp": int.from_bytes(data[2:4], 'little'),
|
||||
"Qdrain_sp": int.from_bytes(data[4:6], 'little'),
|
||||
"TankLevel": int.from_bytes(data[6:8], 'little'),
|
||||
})
|
||||
|
|
|
|||
8
main.py
8
main.py
|
|
@ -262,13 +262,15 @@ def get_pu_status():
|
|||
async def update_latest_data():
|
||||
global active_PUs
|
||||
while True:
|
||||
#DS
|
||||
data = can_backend.get_latest_data(pu_number=0)
|
||||
latest_data[f"DS"] = format_DS_data(data)
|
||||
|
||||
# PUs
|
||||
for pu in active_PUs:
|
||||
data = can_backend.get_latest_data(pu_number=pu)
|
||||
latest_data[f"PU_{pu}"] = format_PU_data(data)
|
||||
#DS
|
||||
data = can_backend.get_latest_data(pu_number=0)
|
||||
latest_data[f"DS"] = format_DS_data(data)
|
||||
|
||||
|
||||
logging.debug(f"[MONITOR DS BUFFER] latest_data: {latest_data}")
|
||||
await asyncio.sleep(0.05)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user