Trunk fmt

This commit is contained in:
Ben Meadors 2024-11-25 06:57:52 -06:00
parent 40d82faace
commit 9ab22c04cd
2 changed files with 14 additions and 14 deletions

View File

@ -73,14 +73,13 @@ bool ascending = true;
#define ASCII_BELL 0x07
struct ExternalNotificationModule::RGB {
constexpr RGB(uint8_t red, uint8_t green,uint8_t blue)
: red{red}, green{green}, blue{blue}
{}
constexpr RGB(uint8_t red, uint8_t green, uint8_t blue) : red{red}, green{green}, blue{blue} {}
#define SCALE_ALPHA(COLOR, ALPHA) (uint8_t)((((uint16_t)COLOR) * ALPHA) / (uint16_t)255)
constexpr RGB(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
: red{SCALE_ALPHA(red, alpha)}, green{SCALE_ALPHA(green, alpha)}, blue{SCALE_ALPHA(blue, alpha)}
{}
{
}
#undef SCALE_ALPHA
uint8_t red = 0;
@ -144,7 +143,8 @@ int32_t ExternalNotificationModule::runOnce()
if (externalTurnedOn[2] + (moduleConfig.external_notification.output_ms ? moduleConfig.external_notification.output_ms
: EXT_NOTIFICATION_MODULE_OUTPUT_MS) <
millis()) {
LOG_DEBUG("EXTERNAL 2 %d compared to %d", externalTurnedOn[2]+moduleConfig.external_notification.output_ms, millis());
LOG_DEBUG("EXTERNAL 2 %d compared to %d", externalTurnedOn[2] + moduleConfig.external_notification.output_ms,
millis());
setExternalState(2, !getExternal(2));
}
#ifdef HAS_LED