From 69ce211cda552721fa3e4ab520809713f977fc2f Mon Sep 17 00:00:00 2001 From: Roni Kreinin Date: Wed, 11 Dec 2024 10:02:05 -0500 Subject: [PATCH] A300 vcan1 --- .../clearpath_generator_common/vcan/generator.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/clearpath_generator_common/clearpath_generator_common/vcan/generator.py b/clearpath_generator_common/clearpath_generator_common/vcan/generator.py index 963b75c..a4c09ae 100644 --- a/clearpath_generator_common/clearpath_generator_common/vcan/generator.py +++ b/clearpath_generator_common/clearpath_generator_common/vcan/generator.py @@ -36,6 +36,7 @@ from clearpath_generator_common.common import BaseGenerator, BashFile PLATFORMS = [ + Platform.A300, Platform.DD100, Platform.DD150, Platform.DO100, @@ -70,6 +71,19 @@ def generate_vcan_start(self) -> None: f'-v {can} ' f'-b {baud}' ) + # Add second vcan for A300 + if self.clearpath_config.get_platform_model() == Platform.A300: + port = 11413 + serial = '/dev/ttycan1' + can = 'vcan1' + baud = 's5' + bash_writer.write( + f'/bin/sh -e /usr/sbin/clearpath-vcan-bridge ' + f'-p {port} ' + f'-d {serial} ' + f'-v {can} ' + f'-b {baud}' + ) else: bash_writer.add_echo( 'No vcan bridge required.' +