@@ -83,7 +83,7 @@ bool CfgClass::getOptionString(uint16_t param_idx, int32_t param_val, char out_o
8383}
8484
8585// print all parameters for module_name on single line
86- void CfgClass::printModule (const char * module_name) {
86+ void CfgClass::printModule (const char * module_name, printModuleMode mode ) {
8787 String modname = String (module_name);
8888 modname.toUpperCase ();
8989 Serial.printf (" %s: " , modname.c_str ());
@@ -97,8 +97,22 @@ void CfgClass::printModule(const char* module_name) {
9797 printValue (gizmo_i);
9898 Serial.print (" " );
9999 }
100+
101+ if (mode == printModuleMode::GIZMO) {
102+ Serial.println ();
103+ return ;
104+ }
105+
106+ if (mode == printModuleMode::GIZMO_NO_CR) {
107+ Serial.print (" - " );
108+ return ;
109+ }
110+
111+ if (mode == printModuleMode::CFG_ERROR) {
112+ Serial.print (" ERROR check pin/bus config: " );
113+ }
114+
100115 // print config
101- Serial.print (" setup - " );
102116 for (int i = 0 ; i < paramCount (); i++) {
103117 if (strncmp (Cfg::param_list[i].name , modname_.c_str (), modname_.length ()) == 0 && i != gizmo_i) { // starts with module_name + '_', omit gizmo
104118 Serial.print (Cfg::param_list[i].name );
@@ -198,11 +212,11 @@ void CfgClass::cli_diff(const char* filter) {
198212
199213// sort by pin number (using inefficient sort)
200214void CfgClass::printPins () {
201- for (int pinno = 0 ; pinno<128 ; pinno++) {
215+ Serial.println (" \n === PINOUT ===\n " );
216+ for (int pinno = 0 ; pinno < 128 ; pinno++) {
202217 int cnt = 0 ;
203218 for (int i = 0 ; i < paramCount (); i++) {
204219 if (strncmp (Cfg::param_list[i].name , " pin_" , 4 ) == 0 && getValue (i) == pinno) {
205- Serial.print (" PIN: " );
206220 if (cnt==0 ) {
207221 printNameAndValue (i);
208222 }else {
0 commit comments