实现方法介绍,参数修改方法以及测试方法

This commit is contained in:
cdeyw
2025-09-30 16:08:55 +08:00
parent cf67e55d2c
commit 40a26112d7
5 changed files with 159 additions and 24 deletions

View File

@ -80,7 +80,7 @@ def test_inverter_controls(inverter):
time.sleep(2)
# 测试设置不同频率
frequencies = [100.0, 200.0, 300.0, 400.0]
frequencies = [220.0, 230.0, 240.0, 400.0]
for freq in frequencies:
print(f"测试设置频率 {freq}Hz...")
result = inverter.set_frequency(freq)

View File

@ -40,8 +40,7 @@ class TestFeedingProcess(unittest.TestCase):
patch('feeding.process.InverterController'), \
patch('feeding.process.TransmitterController'):
system = FeedingProcess()
# 通过settings修改参数
system.settings.single_batch_weight = 1500
# 通过settings修改参数 system.settings.single_batch_weight = 1500
system.settings.min_required_weight = 300
system.settings.target_vehicle_weight = 3000