remove newline from logging statements. (#5022)

remove newline from logging statements in code. The LOG_* functions will now magically add it at the end.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Thomas Göttgens
2024-10-14 06:11:43 +02:00
committed by GitHub
parent fb9f361052
commit 05e4a639a1
150 changed files with 1816 additions and 1800 deletions

View File

@@ -35,7 +35,7 @@ bool loopCanSleep()
// handle standard gcc assert failures
void __attribute__((noreturn)) __assert_func(const char *file, int line, const char *func, const char *failedexpr)
{
LOG_ERROR("assert failed %s: %d, %s, test=%s\n", file, line, func, failedexpr);
LOG_ERROR("assert failed %s: %d, %s, test=%s", file, line, func, failedexpr);
// debugger_break(); FIXME doesn't work, possibly not for segger
// Reboot cpu
NVIC_SystemReset();
@@ -74,7 +74,7 @@ void setBluetoothEnable(bool enable)
// For debugging use: don't use bluetooth
if (!useSoftDevice) {
if (enable)
LOG_INFO("DISABLING NRF52 BLUETOOTH WHILE DEBUGGING\n");
LOG_INFO("DISABLING NRF52 BLUETOOTH WHILE DEBUGGING");
return;
}
@@ -97,7 +97,7 @@ void setBluetoothEnable(bool enable)
// If not yet set-up
if (!nrf52Bluetooth) {
LOG_DEBUG("Initializing NRF52 Bluetooth\n");
LOG_DEBUG("Initializing NRF52 Bluetooth");
nrf52Bluetooth = new NRF52Bluetooth();
nrf52Bluetooth->setup();
@@ -141,7 +141,7 @@ void checkSDEvents()
break;
default:
LOG_DEBUG("Unexpected SDevt %d\n", evt);
LOG_DEBUG("Unexpected SDevt %d", evt);
break;
}
}
@@ -188,7 +188,7 @@ void nrf52Setup()
uint32_t why = NRF_POWER->RESETREAS;
// per
// https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fpower.html
LOG_DEBUG("Reset reason: 0x%x\n", why);
LOG_DEBUG("Reset reason: 0x%x", why);
#ifdef USE_SEMIHOSTING
nrf52InitSemiHosting();
@@ -202,7 +202,7 @@ void nrf52Setup()
#ifdef BQ25703A_ADDR
auto *bq = new BQ25713();
if (!bq->setup())
LOG_ERROR("ERROR! Charge controller init failed\n");
LOG_ERROR("ERROR! Charge controller init failed");
#endif
// Init random seed
@@ -212,7 +212,7 @@ void nrf52Setup()
} seed;
nRFCrypto.begin();
nRFCrypto.Random.generate(seed.seed8, sizeof(seed.seed8));
LOG_DEBUG("Setting random seed %u\n", seed.seed32);
LOG_DEBUG("Setting random seed %u", seed.seed32);
randomSeed(seed.seed32);
nRFCrypto.end();
}
@@ -280,7 +280,7 @@ void cpuDeepSleep(uint32_t msecToWake)
// https://devzone.nordicsemi.com/f/nordic-q-a/48919/ram-retention-settings-with-softdevice-enabled
auto ok = sd_power_system_off();
if (ok != NRF_SUCCESS) {
LOG_ERROR("FIXME: Ignoring soft device (EasyDMA pending?) and forcing system-off!\n");
LOG_ERROR("FIXME: Ignoring soft device (EasyDMA pending?) and forcing system-off!");
NRF_POWER->SYSTEMOFF = 1;
}
}