From ced03f1f08e83d290f684500c447d4b42ef54552 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 14 Dec 2023 03:49:54 +0100 Subject: [PATCH] code spell checking - part1 (core) I've found a code spellchecker, so this is what can be corrected easily. Changes are only affecting comments, readme and a few user-visible strings. So no functional impact expected. --- CHANGELOG.md | 6 ++--- platformio.ini | 2 +- wled00/FX.cpp | 36 ++++++++++++++-------------- wled00/FX.h | 4 ++-- wled00/FX_fcn.cpp | 7 +++--- wled00/bus_manager.cpp | 2 +- wled00/bus_wrapper.h | 8 +++---- wled00/button.cpp | 4 ++-- wled00/cfg.cpp | 2 +- wled00/const.h | 16 ++++++------- wled00/data/cpal/cpal.htm | 4 ++-- wled00/data/index.js | 4 ++-- wled00/data/pixart/getPixelValues.js | 4 ++-- wled00/data/settings_wifi.htm | 2 +- wled00/data/simple.js | 2 +- wled00/json.cpp | 4 ++-- wled00/remote.cpp | 4 ++-- wled00/set.cpp | 6 ++--- wled00/udp.cpp | 4 ++-- wled00/um_manager.cpp | 2 +- wled00/util.cpp | 2 +- wled00/wled.h | 6 ++--- wled00/ws.cpp | 2 +- 23 files changed, 66 insertions(+), 67 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebb620ba4d..96ca852363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -389,7 +389,7 @@ - Added application level pong websockets reply (#2139) - Use AsyncTCP 1.0.3 as it mitigates the flickering issue from 0.13.0-b2 -- Fixed transition manually updated in preset overriden by field value +- Fixed transition manually updated in preset overridden by field value #### Build 2108050 @@ -918,7 +918,7 @@ #### Build 2011040 -- Inversed Rain direction (fixes #1147) +- Inverted Rain direction (fixes #1147) #### Build 2011010 @@ -1129,7 +1129,7 @@ - Added module info page to web UI - Added realtime override functionality to web UI -- Added individial segment power and brightness to web UI +- Added individual segment power and brightness to web UI - Added feature to one-click select single segment only by tapping segment name - Removed palette jumping to default if color is changed diff --git a/platformio.ini b/platformio.ini index 10af99f43a..2180882f66 100644 --- a/platformio.ini +++ b/platformio.ini @@ -763,7 +763,7 @@ board_build.flash_mode = dio ; -D RLYPIN=19 ; -D BTNPIN=17 ; -D IRPIN=18 -; -D UWLED_USE_MY_CONFIG +; -U WLED_USE_MY_CONFIG ; -D USERMOD_DALLASTEMPERATURE ; -D USERMOD_FOUR_LINE_DISPLAY ; -D TEMPERATURE_PIN=23 diff --git a/wled00/FX.cpp b/wled00/FX.cpp index a738178c08..cdec4358d8 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -51,7 +51,7 @@ static uint16_t triwave16(uint16_t in) { * Generates a tristate square wave w/ attac & decay * @param x input value 0-255 * @param pulsewidth 0-127 - * @param attdec attac & decay, max. pulsewidth / 2 + * @param attdec attack & decay, max. pulsewidth / 2 * @returns signed waveform value */ static int8_t tristate_square8(uint8_t x, uint8_t pulsewidth, uint8_t attdec) { @@ -1241,7 +1241,7 @@ uint16_t mode_fireworks() { if (SEGMENT.is2D()) SEGMENT.setPixelColorXY(j, k, col); else SEGMENT.setPixelColor(index, col); SEGENV.aux1 = SEGENV.aux0; // old spark - SEGENV.aux0 = index; // remember where spark occured + SEGENV.aux0 = index; // remember where spark occurred } } return FRAMETIME; @@ -1278,8 +1278,8 @@ uint16_t mode_rain() { SEGENV.aux0++; // increase spark index SEGENV.aux1++; } - if (SEGENV.aux0 == 0) SEGENV.aux0 = UINT16_MAX; // reset previous spark positiom - if (SEGENV.aux1 == 0) SEGENV.aux0 = UINT16_MAX; // reset previous spark positiom + if (SEGENV.aux0 == 0) SEGENV.aux0 = UINT16_MAX; // reset previous spark position + if (SEGENV.aux1 == 0) SEGENV.aux0 = UINT16_MAX; // reset previous spark position if (SEGENV.aux0 >= width*height) SEGENV.aux0 = 0; // ignore if (SEGENV.aux1 >= width*height) SEGENV.aux1 = 0; } @@ -3707,7 +3707,7 @@ uint16_t mode_tetrix(void) { } if (drop->step == 0) { // init brick - // speed calcualtion: a single brick should reach bottom of strip in X seconds + // speed calculation: a single brick should reach bottom of strip in X seconds // if the speed is set to 1 this should take 5s and at 255 it should take 0.25s // as this is dependant on SEGLEN it should be taken into account and the fact that effect runs every FRAMETIME s int speed = SEGMENT.speed ? SEGMENT.speed : random8(1,255); @@ -3790,7 +3790,7 @@ static const char _data_FX_MODE_PLASMA[] PROGMEM = "Plasma@Phase,!;!;!"; /* * Percentage display - * Intesity values from 0-100 turn on the leds. + * Intensity values from 0-100 turn on the leds. */ uint16_t mode_percent(void) { @@ -3843,7 +3843,7 @@ static const char _data_FX_MODE_PERCENT[] PROGMEM = "Percent@,% of fill,,,,One c /* * Modulates the brightness similar to a heartbeat - * (unimplemented?) tries to draw an ECG aproximation on a 2D matrix + * (unimplemented?) tries to draw an ECG approximation on a 2D matrix */ uint16_t mode_heartbeat(void) { uint8_t bpm = 40 + (SEGMENT.speed >> 3); @@ -4525,7 +4525,7 @@ uint16_t mode_tv_simulator(void) { // how much time is elapsed ? tvSimulator->elapsed = strip.now - tvSimulator->startTime; - // fade from prev volor to next color + // fade from prev color to next color if (tvSimulator->elapsed < tvSimulator->fadeTime) { r = map(tvSimulator->elapsed, 0, tvSimulator->fadeTime, tvSimulator->pr, nr); g = map(tvSimulator->elapsed, 0, tvSimulator->fadeTime, tvSimulator->pg, ng); @@ -6487,7 +6487,7 @@ uint16_t mode_gravcenter(void) { // Gravcenter. By Andrew Tuline. SEGMENT.fade_out(251); // 30% float segmentSampleAvg = volumeSmth * (float)SEGMENT.intensity / 255.0f; - segmentSampleAvg *= 0.125; // divide by 8, to compensate for later "sensitivty" upscaling + segmentSampleAvg *= 0.125; // divide by 8, to compensate for later "sensitivity" upscaling float mySampleAvg = mapf(segmentSampleAvg*2.0, 0, 32, 0, (float)SEGLEN/2.0); // map to pixels available in current segment uint16_t tempsamp = constrain(mySampleAvg, 0, SEGLEN/2); // Keep the sample from overflowing. @@ -6542,7 +6542,7 @@ uint16_t mode_gravcentric(void) { // Gravcentric. By Andrew SEGMENT.fade_out(253); // 50% float segmentSampleAvg = volumeSmth * (float)SEGMENT.intensity / 255.0; - segmentSampleAvg *= 0.125f; // divide by 8, to compensate for later "sensitivty" upscaling + segmentSampleAvg *= 0.125f; // divide by 8, to compensate for later "sensitivity" upscaling float mySampleAvg = mapf(segmentSampleAvg*2.0, 0.0f, 32.0f, 0.0f, (float)SEGLEN/2.0); // map to pixels availeable in current segment int tempsamp = constrain(mySampleAvg, 0, SEGLEN/2); // Keep the sample from overflowing. @@ -6609,7 +6609,7 @@ uint16_t mode_gravimeter(void) { // Gravmeter. By Andrew Tuline. float segmentSampleAvg = (volumeSmth * sensGain) - sensOffset; if (segmentSampleAvg < 0) segmentSampleAvg = 0; // could be <0 due to sensOffset - segmentSampleAvg *= 0.25f; // divide by 4, to compensate for later "sensitivty" upscaling + segmentSampleAvg *= 0.25f; // divide by 4, to compensate for later "sensitivity" upscaling float mySampleAvg = mapf(segmentSampleAvg*2.0f, 0, 64, 0, (SEGLEN-1)); // map to pixels availeable in current segment int tempsamp = constrain(mySampleAvg,0,SEGLEN-1); // Keep the sample from overflowing. uint8_t gravity = 8 - SEGMENT.speed/32; @@ -6753,7 +6753,7 @@ uint16_t mode_midnoise(void) { // Midnoise. By Andrew Tuline. //SEGMENT.fade_out(SEGMENT.speed); float tmpSound2 = volumeSmth * (float)SEGMENT.intensity / 256.0; // Too sensitive. - tmpSound2 *= (float)SEGMENT.intensity / 128.0; // Reduce sensitity/length. + tmpSound2 *= (float)SEGMENT.intensity / 128.0; // Reduce sensitivity/length. int maxLen = mapf(tmpSound2, 0, 127, 0, SEGLEN/2); if (maxLen >SEGLEN/2) maxLen = SEGLEN/2; @@ -7269,7 +7269,7 @@ uint16_t mode_freqmatrix(void) { // Freqmatrix. By Andreas Plesch if (FFT_MajorPeak > MAX_FREQUENCY) FFT_MajorPeak = 1; // MajorPeak holds the freq. value which is most abundant in the last sample. - // With our sampling rate of 10240Hz we have a usable freq range from roughtly 80Hz to 10240/2 Hz + // With our sampling rate of 10240Hz we have a usable freq range from roughly 80Hz to 10240/2 Hz // we will treat everything with less than 65Hz as 0 if ((FFT_MajorPeak > 80.0f) && (volumeSmth > 0.25f)) { // WLEDMM @@ -7290,7 +7290,7 @@ uint16_t mode_freqmatrix(void) { // Freqmatrix. By Andreas Plesch return FRAMETIME; } // mode_freqmatrix() -static const char _data_FX_MODE_FREQMATRIX[] PROGMEM = "Freqmatrix@Speed,Sound effect,Low bin,High bin,Sensivity;;;1f;c1=18,c2=48,c3=6,m12=3,si=0"; // Corner, Beatsin; notes range C3 to C7 +static const char _data_FX_MODE_FREQMATRIX[] PROGMEM = "Freqmatrix@Speed,Sound effect,Low bin,High bin,Sensitivity;;;1f;c1=18,c2=48,c3=6,m12=3,si=0"; // Corner, Beatsin; notes range C3 to C7 ////////////////////// @@ -7374,7 +7374,7 @@ uint16_t mode_freqwave(void) { // Freqwave. By Andreas Pleschun if (FFT_MajorPeak > MAX_FREQUENCY) FFT_MajorPeak = 1.0f; // MajorPeak holds the freq. value which is most abundant in the last sample. - // With our sampling rate of 10240Hz we have a usable freq range from roughtly 80Hz to 10240/2 Hz + // With our sampling rate of 10240Hz we have a usable freq range from roughly 80Hz to 10240/2 Hz // we will treat everything with less than 65Hz as 0 if ((FFT_MajorPeak < 80) || (volumeSmth < 1.0f) || (FFT_MajorPeak > 10800)) { // silence or out-of-range --> black @@ -7437,7 +7437,7 @@ uint16_t mode_gravfreq(void) { // Gravfreq. By Andrew Tuline. SEGMENT.fadeToBlackBy(96); float segmentSampleAvg = volumeSmth * (float)SEGMENT.intensity / 255.0f; - segmentSampleAvg *= 0.125; // divide by 8, to compensate for later "sensitivty" upscaling + segmentSampleAvg *= 0.125f; // divide by 8, to compensate for later "sensitivity" upscaling float mySampleAvg = mapf(segmentSampleAvg*2.0f, 0,32, 0, (float)SEGLEN/2.0); // map to pixels availeable in current segment int tempsamp = constrain(mySampleAvg,0,SEGLEN/2); // Keep the sample from overflowing. @@ -7466,7 +7466,7 @@ uint16_t mode_gravfreq(void) { // Gravfreq. By Andrew Tuline. SEGENV.aux0 = indexNew; return FRAMETIME; } // mode_gravfreq() -static const char _data_FX_MODE_GRAVFREQ[] PROGMEM = "Gravfreq ☾@Rate of fall,Sensivity;!,!;!;1f;ix=128,m12=0,si=0"; // Pixels, Beatsin +static const char _data_FX_MODE_GRAVFREQ[] PROGMEM = "Gravfreq ☾@Rate of fall,Sensitivity;!,!;!;1f;ix=128,m12=0,si=0"; // Pixels, Beatsin ////////////////////// @@ -8152,7 +8152,7 @@ static const char _data_FX_MODE_2DWAVINGCELL[] PROGMEM = "Waving Cell@!,,Amplitu static const char _data_RESERVED[] PROGMEM = "RSVD"; // add (or replace reserved) effect mode and data into vector -// use id==255 to find unallocatd gaps (with "Reserved" data string) +// use id==255 to find unallocated gaps (with "Reserved" data string) // if vector size() is smaller than id (single) data is appended at the end (regardless of id) void WS2812FX::addEffect(uint8_t id, mode_ptr mode_fn, const char *mode_name) { if (id == 255) { // find empty slot diff --git a/wled00/FX.h b/wled00/FX.h index 3e4df0e717..3b41238793 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -424,12 +424,12 @@ typedef struct Segment { uint8_t _briT; // temporary brightness uint8_t _cctT; // temporary CCT CRGBPalette16 _palT; // temporary palette - uint8_t _prevPaletteBlends; // number of previous palette blends (there are max 255 belnds possible) + uint8_t _prevPaletteBlends; // number of previous palette blends (there are max 255 blends possible) uint8_t _modeP; // previous mode/effect //uint16_t _aux0, _aux1; // previous mode/effect runtime data //uint32_t _step, _call; // previous mode/effect runtime data //byte *_data; // previous mode/effect runtime data - unsigned long _start; // must accommodate millis() + unsigned long _start; // must accommodate millis() uint16_t _dur; Transition(uint16_t dur=750) : _briT(255) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index baed4c15f3..0b8705349a 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -349,7 +349,7 @@ CRGBPalette16 &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) { CRGB sec = gamma32(colors[1]); CRGB ter = gamma32(colors[2]); targetPalette = CRGBPalette16(ter,sec,prim); break;} - case 5: {//primary + secondary (+tert if not off), more distinct + case 5: {//primary + secondary (+tertiary if not off), more distinct CRGB prim = gamma32(colors[0]); CRGB sec = gamma32(colors[1]); if (colors[2]) { @@ -1768,8 +1768,7 @@ void WS2812FX::estimateCurrentAndLimitBri() { } void WS2812FX::show(void) { - - // avoid race condition, caputre _callback value + // avoid race condition, capture _callback value show_callback callback = _callback; if (callback) callback(); @@ -1815,7 +1814,7 @@ bool WS2812FX::isUpdating() { /** * Returns the refresh rate of the LED strip. Useful for finding out whether a given setup is fast enough. - * Only updates on show() or is set to 0 fps if last show is more than 2 secs ago, so accurary varies + * Only updates on show() or is set to 0 fps if last show is more than 2 secs ago, so accuracy varies */ uint16_t WS2812FX::getFps() { if (millis() - _lastShow > 2000) return 0; diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 6ff757624b..14e0888acc 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -70,7 +70,7 @@ void ColorOrderMap::add(uint16_t start, uint16_t len, uint8_t colorOrder) { uint8_t IRAM_ATTR ColorOrderMap::getPixelColorOrder(uint16_t pix, uint8_t defaultColorOrder) const { if (_count == 0) return defaultColorOrder; - // upper nibble containd W swap information + // upper nibble contains W swap information uint8_t swapW = defaultColorOrder >> 4; for (uint8_t i = 0; i < _count; i++) { if (pix >= _mappings[i].start && pix < (_mappings[i].start + _mappings[i].len)) { diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 8473938e7b..a5b9d7a715 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -69,17 +69,17 @@ #define I_32_RN_NEO_3 21 #define I_32_I0_NEO_3 22 #define I_32_I1_NEO_3 23 -#define I_32_BB_NEO_3 24 // bitbangging on ESP32 not recommended +#define I_32_BB_NEO_3 24 // bitbanging on ESP32 not recommended //RGBW #define I_32_RN_NEO_4 25 #define I_32_I0_NEO_4 26 #define I_32_I1_NEO_4 27 -#define I_32_BB_NEO_4 28 // bitbangging on ESP32 not recommended +#define I_32_BB_NEO_4 28 // bitbanging on ESP32 not recommended //400Kbps #define I_32_RN_400_3 29 #define I_32_I0_400_3 30 #define I_32_I1_400_3 31 -#define I_32_BB_400_3 32 // bitbangging on ESP32 not recommended +#define I_32_BB_400_3 32 // bitbanging on ESP32 not recommended //TM1814 (RGBW) #define I_32_RN_TM1_4 33 #define I_32_I0_TM1_4 34 @@ -374,7 +374,7 @@ class PolyBus { case I_32_I1_UCS_4: (static_cast(busPtr))->Begin(); break; #endif // case I_32_BB_UCS_4: (static_cast(busPtr))->Begin(); break; - // ESP32 can (and should, to avoid inadvertantly driving the chip select signal) specify the pins used for SPI, but only in begin() + // ESP32 can (and should, to avoid inadvertently driving the chip select signal) specify the pins used for SPI, but only in begin() case I_HS_DOT_3: beginDotStar(busPtr, pins[1], -1, pins[0], -1, clock_kHz); break; case I_HS_LPD_3: beginDotStar(busPtr, pins[1], -1, pins[0], -1, clock_kHz); break; case I_HS_LPO_3: beginDotStar(busPtr, pins[1], -1, pins[0], -1, clock_kHz); break; diff --git a/wled00/button.cpp b/wled00/button.cpp index 053d59ddbf..89b8a91d04 100644 --- a/wled00/button.cpp +++ b/wled00/button.cpp @@ -171,7 +171,7 @@ void handleAnalog(uint8_t b) // remove noise & reduce frequency of UI updates if (abs(int(aRead) - int(oldRead[b])) <= POT_SENSITIVITY) return; // no significant change in reading - // Unomment the next lines if you still see flickering related to potentiometer + // Un-Comment the next lines if you still see flickering related to potentiometer // This waits until strip finishes updating (why: strip was not updating at the start of handleButton() but may have started during analogRead()?) //unsigned long wait_started = millis(); //while(strip.isUpdating() && (millis() - wait_started < STRIP_WAIT_TIME)) { @@ -375,7 +375,7 @@ void handleIO() if (!offMode) { #ifdef ESP8266 // turn off built-in LED if strip is turned off - // this will break digital bus so will need to be reinitialised on On + // this will break digital bus so will need to be re-initialised on On PinOwner ledPinOwner = pinManager.getPinOwner(LED_BUILTIN); if (!strip.isOffRefreshRequired() && (ledPinOwner == PinOwner::None || ledPinOwner == PinOwner::BusDigital)) { pinMode(LED_BUILTIN, OUTPUT); diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 627559054e..3d0c2acf6b 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -337,7 +337,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { PinManagerPinType i2c[2] = { { i2c_sda, true }, { i2c_scl, true } }; if (i2c_scl >= 0 && i2c_sda >= 0 && pinManager.allocateMultiplePins(i2c, 2, PinOwner::HW_I2C)) { #ifdef ESP32 - Wire.setPins(i2c_sda, i2c_scl); // this will fail if Wire is initilised (Wire.begin() called prior) + Wire.setPins(i2c_sda, i2c_scl); // this will fail if Wire is initialised (Wire.begin() called prior) #endif // Wire.begin(); // WLEDMM moved into pinManager DEBUG_PRINTF("pinmgr success for global i2c %d %d\n", i2c_sda, i2c_scl); diff --git a/wled00/const.h b/wled00/const.h index 521dc93116..ae8ecb92e7 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -199,8 +199,8 @@ #define DMX_MODE_MULTIPLE_RGB 4 //every LED is addressed with its own RGB (ledCount * 3 channels) #define DMX_MODE_MULTIPLE_DRGB 5 //every LED is addressed with its own RGB and share a master dimmer (ledCount * 3 + 1 channels) #define DMX_MODE_MULTIPLE_RGBW 6 //every LED is addressed with its own RGBW (ledCount * 4 channels) -#define DMX_MODE_EFFECT_SEGMENT 8 //trigger standalone effects of WLED (15 channels per segement) -#define DMX_MODE_EFFECT_SEGMENT_W 9 //trigger standalone effects of WLED (18 channels per segement) +#define DMX_MODE_EFFECT_SEGMENT 8 //trigger standalone effects of WLED (15 channels per segment) +#define DMX_MODE_EFFECT_SEGMENT_W 9 //trigger standalone effects of WLED (18 channels per segment) #define DMX_MODE_PRESET 10 //apply presets (1 channel) //Light capability byte (unused) 0bRCCCTTTT @@ -317,7 +317,7 @@ #define SEG_DIFFERS_OPT 0x02 // all segment options except: selected, reset & transitional #define SEG_DIFFERS_COL 0x04 // colors #define SEG_DIFFERS_FX 0x08 // effect/mode parameters -#define SEG_DIFFERS_BOUNDS 0x10 // segment start/stop ounds +#define SEG_DIFFERS_BOUNDS 0x10 // segment start/stop bounds #define SEG_DIFFERS_GSO 0x20 // grouping, spacing & offset #define SEG_DIFFERS_SEL 0x80 // selected @@ -340,7 +340,7 @@ #define ERR_FS_PLOAD 12 // It was attempted to load a preset that does not exist #define ERR_FS_IRLOAD 13 // It was attempted to load an IR JSON cmd, but the "ir.json" file does not exist #define ERR_FS_RMLOAD 14 // It was attempted to load an remote JSON cmd, but the "remote.json" file does not exist -#define ERR_FS_GENERAL 19 // A general unspecified filesystem error occured +#define ERR_FS_GENERAL 19 // A general unspecified filesystem error occurred #define ERR_OVERTEMP 30 // An attached temperature sensor has measured above threshold temperature (not implemented) #define ERR_OVERCURRENT 31 // An attached current sensor has measured a current above the threshold (not implemented) #define ERR_UNDERVOLT 32 // An attached voltmeter has measured a voltage below the threshold (not implemented) @@ -369,7 +369,7 @@ #define SUBPAGE_JS 254 #define SUBPAGE_WELCOME 255 -#define NTP_PACKET_SIZE 48 // size of NTP recive buffer +#define NTP_PACKET_SIZE 48 // size of NTP receive buffer #define NTP_MIN_PACKET_SIZE 48 // min expected size - NTP v4 allows for "extended information" appended to the standard fields //maximum number of rendered LEDs - this does not have to match max. physical LEDs, e.g. if there are virtual busses @@ -471,7 +471,7 @@ //this is merely a default now and can be changed at runtime #ifndef LEDPIN #if defined(ESP8266) || (defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM)) || defined(CONFIG_IDF_TARGET_ESP32C3) - #define LEDPIN 2 // GPIO2 (D4) on Wemod D1 mini compatible boards + #define LEDPIN 2 // GPIO2 (D4) on Wemos D1 mini compatible boards #else #define LEDPIN 16 // aligns with GPIO2 (D4) on Wemos D1 mini32 compatible boards #endif @@ -492,7 +492,7 @@ #define INTERFACE_UPDATE_COOLDOWN 2000 //time in ms to wait between websockets, alexa, and MQTT updates // HW_PIN_SCL & HW_PIN_SDA are used for information in usermods settings page and usermods themselves -// which GPIO pins are actually used in a hardwarea layout (controller board) +// which GPIO pins are actually used in a hardware layout (controller board) //WLEDMM: unchangeable pins are not treated here by undef them, but elsewhere in the code // defaults for 1st I2C on ESP32 (Wire global) #ifndef HW_PIN_SCL @@ -503,7 +503,7 @@ #endif // HW_PIN_SCLKSPI & HW_PIN_MOSISPI & HW_PIN_MISOSPI are used for information in usermods settings page and usermods themselves -// which GPIO pins are actually used in a hardwarea layout (controller board) +// which GPIO pins are actually used in a hardware layout (controller board) //WLEDMM: unchangeable pins are not treated here by undef them, but elsewhere in the code // defaults for VSPI on ESP32 (SPI global, SPI.cpp) as HSPI is used by WLED (bus_wrapper.h) #ifndef HW_PIN_CLOCKSPI diff --git a/wled00/data/cpal/cpal.htm b/wled00/data/cpal/cpal.htm index 5a8c801e5e..e9a3799c8b 100644 --- a/wled00/data/cpal/cpal.htm +++ b/wled00/data/cpal/cpal.htm @@ -485,7 +485,7 @@

