Added 'm' CLI command to print free 8-bit heap memory

This commit is contained in:
Gregg 2022-05-06 22:19:37 -05:00
parent 7546350775
commit bddfb4658a
1 changed files with 7 additions and 3 deletions

View File

@ -909,6 +909,11 @@ void Span::processSerialCommand(const char *c){
}
break;
case 'm': {
Serial.printf("Free Memory: %d bytes\n",heap_caps_get_free_size(MALLOC_CAP_DEFAULT));
}
break;
case 'i':{
Serial.print("\n*** HomeSpan Info ***\n\n");
@ -1016,7 +1021,6 @@ void Span::processSerialCommand(const char *c){
Serial.printf("Configuration Number: %d\n",hapConfig.configNumber);
Serial.printf("\nDatabase Validation: Warnings=%d, Errors=%d\n\n",nWarnings,nErrors);
char d[]="------------------------------";
Serial.printf("%-30s %8s %10s %s %s %s %s %s\n","Service","UUID","AID","IID","Update","Loop","Button","Linked Services");
Serial.printf("%.30s %.8s %.10s %.3s %.6s %.4s %.6s %.15s\n",d,d,d,d,d,d,d,d);