11/* *
22 * @file main.cpp
33 */
4- /* Copyright (C) 2021-2025 by Arjan van Vught mailto:info@gd32-dmx.org
4+ /* Copyright (C) 2021-2026 by Arjan van Vught mailto:info@gd32-dmx.org
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
4747#include " remoteconfig.h"
4848#endif
4949
50- namespace hal
51- {
52- void RebootHandler ()
53- {
50+ namespace hal {
51+ void RebootHandler () {
5452 PixelDmx::Get ().Blackout ();
5553}
5654} // namespace hal
@@ -60,9 +58,9 @@ int main() // NOLINT
6058 hal::Init ();
6159 DisplayUdf display;
6260 ConfigStore config_store;
63- #if !defined(NO_EMAC)
61+ #if !defined(NO_EMAC)
6462 network::Init ();
65- #endif
63+ #endif
6664 FirmwareVersion fw (kSoftwareVersion , __DATE__, __TIME__);
6765
6866 const auto kIsConfigMode = IsConfigMode ();
@@ -80,13 +78,12 @@ int main() // NOLINT
8078 PixelTestPattern pixel_test_pattern (kTestPattern , 1 );
8179
8280 PixelDmxParamsRdm pixeldmx_paramsrdm;
83-
81+
8482#if defined(CONFIG_RDM_MANUFACTURER_PIDS_SET)
8583 static constexpr auto kPersonalityCount = static_cast <uint32_t >(pixel::LedType::kUndefined );
8684 RDMPersonality* personalities[kPersonalityCount ];
8785
88- for (uint32_t index = 0 ; index < kPersonalityCount ; index++)
89- {
86+ for (uint32_t index = 0 ; index < kPersonalityCount ; index++) {
9087 const auto * description = pixel::GetTypeName (static_cast <pixel::LedType>(index));
9188 personalities[index] = new RDMPersonality (description, &pixeldmx);
9289 }
@@ -95,7 +92,7 @@ int main() // NOLINT
9592#else
9693 char description[rdm::personality::DESCRIPTION_MAX_LENGTH ];
9794 pixeldmx::paramsdmx::SetPersonalityDescription (description);
98-
95+
9996 RDMPersonality* personalities[2 ] = {new RDMPersonality (description, &pixeldmx), new RDMPersonality (" Config mode" , &pixeldmx_paramsrdm)};
10097 RDMResponder rdm_responder (personalities, 2 );
10198#endif
@@ -104,17 +101,13 @@ int main() // NOLINT
104101 rdm_responder.DmxDisableOutput (!kIsConfigMode && (kTestPattern != pixelpatterns::Pattern::kNone ));
105102 rdm_responder.Print ();
106103
107- if (kIsConfigMode )
108- {
104+ if (kIsConfigMode ) {
109105 pixeldmx_paramsrdm.Print ();
110- }
111- else
112- {
106+ } else {
113107 pixeldmx.Print ();
114108 }
115109
116- if (kIsConfigMode )
117- {
110+ if (kIsConfigMode ) {
118111 puts (" Config mode" );
119112 }
120113
@@ -132,8 +125,7 @@ int main() // NOLINT
132125
133126 common::firmware::pixeldmx::Show (7 );
134127
135- if (kIsConfigMode )
136- {
128+ if (kIsConfigMode ) {
137129 display.ClearLine (3 );
138130 display.ClearLine (4 );
139131 display.Write (4 , " Config Mode" );
@@ -143,8 +135,7 @@ int main() // NOLINT
143135 hal::statusled::SetMode (hal::statusled::Mode::NORMAL );
144136 hal::WatchdogInit ();
145137
146- for (;;)
147- {
138+ for (;;) {
148139 hal::WatchdogFeed ();
149140 rdm_responder.Run ();
150141#if !defined(NO_EMAC)
0 commit comments