apply auto-formatter

This commit is contained in:
Robin Müller 2022-05-20 08:36:12 +02:00
parent e1aa39f5e4
commit 6814d0cf2b
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 11 additions and 5 deletions

View File

@ -10,6 +10,7 @@
#include "fsfw/health/HealthTable.h" #include "fsfw/health/HealthTable.h"
#include "fsfw/internalerror/InternalErrorReporter.h" #include "fsfw/internalerror/InternalErrorReporter.h"
#include "fsfw/pus/CService200ModeCommanding.h" #include "fsfw/pus/CService200ModeCommanding.h"
#include "fsfw/pus/Service11TelecommandScheduling.h"
#include "fsfw/pus/Service17Test.h" #include "fsfw/pus/Service17Test.h"
#include "fsfw/pus/Service1TelecommandVerification.h" #include "fsfw/pus/Service1TelecommandVerification.h"
#include "fsfw/pus/Service20ParameterManagement.h" #include "fsfw/pus/Service20ParameterManagement.h"
@ -39,7 +40,7 @@ void ObjectFactory::produceGenericObjects() {
new HealthTable(objects::HEALTH_TABLE); new HealthTable(objects::HEALTH_TABLE);
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER); new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
new TimeStamper(objects::TIME_STAMPER); new TimeStamper(objects::TIME_STAMPER);
new CCSDSDistributor(apid::APID, objects::CCSDS_DISTRIBUTOR); auto* ccsdsDistrib = new CCSDSDistributor(apid::APID, objects::CCSDS_DISTRIBUTOR);
new PUSDistributor(apid::APID, objects::PUS_DISTRIBUTOR, objects::CCSDS_DISTRIBUTOR); new PUSDistributor(apid::APID, objects::PUS_DISTRIBUTOR, objects::CCSDS_DISTRIBUTOR);
new TmFunnel(objects::TM_FUNNEL); new TmFunnel(objects::TM_FUNNEL);
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */ #endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
@ -59,6 +60,8 @@ void ObjectFactory::produceGenericObjects() {
new Service17Test(objects::PUS_SERVICE_17_TEST, apid::APID, pus::PUS_SERVICE_17); new Service17Test(objects::PUS_SERVICE_17_TEST, apid::APID, pus::PUS_SERVICE_17);
new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::APID, new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::APID,
pus::PUS_SERVICE_20); pus::PUS_SERVICE_20);
new Service11TelecommandScheduling<100>(objects::PUS_SERVICE_11_TC_SCHEDULER, apid::APID,
pus::PUS_SERVICE_11, ccsdsDistrib);
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::APID, new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::APID,
pus::PUS_SERVICE_200); pus::PUS_SERVICE_200);
#endif /* OBSW_ADD_PUS_STACK == 1 */ #endif /* OBSW_ADD_PUS_STACK == 1 */

View File

@ -62,8 +62,9 @@ size_t logTraced(LogLevel level, const char* file, unsigned int line, bool timed
*result.out = '\0'; *result.out = '\0';
bufPos += result.size; bufPos += result.size;
} else { } else {
const auto result = fmt::format_to_n(currentIter, PRINT_BUF.size() - 1 - bufPos, const auto result =
" | {}[l.{}] | {}", file, line, fmt::format(fmt, args...)); fmt::format_to_n(currentIter, PRINT_BUF.size() - 1 - bufPos, " | {}[l.{}] | {}", file,
line, fmt::format(fmt, args...));
*result.out = '\0'; *result.out = '\0';
bufPos += result.size; bufPos += result.size;
} }
@ -99,12 +100,14 @@ size_t log(LogLevel level, bool timed, fmt::format_string<T...> fmt, T&&... args
} }
template <typename... T> template <typename... T>
void fdebug(const char* file, unsigned int line, fmt::format_string<T...> fmt, T&&... args) noexcept { void fdebug(const char* file, unsigned int line, fmt::format_string<T...> fmt,
T&&... args) noexcept {
logTraced(LogLevel::DEBUG, file, line, false, fmt, args...); logTraced(LogLevel::DEBUG, file, line, false, fmt, args...);
} }
template <typename... T> template <typename... T>
void fdebug_t(const char* file, unsigned int line, fmt::format_string<T...> fmt, T&&... args) noexcept { void fdebug_t(const char* file, unsigned int line, fmt::format_string<T...> fmt,
T&&... args) noexcept {
logTraced(LogLevel::DEBUG, file, line, true, fmt, args...); logTraced(LogLevel::DEBUG, file, line, true, fmt, args...);
} }