Code style for comments

This commit is contained in:
Vladimir Kozhevnikov 2024-02-06 02:07:07 +03:00
parent 30ee664e4f
commit 34c7a1ea3b

View file

@ -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);