增加Makefile
This commit is contained in:
parent
8ec26aa3a3
commit
27730075dc
|
|
@ -0,0 +1,6 @@
|
||||||
|
target: dist
|
||||||
|
create-version-file metadata.yml --outfile dist/file_version_info.txt
|
||||||
|
pyinstaller -F main.py --version-file dist/file_version_info.txt -n Lightening
|
||||||
|
|
||||||
|
dist:
|
||||||
|
mkdir dist
|
||||||
12
main.py
12
main.py
|
|
@ -24,7 +24,7 @@ def parameter_display(para: Parameter):
|
||||||
|
|
||||||
def egm():
|
def egm():
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
toml_file_path = "article.toml"
|
toml_file_path = r"article.toml"
|
||||||
else:
|
else:
|
||||||
toml_file_path = sys.argv[1]
|
toml_file_path = sys.argv[1]
|
||||||
logger.info(f"读取文件{toml_file_path}")
|
logger.info(f"读取文件{toml_file_path}")
|
||||||
|
|
@ -44,10 +44,10 @@ def egm():
|
||||||
] # 地面倾角,向下为正
|
] # 地面倾角,向下为正
|
||||||
para.h_arm = toml_parameter["h_arm"]
|
para.h_arm = toml_parameter["h_arm"]
|
||||||
para.altitude = toml_parameter["altitude"]
|
para.altitude = toml_parameter["altitude"]
|
||||||
para.max_i = toml_parameter["max_i"]
|
|
||||||
para.rated_voltage = toml_parameter["rated_voltage"]
|
para.rated_voltage = toml_parameter["rated_voltage"]
|
||||||
toml_optional = toml_dict["optional"]
|
toml_optional = toml_dict["optional"]
|
||||||
para.voltage_n = toml_optional["voltage_n"] # 工作电压分成多少份来计算
|
para.voltage_n = toml_optional["voltage_n"] # 工作电压分成多少份来计算
|
||||||
|
para.max_i = toml_optional["max_i"]
|
||||||
#########################################################
|
#########################################################
|
||||||
# 以上是需要设置的参数
|
# 以上是需要设置的参数
|
||||||
parameter_display(para)
|
parameter_display(para)
|
||||||
|
|
@ -101,7 +101,13 @@ def egm():
|
||||||
rg_type = "g"
|
rg_type = "g"
|
||||||
# TODO 保护角公式可能有问题,后面改
|
# TODO 保护角公式可能有问题,后面改
|
||||||
shield_angle = (
|
shield_angle = (
|
||||||
math.atan((rc_x - rs_x) / ((rs_y - rc_y) + string_c_len))
|
math.atan(
|
||||||
|
(rc_x - rs_x)
|
||||||
|
/ (
|
||||||
|
(h_arm[0] - string_g_len - h_arm[phase_conductor_foo + 1])
|
||||||
|
+ string_c_len
|
||||||
|
)
|
||||||
|
)
|
||||||
* 180
|
* 180
|
||||||
/ math.pi
|
/ math.pi
|
||||||
) # 保护角
|
) # 保护角
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
Version: 1.1.0
|
||||||
|
#CompanyName: My Imaginary Company
|
||||||
|
#FileDescription: Simple App
|
||||||
|
#InternalName: Simple App
|
||||||
|
#LegalCopyright: © My Imaginary Company. All rights reserved.
|
||||||
|
#OriginalFilename: SimpleApp.exe
|
||||||
|
ProductName: Lightening
|
||||||
Loading…
Reference in New Issue