From 6da32cef5e463415fac0afa51a2cd160c40d13d4 Mon Sep 17 00:00:00 2001 From: sclaiborne Date: Mon, 27 Nov 2023 11:56:16 -0800 Subject: [PATCH 1/3] Add user and hmi file arg logging when in debug. This will help debug issues with these values. --- CmdLineARSim.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CmdLineARSim.py b/CmdLineARSim.py index 40148a6..8df016b 100644 --- a/CmdLineARSim.py +++ b/CmdLineARSim.py @@ -59,6 +59,8 @@ def main(): logging.debug('The configuration(s) to be built is: %s', args.configuration) logging.debug('Build mode: %s', args.buildMode) logging.debug('Start simulation when creation is complete: %s', args.startSim) + logging.debug('User files: %s', args.userFiles) + logging.debug('HMI files: %s', args.hmiFiles) project = ASTools.Project(args.project) From ff0972e942eb689f5c08c0183e5c279be6d4117a Mon Sep 17 00:00:00 2001 From: sclaiborne Date: Mon, 27 Nov 2023 11:57:49 -0800 Subject: [PATCH 2/3] Fix bug with hmi files These were not being used unless user files was specified --- CmdLineARSim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CmdLineARSim.py b/CmdLineARSim.py index 8df016b..538674e 100644 --- a/CmdLineARSim.py +++ b/CmdLineARSim.py @@ -97,7 +97,7 @@ def main(): shutil.copytree(args.userFiles, userPath) # Add custom directory with HMI data if configured. - if args.userFiles != '': + if args.hmiFiles != '': hmiPath = os.path.join(destination, 'HMI') shutil.copytree(args.hmiFiles, hmiPath, ignore=shutil.ignore_patterns('node_modules')) From ca226e2fa6d74da4bb550251a8639040e84d258b Mon Sep 17 00:00:00 2001 From: sclaiborne Date: Mon, 27 Nov 2023 11:58:28 -0800 Subject: [PATCH 3/3] Fix user and hmi files breaking if not specified This will default to None which is not an empty string which this code assumes --- CmdLineARSim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CmdLineARSim.py b/CmdLineARSim.py index 538674e..6451a34 100644 --- a/CmdLineARSim.py +++ b/CmdLineARSim.py @@ -40,8 +40,8 @@ def main(): parser.add_argument('-c','--configuration', nargs='+', type=str, help='AS configuration you want to build') parser.add_argument('-bm', '--buildMode', type=str, help='AS build mode you want executed', default='None', choices=['Rebuild', 'Build','BuildAndTransfer', 'BuildAndCreateCompactFlash', 'None']) parser.add_argument('-ss', '--startSim', action='store_true', help='Option to have ARSim start after ARSim creation') - parser.add_argument('-uf', '--userFiles', type=str, help='Path to the folder containing user files to get included with simulator') - parser.add_argument('-hf', '--hmiFiles', type=str, help='Path to the folder containing HMI files to get included with simulator') + parser.add_argument('-uf', '--userFiles', type=str, help='Path to the folder containing user files to get included with simulator', default='') + parser.add_argument('-hf', '--hmiFiles', type=str, help='Path to the folder containing HMI files to get included with simulator', default='') parser.add_argument('-l', '--logLevel', type=str.upper, help='Log level', choices=['DEBUG','INFO','WARNING', 'ERROR'], default='') parser.add_argument('-v','--version', action='version', version='%(prog)s {version}'.format(version=_version.__version__)) args = parser.parse_args()