File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/reachy_mini/daemon/backend/robot Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -514,16 +514,16 @@ def decode_hardware_error_byte(err_byte: int) -> list[str]:
514514 return [bits_to_error [b ] for b in err_bits if b in bits_to_error ]
515515
516516 def check_voltage (
517- id ,
517+ id : int ,
518518 allowed_max_voltage : float = 7.3 ,
519519 ) -> bool :
520520 assert self .c is not None , (
521521 "Motor controller not initialized or already closed."
522522 )
523523 # https://emanual.robotis.com/docs/en/dxl/x/xl330-m288/#present-input-voltage
524524 resp_bytes = self .c .async_read_raw_bytes (id , 144 , 2 )
525- voltage = struct .unpack ("h" , bytes (resp_bytes ))
526- voltage = voltage [ 0 ] / 10.0 # in Volts
525+ resp = struct .unpack ("h" , bytes (resp_bytes ))[ 0 ]
526+ voltage : float = resp / 10.0 # in Volts
527527
528528 return voltage > allowed_max_voltage
529529
You can’t perform that action at this time.
0 commit comments