@@ -272,18 +272,47 @@ async def _get_hashboards(self) -> List[HashBoard]:
272272 rate = board ["rate_real" ], unit = self .algo .unit .GH
273273 ).into (self .algo .unit .default )
274274 hashboards [board ["index" ]].chips = board ["asic_num" ]
275- board_temp_data = list (
276- filter (lambda x : not x == 0 , board ["temp_pcb" ])
277- )
278- hashboards [board ["index" ]].temp = sum (board_temp_data ) / len (
279- board_temp_data
280- )
281- chip_temp_data = list (
282- filter (lambda x : not x == 0 , board ["temp_chip" ])
283- )
284- hashboards [board ["index" ]].chip_temp = sum (chip_temp_data ) / len (
285- chip_temp_data
286- )
275+
276+ if "S21+ Hyd" in self .model :
277+ hashboards [board ["index" ]].inlet_temp = board ["temp_pcb" ][0 ]
278+ hashboards [board ["index" ]].outlet_temp = board ["temp_pcb" ][2 ]
279+ hashboards [board ["index" ]].chip_temp = board ["temp_pic" ][0 ]
280+ board_temp_data = list (
281+ filter (
282+ lambda x : not x == 0 ,
283+ [
284+ board ["temp_pic" ][1 ],
285+ board ["temp_pic" ][2 ],
286+ board ["temp_pic" ][3 ],
287+ board ["temp_pcb" ][1 ],
288+ board ["temp_pcb" ][3 ],
289+ ],
290+ )
291+ )
292+ hashboards [board ["index" ]].temp = (
293+ sum (board_temp_data ) / len (board_temp_data )
294+ if len (board_temp_data ) > 0
295+ else 0
296+ )
297+
298+ else :
299+ board_temp_data = list (
300+ filter (lambda x : not x == 0 , board ["temp_pcb" ])
301+ )
302+ hashboards [board ["index" ]].temp = (
303+ sum (board_temp_data ) / len (board_temp_data )
304+ if len (board_temp_data ) > 0
305+ else 0
306+ )
307+ chip_temp_data = list (
308+ filter (lambda x : not x == 0 , board ["temp_chip" ])
309+ )
310+ hashboards [board ["index" ]].chip_temp = (
311+ sum (chip_temp_data ) / len (chip_temp_data )
312+ if len (chip_temp_data ) > 0
313+ else 0
314+ )
315+
287316 hashboards [board ["index" ]].serial_number = board ["sn" ]
288317 hashboards [board ["index" ]].missing = False
289318 except LookupError :
0 commit comments