improved some comments - use the dbg funcs

This commit is contained in:
2016-03-18 18:06:58 +01:00
parent 39a4e0ef91
commit 6a6b7caeb7
15 changed files with 155 additions and 129 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ int ICACHE_FLASH_ATTR tplMultipart(HttpdConnData *connData, char *token, void **
}
rns->count_remain = count;
printf("User wants %d numbers.", count);
info("User wants %d numbers.", count);
}
for (int i = 0; i < 100; i++) {
+2 -2
View File
@@ -17,7 +17,7 @@ static void FLASH_FN u0_putc(uint8_t c)
static void FLASH_FN dg_handler(SBMP_Datagram *dg)
{
sbmp_info("Datagram received.");
dbg("[SBMP] Datagram received.");
}
@@ -33,5 +33,5 @@ void FLASH_FN datalinkInit(void)
sbmp_ep_enable(ep, true);
os_printf("SBMP started on UART0\n");
info("SBMP started on UART0");
}
+3 -3
View File
@@ -39,7 +39,7 @@ static void FLASH_FN resetBtnTimerCb(void *arg) {
if (resetCnt>=6) { //3 sec pressed
wifi_station_disconnect();
wifi_set_opmode(STATIONAP_MODE); //reset to AP+STA mode
os_printf("Reset to AP mode. Restarting system...\n");
warn("GPIO0 -> requested reset to AP+STA. Restarting...\n");
system_restart();
}
resetCnt=0;
@@ -53,13 +53,13 @@ void FLASH_FN ioInit() {
if (GPIO_INPUT_GET(BTNGPIO) == 0) {
// starting "in BOOT mode" - do not install the AP reset timer
os_printf("GPIO0 stuck low - AP reset button disabled.\n");
warn("GPIO0 stuck low - AP reset button disabled.\n");
} else {
os_timer_disarm(&resetBtntimer);
os_timer_setfn(&resetBtntimer, resetBtnTimerCb, NULL);
os_timer_arm(&resetBtntimer, 500, 1);
os_printf("Note: Hold GPIO0 low for reset to AP mode.\n");
dbg("Note: Hold GPIO0 low for reset to AP mode.\n");
}
}
+3 -4
View File
@@ -150,11 +150,10 @@ void user_init(void)
// set up the debuging output
serialInit();
os_printf("\n\x1b[32;1mESP8266 starting, "
banner("\n*** ESP8266 starting, "
"HTTPD v."HTTPDVER", "
"SBMP v."SBMP_VER", "
"IoT SDK v." STR(ESP_SDK_VERSION)
"\x1b[0m\n");
"IoT SDK v." STR(ESP_SDK_VERSION)" ***\n");
// reset button etc
ioInit();
@@ -177,7 +176,7 @@ void user_init(void)
httpdInit(builtInUrls, 80);
os_printf("\nReady\n");
info("\nReady\n");
#ifdef SHOW_HEAP_USE
os_timer_disarm(&prHeapTimer);