mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
Code style for comments
This commit is contained in:
parent
30ee664e4f
commit
34c7a1ea3b
1 changed files with 6 additions and 6 deletions
|
@ -90,11 +90,11 @@ std::string DS3232Alarm::to_string() const {
|
|||
char formatted_string[DS3232_ALARM_FORMAT_STRING_LENGTH];
|
||||
size_t len;
|
||||
switch (this->mode.raw) {
|
||||
//AlarmMode::EVERY_TIME
|
||||
// AlarmMode::EVERY_TIME
|
||||
case 15:
|
||||
case 31:
|
||||
return std::string(this->seconds_supported ? FORMAT_STRING_EVERY_TIME_S : FORMAT_STRING_EVERY_TIME_M);
|
||||
//AlarmMode::MATCH_SECONDS
|
||||
// AlarmMode::MATCH_SECONDS
|
||||
case 14:
|
||||
case 30:
|
||||
if (!this->seconds_supported)
|
||||
|
@ -106,7 +106,7 @@ std::string DS3232Alarm::to_string() const {
|
|||
return std::string(INVALID);
|
||||
}
|
||||
return std::string(formatted_string);
|
||||
//AlarmMode::MATCH_MINUTES_SECONDS
|
||||
// AlarmMode::MATCH_MINUTES_SECONDS
|
||||
case 12:
|
||||
case 28:
|
||||
len = snprintf(formatted_string, sizeof(formatted_string), FORMAT_STRING_EVERY_HOUR, this->minute, this->second);
|
||||
|
@ -115,7 +115,7 @@ std::string DS3232Alarm::to_string() const {
|
|||
return std::string(INVALID);
|
||||
}
|
||||
return std::string(formatted_string);
|
||||
//AlarmMode::MATCH_TIME
|
||||
// AlarmMode::MATCH_TIME
|
||||
case 8:
|
||||
case 24:
|
||||
len = snprintf(formatted_string, sizeof(formatted_string), FORMAT_STRING_EVERY_DAY, this->hour, this->minute,
|
||||
|
@ -125,7 +125,7 @@ std::string DS3232Alarm::to_string() const {
|
|||
return std::string(INVALID);
|
||||
}
|
||||
return std::string(formatted_string);
|
||||
//AlarmMode::MATCH_DAY_OF_WEEK_AND_TIME
|
||||
// AlarmMode::MATCH_DAY_OF_WEEK_AND_TIME
|
||||
case 16:
|
||||
len = snprintf(formatted_string, sizeof(formatted_string), FORMAT_STRING_EVERY_WEEK,
|
||||
DAYS_OF_WEEK[this->day_of_week], this->hour, this->minute, this->second);
|
||||
|
@ -134,7 +134,7 @@ std::string DS3232Alarm::to_string() const {
|
|||
return std::string(INVALID);
|
||||
}
|
||||
return std::string(formatted_string);
|
||||
//AlarmMode::MATCH_DATE_AND_TIME
|
||||
// AlarmMode::MATCH_DATE_AND_TIME
|
||||
case 0:
|
||||
len = snprintf(formatted_string, sizeof(formatted_string), FORMAT_STRING_EVERY_MONTH, this->day_of_month,
|
||||
ORDINAL_SUFFIX(this->day_of_month), this->hour, this->minute, this->second);
|
||||
|
|
Loading…
Reference in a new issue