Skip to content

Commit

Permalink
Merge pull request #8 from jwillmer/main
Browse files Browse the repository at this point in the history
Timeout for serial connection
  • Loading branch information
Privatecoder authored Jun 9, 2024
2 parents a18361a + 923270b commit cafb838
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fetch_bms_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,8 @@ def read_serial_data(self):
# connect serial interfaces
try:
if FETCH_MASTER is True:
SERIAL_MASTER_INSTANCE = serial.Serial(port=MASTER_SERIAL_INTERFACE, baudrate=9600)
SERIAL_SLAVES_INSTANCE = serial.Serial(port=SLAVES_SERIAL_INTERFACE, baudrate=19200)
SERIAL_MASTER_INSTANCE = serial.Serial(port=MASTER_SERIAL_INTERFACE, baudrate=9600, timeout=0.5)
SERIAL_SLAVES_INSTANCE = serial.Serial(port=SLAVES_SERIAL_INTERFACE, baudrate=19200, timeout=0.5)
except SerialException as e:
logger.error("SerialException occurred: %s", e)
sys.exit(1)
Expand Down

0 comments on commit cafb838

Please sign in to comment.