@@ -39,7 +39,7 @@ CHIP_ERROR GetEpochTS(uint32_t & chipEpoch);
39
39
*
40
40
* @param reference to hold the day of week as a bitmap
41
41
*
42
- * Sunday = 0x01 , Monday = 0x01 ... Saturday = 0x40 (1<<6)
42
+ * Sunday = 0x00 , Monday = 0x01 ... Saturday = 0x40 (1<<6)
43
43
*/
44
44
CHIP_ERROR GetDayOfWeekNow (uint8_t & dayOfWeekMap);
45
45
@@ -57,6 +57,12 @@ CHIP_ERROR GetDayOfWeekNow(uint8_t & dayOfWeekMap);
57
57
*/
58
58
uint8_t GetDayOfWeekUnixEpoch (time_t unixEpoch);
59
59
60
+ /* *
61
+ * @brief Helper function to get current timestamp and work out the current number of minutes
62
+ * past midnight based on localtime
63
+ *
64
+ * @param reference to hold the number of minutes past midnight
65
+ */
60
66
CHIP_ERROR GetMinutesPastMidnight (uint16_t & minutesPastMidnight);
61
67
62
68
namespace chip {
@@ -309,11 +315,11 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate
309
315
310
316
private:
311
317
/* Constants */
312
- static constexpr int kDefaultMinChargeCurrent = 6000 ; /* 6A */
313
- static constexpr int kDefaultUserMaximumChargeCurrent = 80000 ; /* 80A */
314
- static constexpr int kDefaultRandomizationDelayWindow = 600 ; /* 600s */
318
+ static constexpr int kDefaultMinChargeCurrent_mA = 6000 ; /* 6A */
319
+ static constexpr int kDefaultUserMaximumChargeCurrent_mA = 80000 ; /* 80A */
320
+ static constexpr int kDefaultRandomizationDelayWindow_sec = 600 ; /* 600s */
315
321
static constexpr int kMaxVehicleIDBufSize = 32 ;
316
- static constexpr int kPeriodicCheckIntervalRealTimeClockNotSynced = 30 ;
322
+ static constexpr int kPeriodicCheckIntervalRealTimeClockNotSynced_sec = 30 ;
317
323
318
324
/* private variables for controlling the hardware - these are not attributes */
319
325
int64_t mMaxHardwareCurrentLimit = 0 ; /* Hardware current limit in mA */
@@ -366,11 +372,11 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate
366
372
DataModel::Nullable<uint32_t > mChargingEnabledUntil ; // TODO Default to 0 to indicate disabled
367
373
DataModel::Nullable<uint32_t > mDischargingEnabledUntil ; // TODO Default to 0 to indicate disabled
368
374
int64_t mCircuitCapacity = 0 ;
369
- int64_t mMinimumChargeCurrent = kDefaultMinChargeCurrent ;
375
+ int64_t mMinimumChargeCurrent = kDefaultMinChargeCurrent_mA ;
370
376
int64_t mMaximumChargeCurrent = 0 ;
371
377
int64_t mMaximumDischargeCurrent = 0 ;
372
- int64_t mUserMaximumChargeCurrent = kDefaultUserMaximumChargeCurrent ; // TODO update spec
373
- uint32_t mRandomizationDelayWindow = kDefaultRandomizationDelayWindow ;
378
+ int64_t mUserMaximumChargeCurrent = kDefaultUserMaximumChargeCurrent_mA ; // TODO update spec
379
+ uint32_t mRandomizationDelayWindow = kDefaultRandomizationDelayWindow_sec ;
374
380
/* PREF attributes */
375
381
DataModel::Nullable<uint32_t > mNextChargeStartTime ;
376
382
DataModel::Nullable<uint32_t > mNextChargeTargetTime ;
0 commit comments