This commit is contained in:
Andrei 2021-10-06 11:38:48 +03:00
parent 72c47e493c
commit 31349141fa
4 changed files with 58 additions and 15 deletions

View File

@ -2,7 +2,9 @@
All notable changes will be documented in this file.
## added initial support for bottom-placed modules (alpha-version)
## added support for custom board prefixes
## added support for bottom-placed modules (beta-version)
## wbo-0.3
- Added Q601 in TO-220 (TH package) in case if Q600 is not in stock

View File

@ -1,7 +1,7 @@
#!/bin/bash
############################################################################################
# Hellen-One: A board creation script.
# Hellen-One: A Hellen board creation script.
# (c) andreika <prometheus.pcb@gmail.com>
############################################################################################
@ -30,8 +30,8 @@ if ! ./bin/check_all.sh; then
exit 2
fi
echo "Processing board..."
if ! $python_bin bin/process_board.py ${project_base} ${frame_name} ${frame_rev} ${bom_replace} ${comp_img_offset}; then
echo "Processing Hellen board..."
if ! $python_bin bin/process_board.py "hellen" ${project_base} ${frame_name} ${frame_rev} ${bom_replace} ${comp_img_offset}; then
echo "ABORTING!"
exit 3
else

View File

@ -0,0 +1,42 @@
#!/bin/bash
############################################################################################
# Hellen-One: A board creation script with custom (non-hellen) board prefix.
# (c) andreika <prometheus.pcb@gmail.com>
############################################################################################
board_prefix="$1"
project_base="$2"
frame_name="$3"
frame_rev="$4"
bom_replace="$5"
comp_img_offset="$6"
python_bin="python2.7"
############################################################################################
echo "Hellen-One: Starting a board creation..."
echo "Checking dependencies..."
# check args
if [ -z "$1" ]; then
echo "This script cannot be executed directly! Please run user scripts from the base directory!"
exit 1
fi
# check python version (should be 2.x ONLY), etc...
if ! ./bin/check_all.sh; then
exit 2
fi
echo "Processing ${board_prefix} board..."
if ! $python_bin bin/process_board.py ${board_prefix} ${project_base} ${frame_name} ${frame_rev} ${bom_replace} ${comp_img_offset}; then
echo "ABORTING!"
exit 3
else
echo "All done!"
exit 0
fi

View File

@ -10,26 +10,25 @@ import os, sys, shutil, errno
import csv, re
import subprocess
if len(sys.argv) < 4:
print ("Error! Please specify the project base name, frame name, revision and optional BOM replacement file.")
if len(sys.argv) < 5:
print ("Error! Please specify the board prefix, project base name, frame name, revision and optional BOM replacement file.")
sys.exit(1)
project_base_path = sys.argv[1]
frame_name = sys.argv[2]
frame_rev = sys.argv[3]
board_prefix = sys.argv[1]
project_base_path = sys.argv[2]
frame_name = sys.argv[3]
frame_rev = sys.argv[4]
if len(sys.argv) > 4:
bom_replace_csv = sys.argv[4]
if len(sys.argv) > 5:
bom_replace_csv = sys.argv[5]
else:
bom_replace_csv = ""
if len(sys.argv) > 5:
comp_img_offset = sys.argv[5]
if len(sys.argv) > 6:
comp_img_offset = sys.argv[6]
else:
comp_img_offset = "0,0"
board_prefix = "hellen"
imageDpi = "600"
# these should match the definitions in the parent shell script (create_board.sh)!