/**
* Gets the connector cloned charging profiles applying a power limitation
- * and sorted by connector id ascending then stack level descending
+ * and sorted by connector id descending then stack level descending
*
* @param chargingStation -
* @param connectorId -
connectorId: number,
) => {
return cloneObject<ChargingProfile[]>(
- (chargingStation.getConnectorStatus(0)?.chargingProfiles ?? [])
+ (chargingStation.getConnectorStatus(connectorId)?.chargingProfiles ?? [])
.sort((a, b) => b.stackLevel - a.stackLevel)
.concat(
- (chargingStation.getConnectorStatus(connectorId)?.chargingProfiles ?? []).sort(
+ (chargingStation.getConnectorStatus(0)?.chargingProfiles ?? []).sort(
(a, b) => b.stackLevel - a.stackLevel,
),
),
}
/**
- * Charging profiles shall already be sorted by connector id ascending then stack level descending
+ * Charging profiles shall already be sorted by connector id descending then stack level descending
*
* @param chargingStation -
* @param connectorId -