mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-11 13:28:51 +00:00
improve logging
fix logging make log entry more consistent
This commit is contained in:
parent
223859d28b
commit
5f3613d0e1
@ -179,7 +179,7 @@ static void lsExit()
|
|||||||
|
|
||||||
powerMon->clearState(meshtastic_PowerMon_State_CPU_LightSleep);
|
powerMon->clearState(meshtastic_PowerMon_State_CPU_LightSleep);
|
||||||
|
|
||||||
LOG_DEBUG("Exit state: LS, slept %d ms", sleepTime);
|
LOG_DEBUG("Exit state: LS, stayed %d ms in light-sleep state", sleepTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ static void nbEnter()
|
|||||||
|
|
||||||
static void darkEnter()
|
static void darkEnter()
|
||||||
{
|
{
|
||||||
// LOG_DEBUG("State: DARK");
|
// LOG_DEBUG("State: DARK"); i
|
||||||
setBluetoothEnable(true);
|
setBluetoothEnable(true);
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->setOn(false);
|
screen->setOn(false);
|
||||||
@ -293,7 +293,7 @@ void PowerFSM_setup()
|
|||||||
#else
|
#else
|
||||||
stateIDLE = &stateDARK;
|
stateIDLE = &stateDARK;
|
||||||
#endif
|
#endif
|
||||||
LOG_INFO("PowerFSM init, USB power=%d", hasPower ? 1 : 0);
|
LOG_INFO("PowerFSM init, USB power=%d, is_power_saving=%d", hasPower ? 1 : 0, config.power.is_power_saving ? 1 : 0);
|
||||||
|
|
||||||
powerFSM.add_timed_transition(&stateBOOT, hasPower ? &statePOWER : &stateON, 3 * 1000, NULL, "boot timeout");
|
powerFSM.add_timed_transition(&stateBOOT, hasPower ? &statePOWER : &stateON, 3 * 1000, NULL, "boot timeout");
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ void enableButtonInterrupt()
|
|||||||
pin = (gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN);
|
pin = (gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN);
|
||||||
#ifdef SOC_PM_SUPPORT_EXT_WAKEUP
|
#ifdef SOC_PM_SUPPORT_EXT_WAKEUP
|
||||||
if (rtc_gpio_is_valid_gpio(pin)) {
|
if (rtc_gpio_is_valid_gpio(pin)) {
|
||||||
LOG_DEBUG("Setup button pin (GPIO%02d) with wakeup by ext2 source", pin);
|
LOG_DEBUG("Setup button pin (GPIO%02d) with wakeup by ext1 source", pin);
|
||||||
#ifdef BUTTON_NEED_PULLUP
|
#ifdef BUTTON_NEED_PULLUP
|
||||||
res = rtc_gpio_pullup_en(pin);
|
res = rtc_gpio_pullup_en(pin);
|
||||||
assert(res == ESP_OK);
|
assert(res == ESP_OK);
|
||||||
@ -534,7 +534,7 @@ void enableLoraInterrupt()
|
|||||||
|
|
||||||
#if SOC_PM_SUPPORT_EXT_WAKEUP
|
#if SOC_PM_SUPPORT_EXT_WAKEUP
|
||||||
if (rtc_gpio_is_valid_gpio(pin)) {
|
if (rtc_gpio_is_valid_gpio(pin)) {
|
||||||
LOG_DEBUG("Setup radio interrupt (GPIO%02d) with wakeup by ext1 source", pin);
|
LOG_DEBUG("Setup radio interrupt (GPIO%02d) with wakeup by ext0 source", pin);
|
||||||
res = rtc_gpio_pulldown_en((gpio_num_t)pin);
|
res = rtc_gpio_pulldown_en((gpio_num_t)pin);
|
||||||
assert(res == ESP_OK);
|
assert(res == ESP_OK);
|
||||||
res = rtc_gpio_hold_en((gpio_num_t)pin);
|
res = rtc_gpio_hold_en((gpio_num_t)pin);
|
||||||
|
Loading…
Reference in New Issue
Block a user