diff --git a/config/f15_config_f15/robotbrain.py b/config/f15_config_f15/robotbrain.py index 15e1d283..33b7e534 100644 --- a/config/f15_config_f15/robotbrain.py +++ b/config/f15_config_f15/robotbrain.py @@ -1,3 +1,4 @@ configuration = {'robot_brain': { - 'flash_params': ['orin', 'v05', 'nand'] + 'flash_params': ['orin', 'v05', 'nand'], + 'enable_esp_on_startup':False, }} \ No newline at end of file diff --git a/field_friend/hardware/field_friend_hardware.py b/field_friend/hardware/field_friend_hardware.py index b4fca00b..9849dde7 100644 --- a/field_friend/hardware/field_friend_hardware.py +++ b/field_friend/hardware/field_friend_hardware.py @@ -58,7 +58,10 @@ def __init__(self) -> None: raise NotImplementedError(f'Unknown FieldFriend implement: {implement}') communication = rosys.hardware.SerialCommunication() - robot_brain = rosys.hardware.RobotBrain(communication) + if 'enable_esp_on_startup' in config_robotbrain['robot_brain']: + robot_brain = rosys.hardware.RobotBrain(communication,enable_esp_on_startup=config_robotbrain['robot_brain']['enable_esp_on_startup']) + else: + robot_brain = rosys.hardware.RobotBrain(communication) robot_brain.lizard_firmware.flash_params += config_robotbrain['robot_brain']['flash_params'] bluetooth = rosys.hardware.BluetoothHardware(robot_brain, name=config_hardware['bluetooth']['name'],