功率调节限制

master
tq 6 months ago
parent e74254ee37
commit b23e9ce7d4

@ -68,8 +68,13 @@ public class ChargeController : ControllerBase
/// <returns>发送结果</returns>
[HttpGet]
[Route("SendPowerRegulation/{code}/{power}")]
public Result<bool> SendPowerRegulation(string code,float power)
public Result<bool> SendPowerRegulation(string code, float power)
{
if (power < 1 || power > 360)
{
return Result<bool>.Fail("功率值范围1到360");
}
ChargerClient? chargerClient = ClientMgr.GetBySn(code);
if (chargerClient != null)
@ -79,7 +84,6 @@ public class ChargeController : ControllerBase
}
return Result<bool>.Fail("充电机未连接");
}
/// <summary>

Loading…
Cancel
Save