console.log('Error: ', e); console.log(' Status: ', this.status); //Show some error notification for some time setTimeout(()=>{ - //Remove it when time has pased + //Remove it when time has passed }, 1000); }); req.open("POST", "/upload"); @@ -530,7 +530,7 @@

paletteArray.push({"palette":[0,70,70,70,255,70,70,70]}); } - //Get static palettes from localStorage and do some magic to reformat them into the same format as the pallete JSONs + //Get static palettes from localStorage and do some magic to reformat them into the same format as the palette JSONs //This code excludes any objects with "non valid integer colors", i.e. r, c1, c2, c3 and such //This code also fixes potentially broken palettes which doesn't end on 255 //The code finally also removes any representations of the custom palettes, since we read them from file diff --git a/wled00/data/index.js b/wled00/data/index.js index d4109554fb..c50fc89e16 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -1978,9 +1978,9 @@ function readState(s,command=false) // - For AC effects (id<128) 2 sliders and 3 colors and the palette will be shown // - For SR effects (id>128) 5 sliders and 3 colors and the palette will be shown // If effective (@) -// - a ; seperates slider controls (left) from color controls (middle) and palette control (right) +// - a ; separates slider controls (left) from color controls (middle) and palette control (right) // - if left, middle or right is empty no controls are shown -// - a , seperates slider controls (max 5) or color controls (max 3). Palette has only one value +// - a , separates slider controls (max 5) or color controls (max 3). Palette has only one value // - a ! means that the default is used. // - For sliders: Effect speeds, Effect intensity, Custom 1, Custom 2, Custom 3 // - For colors: Fx color, Background color, Custom diff --git a/wled00/data/pixart/getPixelValues.js b/wled00/data/pixart/getPixelValues.js index 6f68f2d240..7f4265fd8f 100644 --- a/wled00/data/pixart/getPixelValues.js +++ b/wled00/data/pixart/getPixelValues.js @@ -69,7 +69,7 @@ function getPixelRGBValues(base64Image) { let sizeY = szY.value; if (color != accentColor || sizeX < 1 || sizeY < 1){ - //image will not be rezised Set desitred size to original size + //image will not be resized Set desired size to original size sizeX = image.width; sizeY = image.height; //failsafe for not generating huge images automatically @@ -153,7 +153,7 @@ function getPixelRGBValues(base64Image) { let curentColorIndex = 0 let commandArray = []; - //For evry pixel in the LED array + //For every pixel in the LED array for (let i = 0; i < maxi; i++) { let pixel = ledRGBValues[i]; let r = pixel[0]; diff --git a/wled00/data/settings_wifi.htm b/wled00/data/settings_wifi.htm index 8d4aebe13d..b66a1b092c 100644 --- a/wled00/data/settings_wifi.htm +++ b/wled00/data/settings_wifi.htm @@ -34,7 +34,7 @@ ).reduce( // Filter out duplicate SSIDs. Since it is sorted by signal // strength, the strongest signal will be kept in the - // order it orginally appeared in the array. + // order it as originally appeared in the array. (unique, other) => { if(!unique.some(obj => obj.ssid === other.ssid)) { unique.push(other); diff --git a/wled00/data/simple.js b/wled00/data/simple.js index 42c762661d..8e3d2914b9 100644 --- a/wled00/data/simple.js +++ b/wled00/data/simple.js @@ -965,7 +965,7 @@ function readState(s,command=false) errstr = "Missing IR.json."; break; case 19: - errstr = "A filesystem error has occured."; + errstr = "A filesystem error has occurred."; break; } showToast('Error ' + s.error + ": " + errstr, true); diff --git a/wled00/json.cpp b/wled00/json.cpp index 4c049889f3..6cf4e7fbfa 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -309,7 +309,7 @@ bool deserializeSegment(JsonObject elem, byte it, byte presetId) getVal(elem["c1"], &seg.custom1); getVal(elem["c2"], &seg.custom2); uint8_t cust3 = seg.custom3; - getVal(elem["c3"], &cust3); // we can't pass reference to bifield + getVal(elem["c3"], &cust3); // we can't pass reference to bitfield seg.custom3 = constrain(cust3, 0, 31); seg.check1 = elem["o1"] | seg.check1; @@ -1206,7 +1206,7 @@ void serializePalettes(JsonObject root, AsyncWebServerRequest* request) curPalette.add("c2"); curPalette.add("c1"); break; - case 5: //primary + secondary (+tert if not off), more distinct + case 5: //primary + secondary (+tertiary if not off), more distinct curPalette.add("c1"); curPalette.add("c1"); curPalette.add("c1"); diff --git a/wled00/remote.cpp b/wled00/remote.cpp index b79066ed9e..e878f8ebd5 100644 --- a/wled00/remote.cpp +++ b/wled00/remote.cpp @@ -30,11 +30,11 @@ void handleRemote(){} // since it's broadly commercially available and works out of the box as a drop-in typedef struct message_structure { uint8_t program; // 0x91 for ON button, 0x81 for all others - uint8_t seq[4]; // Incremetal sequence number 32 bit unsigned integer LSB first + uint8_t seq[4]; // Incremental sequence number 32 bit unsigned integer LSB first uint8_t byte5 = 32; // Unknown uint8_t button; // Identifies which button is being pressed uint8_t byte8 = 1; // Unknown, but always 0x01 - uint8_t byte9 = 100; // Unnkown, but always 0x64 + uint8_t byte9 = 100; // Unknown, but always 0x64 uint8_t byte10; // Unknown, maybe checksum uint8_t byte11; // Unknown, maybe checksum diff --git a/wled00/set.cpp b/wled00/set.cpp index 55def478f0..4b76f3c50b 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -186,7 +186,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) } busses.updateColorOrderMap(com); - // upate other pins + // update other pins int hw_ir_pin = request->arg(F("IR")).toInt(); if (pinManager.allocatePin(hw_ir_pin,false, PinOwner::IR)) { irPin = hw_ir_pin; @@ -710,10 +710,10 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) DEBUG_PRINTLN(value); } else { // we are using a hidden field with the same name as our parameter (!before the actual parameter!) - // to describe the type of parameter (text,float,int), for boolean patameters the first field contains "off" + // to describe the type of parameter (text,float,int), for boolean parameters the first field contains "off" // so checkboxes have one or two fields (first is always "false", existence of second depends on checkmark and may be "true") if (subObj[name].isNull()) { - // the first occurence of the field describes the parameter type (used in next loop) + // the first occurrence of the field describes the parameter type (used in next loop) if (value == "false") subObj[name] = false; // checkboxes may have only one field else subObj[name] = value; } else { diff --git a/wled00/udp.cpp b/wled00/udp.cpp index 0ea6d23d80..e5d6ecf7a0 100644 --- a/wled00/udp.cpp +++ b/wled00/udp.cpp @@ -45,7 +45,7 @@ void notify(byte callMode, bool followUp) //3: supports FX intensity, 24 byte packet 4: supports transitionDelay 5: sup palette //6: supports timebase syncing, 29 byte packet 7: supports tertiary color 8: supports sys time sync, 36 byte packet //9: supports sync groups, 37 byte packet 10: supports CCT, 39 byte packet 11: per segment options, variable packet length (40+MAX_NUM_SEGMENTS*3) - //12: enhanced effct sliders, 2D & mapping options + //12: enhanced effect sliders, 2D & mapping options udpOut[11] = 12; col = mainseg.colors[1]; udpOut[12] = R(col); @@ -365,7 +365,7 @@ void handleNotifications() //apply colors from notification to main segment, only if not syncing full segments if ((receiveNotificationColor || !someSel) && (version < 11 || !receiveSegmentOptions)) { - // primary color, only apply white if intented (version > 0) + // primary color, only apply white if intended (version > 0) strip.setColor(0, RGBW32(udpIn[3], udpIn[4], udpIn[5], (version > 0) ? udpIn[10] : 0)); if (version > 1) { strip.setColor(1, RGBW32(udpIn[12], udpIn[13], udpIn[14], udpIn[15])); // secondary color diff --git a/wled00/um_manager.cpp b/wled00/um_manager.cpp index b410891ca9..2fe44db96a 100644 --- a/wled00/um_manager.cpp +++ b/wled00/um_manager.cpp @@ -19,7 +19,7 @@ bool UsermodManager::handleButton(uint8_t b) { bool UsermodManager::getUMData(um_data_t **data, uint8_t mod_id) { for (byte i = 0; i < numMods; i++) { if (mod_id > 0 && ums[i]->getId() != mod_id) continue; // only get data form requested usermod if provided - if (ums[i]->getUMData(data)) return true; // if usermod does provide data return immediately (only one usermod can povide data at one time) + if (ums[i]->getUMData(data)) return true; // if usermod does provide data return immediately (only one usermod can provide data at one time) } return false; } diff --git a/wled00/util.cpp b/wled00/util.cpp index 7fe3d5040e..fb8b5e5968 100644 --- a/wled00/util.cpp +++ b/wled00/util.cpp @@ -231,7 +231,7 @@ void releaseJSONBufferLock() // extracts effect mode (or palette) name from names serialized string -// caller must provide large enough buffer for name (incluing SR extensions)! +// caller must provide large enough buffer for name (including SR extensions)! uint8_t extractModeName(uint8_t mode, const char *src, char *dest, uint8_t maxLen) { if (src == JSON_mode_names || src == nullptr) { diff --git a/wled00/wled.h b/wled00/wled.h index 6e9545be41..8d0a99c7cf 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -174,7 +174,7 @@ // ESP32-WROVER features SPI RAM (aka PSRAM) which can be allocated using ps_malloc() // we can create custom PSRAMDynamicJsonDocument to use such feature (replacing DynamicJsonDocument) // The following is a construct to enable code to compile without it. -// There is a code thet will still not use PSRAM though: +// There is a code that will still not use PSRAM though: // AsyncJsonResponse is a derived class that implements DynamicJsonDocument (AsyncJson-v6.h) #if defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM) && (defined(WLED_USE_PSRAM) || defined(WLED_USE_PSRAM_JSON)) // WLEDMM struct PSRAM_Allocator { @@ -443,7 +443,7 @@ WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(0); // output this WLED_GLOBAL int dmxEnablePin _INIT(0); #endif -WLED_GLOBAL uint16_t e131Universe _INIT(1); // settings for E1.31 (sACN) protocol (only DMX_MODE_MULTIPLE_* can span over consequtive universes) +WLED_GLOBAL uint16_t e131Universe _INIT(1); // settings for E1.31 (sACN) protocol (only DMX_MODE_MULTIPLE_* can span over consecutive universes) WLED_GLOBAL uint16_t e131Port _INIT(5568); // DMX in port. E1.31 default is 5568, Art-Net is 6454 WLED_GLOBAL byte e131Priority _INIT(0); // E1.31 port priority (if != 0 priority handling is active) WLED_GLOBAL E131Priority highPriority _INIT(3); // E1.31 highest priority tracking, init = timeout in seconds @@ -575,7 +575,7 @@ WLED_GLOBAL byte colNlT[] _INIT_N(({ 0, 0, 0, 0 })); // current nightligh WLED_GLOBAL unsigned long lastOnTime _INIT(0); WLED_GLOBAL bool offMode _INIT(!turnOnAtBoot); WLED_GLOBAL byte bri _INIT(briS); // global brightness (set) -WLED_GLOBAL byte briOld _INIT(0); // global brightnes while in transition loop (previous iteration) +WLED_GLOBAL byte briOld _INIT(0); // global brightness while in transition loop (previous iteration) WLED_GLOBAL byte briT _INIT(0); // global brightness during transition WLED_GLOBAL byte briLast _INIT(128); // brightness before turned off. Used for toggle function WLED_GLOBAL byte whiteLast _INIT(128); // white channel before turned off. Used for toggle function diff --git a/wled00/ws.cpp b/wled00/ws.cpp index d6acc53362..5f5bfd9e28 100644 --- a/wled00/ws.cpp +++ b/wled00/ws.cpp @@ -35,7 +35,7 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp { if (len > 0 && len < 10 && data[0] == 'p') { // application layer ping/pong heartbeat. - // client-side socket layer ping packets are unresponded (investigate) + // client-side socket layer ping packets are unanswered (investigate) client->text(F("pong")); return; }