@@ -1729,7 +1729,7 @@ class AudioReactive : public Usermod {
17291729 amic[" pin" ] = audioPin;
17301730
17311731 JsonObject dmic = top.createNestedObject (FPSTR (_digitalmic));
1732- dmic[F (" type " )] = dmType;
1732+ dmic[F (" Type " )] = dmType;
17331733 JsonArray pinArray = dmic.createNestedArray (" pin" );
17341734 pinArray.add (i2ssdPin);
17351735 pinArray.add (i2swsPin);
@@ -1738,12 +1738,12 @@ class AudioReactive : public Usermod {
17381738 pinArray.add (sdaPin);
17391739 pinArray.add (sclPin);
17401740
1741- JsonObject cfg = top.createNestedObject (" cfg " );
1742- cfg[F (" squelch " )] = soundSquelch;
1743- cfg[F (" gain " )] = sampleGain;
1741+ JsonObject cfg = top.createNestedObject (" Config " );
1742+ cfg[F (" Squelch " )] = soundSquelch;
1743+ cfg[F (" Gain " )] = sampleGain;
17441744 cfg[F (" AGC" )] = soundAgc;
17451745
1746- JsonObject dynLim = top.createNestedObject (" dynamics " );
1746+ JsonObject dynLim = top.createNestedObject (" Dynamics " );
17471747 dynLim[F (" Limiter" )] = limiterOn;
17481748 dynLim[F (" Rise" )] = attackTime;
17491749 dynLim[F (" Fall" )] = decayTime;
@@ -1752,9 +1752,9 @@ class AudioReactive : public Usermod {
17521752 freqScale[F (" Scale" )] = FFTScalingMode;
17531753 freqScale[F (" Profile" )] = pinkIndex;
17541754
1755- JsonObject sync = top.createNestedObject (" sync " );
1756- sync[F (" port " )] = audioSyncPort;
1757- sync[F (" mode " )] = audioSyncEnabled;
1755+ JsonObject sync = top.createNestedObject (" Sync " );
1756+ sync[F (" Port " )] = audioSyncPort;
1757+ sync[F (" Mode " )] = audioSyncEnabled;
17581758 }
17591759
17601760
@@ -1782,35 +1782,35 @@ class AudioReactive : public Usermod {
17821782
17831783 configComplete &= getJsonValue (top[FPSTR (_analogmic)][" pin" ], audioPin);
17841784
1785- configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" type " ], dmType);
1785+ configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" Type " ], dmType);
17861786 configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" pin" ][0 ], i2ssdPin);
17871787 configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" pin" ][1 ], i2swsPin);
17881788 configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" pin" ][2 ], i2sckPin);
17891789 configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" pin" ][3 ], mclkPin);
17901790 configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" pin" ][4 ], sdaPin);
17911791 configComplete &= getJsonValue (top[FPSTR (_digitalmic)][" pin" ][5 ], sclPin);
17921792
1793- configComplete &= getJsonValue (top[" cfg " ][F (" squelch " )], soundSquelch);
1794- configComplete &= getJsonValue (top[" cfg " ][F (" gain " )], sampleGain);
1795- configComplete &= getJsonValue (top[" cfg " ][F (" AGC" )], soundAgc);
1793+ configComplete &= getJsonValue (top[" Config " ][F (" Squelch " )], soundSquelch);
1794+ configComplete &= getJsonValue (top[" Config " ][F (" Gain " )], sampleGain);
1795+ configComplete &= getJsonValue (top[" Config " ][F (" AGC" )], soundAgc);
17961796
1797- configComplete &= getJsonValue (top[" dynamics " ][F (" Limiter" )], limiterOn);
1798- configComplete &= getJsonValue (top[" dynamics " ][F (" Rise" )], attackTime);
1799- configComplete &= getJsonValue (top[" dynamics " ][F (" Fall" )], decayTime);
1797+ configComplete &= getJsonValue (top[" Dynamics " ][F (" Limiter" )], limiterOn);
1798+ configComplete &= getJsonValue (top[" Dynamics " ][F (" Rise" )], attackTime);
1799+ configComplete &= getJsonValue (top[" Dynamics " ][F (" Fall" )], decayTime);
18001800
18011801 configComplete &= getJsonValue (top[" Frequency" ][F (" Scale" )], FFTScalingMode);
18021802 configComplete &= getJsonValue (top[" Frequency" ][F (" Profile" )], pinkIndex);
18031803
1804- configComplete &= getJsonValue (top[" sync " ][F (" port " )], audioSyncPort);
1805- configComplete &= getJsonValue (top[" sync " ][F (" mode " )], audioSyncEnabled);
1804+ configComplete &= getJsonValue (top[" Sync " ][F (" Port " )], audioSyncPort);
1805+ configComplete &= getJsonValue (top[" Sync " ][F (" Mode " )], audioSyncEnabled);
18061806
18071807 return configComplete;
18081808 }
18091809
18101810
18111811 void appendConfigData ()
18121812 {
1813- oappend (SET_F (" dd=addDropdown('AudioReactive','digitalmic :type');" ));
1813+ oappend (SET_F (" dd=addDropdown('AudioReactive','Digitalmic :type');" ));
18141814 #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
18151815 oappend (SET_F (" addOption(dd,'Generic Analog',0);" ));
18161816 #endif
@@ -1821,18 +1821,18 @@ class AudioReactive : public Usermod {
18211821 #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
18221822 oappend (SET_F (" addOption(dd,'Generic I2S PDM',5);" ));
18231823 #endif
1824- oappend (SET_F (" dd=addDropdown('AudioReactive','cfg :AGC');" ));
1824+ oappend (SET_F (" dd=addDropdown('AudioReactive','Config :AGC');" ));
18251825 oappend (SET_F (" addOption(dd,'Off',0);" ));
18261826 oappend (SET_F (" addOption(dd,'Normal',1);" ));
18271827 oappend (SET_F (" addOption(dd,'Vivid',2);" ));
18281828 oappend (SET_F (" addOption(dd,'Lazy',3);" ));
18291829
1830- oappend (SET_F (" dd=addDropdown('AudioReactive','dynamics :Limiter');" ));
1830+ oappend (SET_F (" dd=addDropdown('AudioReactive','Dynamics :Limiter');" ));
18311831 oappend (SET_F (" addOption(dd,'Off',0);" ));
18321832 oappend (SET_F (" addOption(dd,'On',1);" ));
1833- oappend (SET_F (" addInfo('AudioReactive:dynamics :Limiter',0,' On ');" )); // 0 is field type, 1 is actual field
1834- oappend (SET_F (" addInfo('AudioReactive:dynamics :Rise',1,'ms <i>(♪ effects only)</i>');" ));
1835- oappend (SET_F (" addInfo('AudioReactive:dynamics :Fall',1,'ms <i>(♪ effects only)</i>');" ));
1833+ oappend (SET_F (" addInfo('AudioReactive:Dynamics :Limiter',0,' On ');" )); // 0 is field type, 1 is actual field
1834+ oappend (SET_F (" addInfo('AudioReactive:Dynamics :Rise',1,'ms <i>(♪ effects only)</i>');" ));
1835+ oappend (SET_F (" addInfo('AudioReactive:Dynamics :Fall',1,'ms <i>(♪ effects only)</i>');" ));
18361836
18371837 oappend (SET_F (" dd=addDropdown('AudioReactive','Frequency:Scale');" ));
18381838 oappend (SET_F (" addOption(dd,'None',0);" ));
@@ -1856,17 +1856,17 @@ class AudioReactive : public Usermod {
18561856 oappend (SET_F (" addOption(dd,'Off',0);" ));
18571857 oappend (SET_F (" addOption(dd,'Send',1);" ));
18581858 oappend (SET_F (" addOption(dd,'Receive',2);" ));
1859- oappend (SET_F (" addInfo('AudioReactive:digitalmic :type',1,'<i>requires reboot!</i>');" )); // 0 is field type, 1 is actual field
1860- oappend (SET_F (" addInfo('AudioReactive:digitalmic :pin[]',0,'I2S Serial Data: SD / DOUT / DATA ');" ));
1861- oappend (SET_F (" addInfo('AudioReactive:digitalmic :pin[]',1,'I2S Left/Right Clock: WS / LRCK / CLK ');" ));
1862- oappend (SET_F (" addInfo('AudioReactive:digitalmic :pin[]',2,'I2S Serial Clock: SCK / BCLK ');" ));
1859+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :type',1,'<i>requires reboot!</i>');" )); // 0 is field type, 1 is actual field
1860+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :pin[]',0,'I2S Serial Data', '<i><span class= \" h \" >sd/data/dout</span></i> ');" ));
1861+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :pin[]',1,'I2S L/R Clock','<i><span class= \" h \" >ws/clk/lrck</span></i> ');" ));
1862+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :pin[]',2,'I2S Serial Clock','<i>sck/bclk</i> ');" ));
18631863 #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
1864- oappend (SET_F (" addInfo('AudioReactive:digitalmic :pin[]',3,'MCLK: I2S Master Clock<br/>< i>only use -1, 0, 1 or 3 for MCLK </i>');" ));
1864+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :pin[]',3,'I2S Master CLK','< i>only use -1, 0, 1 or 3 for mclk </i>');" ));
18651865 #else
1866- oappend (SET_F (" addInfo('AudioReactive:digitalmic :pin[]',3,'MCLK: I2S Master Clock ');" ));
1866+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :pin[]',3,'I2S Master CLK',' ');" ));
18671867 #endif
1868- oappend (SET_F (" addInfo('AudioReactive:digitalmic :pin[]',4,'ES7243 I2C: SDA');" ));
1869- oappend (SET_F (" addInfo('AudioReactive:digitalmic :pin[]',5,'ES7243 I2C: SCL');" ));
1868+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :pin[]',4,'I2C SDA',' ');" ));
1869+ oappend (SET_F (" addInfo('AudioReactive:Digitalmic :pin[]',5,'I2C SCL',' ');" ));
18701870 }
18711871
18721872
@@ -1895,7 +1895,7 @@ class AudioReactive : public Usermod {
18951895const char AudioReactive::_name[] PROGMEM = " AudioReactive" ;
18961896const char AudioReactive::_enabled[] PROGMEM = " enabled" ;
18971897const char AudioReactive::_inputLvl[] PROGMEM = " inputLevel" ;
1898- const char AudioReactive::_analogmic[] PROGMEM = " analogmic " ;
1899- const char AudioReactive::_digitalmic[] PROGMEM = " digitalmic " ;
1898+ const char AudioReactive::_analogmic[] PROGMEM = " Analogmic " ;
1899+ const char AudioReactive::_digitalmic[] PROGMEM = " Digitalmic " ;
19001900const char AudioReactive::UDP_SYNC_HEADER[] PROGMEM = " 00002" ; // new sync header version, as format no longer compatible with previous structure
19011901const char AudioReactive::UDP_SYNC_HEADER_v1[] PROGMEM = " 00001" ; // old sync header version - need to add backwards-compatibility feature
0 commit comments