MCPcopy Create free account
hub / github.com/HomeSpan/HomeSpan / processSerialCommand

Method processSerialCommand

src/HomeSpan.cpp:662–1396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660///////////////////////////////
661
662void Span::processSerialCommand(const char *c){
663
664 switch(c[0]){
665
666 case '-': {
667 LOG0("Please type '?' for a list of commands\n\n");
668 }
669 break;
670
671 case 'c': {
672 LOG0("Message Logs: Level %d",logLevel);
673 LOG0("\nStatus LED: Pin ");
674 if(getStatusPin()>=0){
675 LOG0(getStatusPin());
676 if(autoOffLED>0)
677 LOG0(" (Auto Off=%d sec)",autoOffLED);
678 }
679 else
680 LOG0("- *** WARNING: Status LED Pin is UNDEFINED");
681 LOG0("\nDevice Control: Pin ");
682 if(getControlPin()>=0){
683 LOG0(getControlPin());
684 }
685 else{
686 LOG0("- *** WARNING: Device Control Pin is UNDEFINED");
687 }
688 LOG0("\nSketch Version: %s",getSketchVersion());
689 LOG0("\nHomeSpan Version: %s",HOMESPAN_VERSION);
690 LOG0("\nArduino-ESP Ver.: %s",ARDUINO_ESP_VERSION);
691 LOG0("\nESP-IDF Version: %d.%d.%d",ESP_IDF_VERSION_MAJOR,ESP_IDF_VERSION_MINOR,ESP_IDF_VERSION_PATCH);
692 LOG0("\nESP32 Chip: %s Rev %d %s-core %luMB Flash", ESP.getChipModel(),ESP.getChipRevision(),
693 ESP.getChipCores()==1?"single":"dual",ESP.getFlashChipSize()/1024/1024);
694 LOG0("\nESP32 Board: %s",ARDUINO_BOARD);
695 LOG0("\nPWM Resources: %d channels, %d timers, max %d-bit duty resolution",
696 (int)LEDC_SPEED_MODE_MAX*(int)LEDC_CHANNEL_MAX,(int)LEDC_SPEED_MODE_MAX*(int)LEDC_TIMER_MAX,LEDC_TIMER_BIT_MAX-1);
697 LOG0("\nRMT Resources: %d transmission channels of %d symbols each",SOC_RMT_TX_CANDIDATES_PER_GROUP,SOC_RMT_MEM_WORDS_PER_CHANNEL);
698
699 #ifdef SOC_TOUCH_SENSOR_NUM
700 LOG0("\nTouch Sensors: %d pins",SOC_TOUCH_SENSOR_NUM);
701 #else
702 LOG0("\nTouch Sensors: none");
703 #endif
704
705 LOG0("\nSodium Version: %s Lib %d.%d",sodium_version_string(),sodium_library_version_major(),sodium_library_version_minor());
706 char mbtlsv[64];
707 mbedtls_version_get_string_full(mbtlsv);
708 LOG0("\nMbedTLS Version: %s",mbtlsv);
709
710 LOG0("\nSketch Compiled: %s",compileTime?compileTime:"N/A");
711 LOG0("\nPartition: %s",esp_ota_get_running_partition()->label);
712 if(hsWDT.getSeconds())
713 LOG0("\nHS Watchdog: %d seconds",hsWDT.getSeconds());
714 else
715 LOG0("\nHS Watchdog: DISABLED");
716
717 for(int i=0;i<CONFIG_FREERTOS_NUMBER_OF_CORES;i++)
718 LOG0("\nIDLE-%d Watchdog: %s",i,(ESP_OK==esp_task_wdt_status(xTaskGetIdleTaskHandleForCore(i)))?"ENABLED":"DISABLED");
719

Callers

nothing calls this directly

Calls 15

getSecondsMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
getIDMethod · 0.80
isAdminMethod · 0.80
setPasswordMethod · 0.80
clearMethod · 0.80
serialConfigureMethod · 0.80
apConfigureMethod · 0.80
uvPrintMethod · 0.80
sizeMethod · 0.80
controllerListBeginMethod · 0.80

Tested by

no test coverage detected