@@ -83,13 +83,13 @@ Status EnergyEvseDelegate::EnableCharging(const DataModel::Nullable<uint32_t> &
83
83
{
84
84
ChipLogProgress (AppServer, " EnergyEvseDelegate::EnableCharging()" );
85
85
86
- if (maximumChargeCurrent < kMinimumChargeCurrent || maximumChargeCurrent > kMaximumChargeCurrent )
86
+ if (maximumChargeCurrent < kMinimumChargeCurrent )
87
87
{
88
88
ChipLogError (AppServer, " Maximum Current outside limits" );
89
89
return Status::ConstraintError;
90
90
}
91
91
92
- if (minimumChargeCurrent < kMinimumChargeCurrent || minimumChargeCurrent > kMaximumChargeCurrent )
92
+ if (minimumChargeCurrent < kMinimumChargeCurrent )
93
93
{
94
94
ChipLogError (AppServer, " Maximum Current outside limits" );
95
95
return Status::ConstraintError;
@@ -344,7 +344,7 @@ Status EnergyEvseDelegate::HwRegisterEvseCallbackHandler(EVSECallbackFunc handle
344
344
*/
345
345
Status EnergyEvseDelegate::HwSetMaxHardwareCurrentLimit (int64_t currentmA)
346
346
{
347
- if (currentmA < kMinimumChargeCurrent || currentmA > kMaximumChargeCurrent )
347
+ if (currentmA < kMinimumChargeCurrent )
348
348
{
349
349
return Status::ConstraintError;
350
350
}
@@ -366,7 +366,7 @@ Status EnergyEvseDelegate::HwSetMaxHardwareCurrentLimit(int64_t currentmA)
366
366
*/
367
367
Status EnergyEvseDelegate::HwSetCircuitCapacity (int64_t currentmA)
368
368
{
369
- if (currentmA < kMinimumChargeCurrent || currentmA > kMaximumChargeCurrent )
369
+ if (currentmA < kMinimumChargeCurrent )
370
370
{
371
371
return Status::ConstraintError;
372
372
}
@@ -391,7 +391,7 @@ Status EnergyEvseDelegate::HwSetCircuitCapacity(int64_t currentmA)
391
391
*/
392
392
Status EnergyEvseDelegate::HwSetCableAssemblyLimit (int64_t currentmA)
393
393
{
394
- if (currentmA < kMinimumChargeCurrent || currentmA > kMaximumChargeCurrent )
394
+ if (currentmA < kMinimumChargeCurrent )
395
395
{
396
396
return Status::ConstraintError;
397
397
}
@@ -1316,7 +1316,7 @@ CHIP_ERROR EnergyEvseDelegate::SetCircuitCapacity(int64_t newValue)
1316
1316
{
1317
1317
int64_t oldValue = mCircuitCapacity ;
1318
1318
1319
- if (newValue >= kMaximumChargeCurrent )
1319
+ if (newValue < 0 )
1320
1320
{
1321
1321
return CHIP_IM_GLOBAL_STATUS (ConstraintError);
1322
1322
}
@@ -1340,7 +1340,7 @@ CHIP_ERROR EnergyEvseDelegate::SetMinimumChargeCurrent(int64_t newValue)
1340
1340
{
1341
1341
int64_t oldValue = mMinimumChargeCurrent ;
1342
1342
1343
- if (newValue >= kMaximumChargeCurrent )
1343
+ if (newValue < 0 )
1344
1344
{
1345
1345
return CHIP_IM_GLOBAL_STATUS (ConstraintError);
1346
1346
}
@@ -1388,7 +1388,7 @@ CHIP_ERROR EnergyEvseDelegate::SetMaximumDischargeCurrent(int64_t newValue)
1388
1388
{
1389
1389
int64_t oldValue = mMaximumDischargeCurrent ;
1390
1390
1391
- if (newValue >= kMaximumChargeCurrent )
1391
+ if (newValue < 0 )
1392
1392
{
1393
1393
return CHIP_IM_GLOBAL_STATUS (ConstraintError);
1394
1394
}
@@ -1410,7 +1410,7 @@ int64_t EnergyEvseDelegate::GetUserMaximumChargeCurrent()
1410
1410
1411
1411
CHIP_ERROR EnergyEvseDelegate::SetUserMaximumChargeCurrent (int64_t newValue)
1412
1412
{
1413
- if (( newValue < 0 ) || (newValue > kMaximumChargeCurrent ) )
1413
+ if (newValue < 0 )
1414
1414
{
1415
1415
return CHIP_IM_GLOBAL_STATUS (ConstraintError);
1416
1416
}
0 commit comments