Skip to content

Commit

Permalink
set min target power consumption to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
helgeerbe committed Feb 25, 2023
1 parent 3ed6131 commit 17dd9db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/WebApi_powerlimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "PowerLimiter.h"
#include "WebApi.h"
#include "helper.h"
#include "WebApi_errors.h"

void WebApiPowerLimiterClass::init(AsyncWebServer* server)
{
Expand Down Expand Up @@ -109,6 +110,7 @@ void WebApiPowerLimiterClass::onAdminPost(AsyncWebServerRequest* request)
&& root.containsKey("target_power_consumption_hysteresis")
)) {
retMsg[F("message")] = F("Values are missing!");
retMsg[F("code")] = WebApiError::GenericValueMissing;
response->setLength();
request->send(response);
return;
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/views/PowerLimiterAdminView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<div class="col-sm-10">
<div class="input-group">
<input type="number" class="form-control" id="targetPowerConsumption"
placeholder="70" min="10" v-model="powerLimiterConfigList.target_power_consumption"
placeholder="75" min="0" v-model="powerLimiterConfigList.target_power_consumption"
aria-describedby="targetPowerConsumptionDescription" required/>
<span class="input-group-text" id="targetPowerConsumptionDescription">W</span>
</div>
Expand All @@ -66,7 +66,7 @@
<div class="col-sm-10">
<div class="input-group">
<input type="number" class="form-control" id="targetPowerConsumptionHysteresis"
placeholder="25" min="10" v-model="powerLimiterConfigList.target_power_consumption_hysteresis"
placeholder="30" min="0" v-model="powerLimiterConfigList.target_power_consumption_hysteresis"
aria-describedby="targetPowerConsumptionHysteresisDescription" />
<span class="input-group-text" id="targetPowerConsumptionHysteresisDescription">W</span>
</div>
Expand Down

0 comments on commit 17dd9db

Please sign in to comment.