post-merge changes

reconciling disagreements between MM and AC source code
This commit is contained in:
Frank
2022-12-06 16:07:12 +01:00
parent 3160a0b090
commit 191bbf93f3
5 changed files with 8 additions and 5 deletions

View File

@@ -6128,7 +6128,7 @@ uint16_t mode_2DWaverly(void) {
long t = millis() / 2;
for (int i = 0; i < cols; i++) {
uint16_t thisVal = volumeSmth*SEGMENT.intensity/64 * inoise8(i * 45 , t , t)/64;
uint16_t thisVal = volumeSmth*SEGMENT.intensity/64 * inoise8(i * 45 , t , t)/64; // WLEDMM back to SR code
uint16_t thisMax = map(thisVal, 0, 512, 0, rows);
for (int j = 0; j < thisMax; j++) {

View File

@@ -58,6 +58,7 @@ String PinManagerClass::getOwnerText(PinOwner tag) {
case PinOwner::UM_BME280 : return(F("BME280 (UM)")); break; // "usermod_bme280.h" -- Uses "standard" HW_I2C pins
case PinOwner::UM_BH1750 : return(F("BH1750 (UM)")); break; // "usermod_bh1750.h" -- Uses "standard" HW_I2C pins
case PinOwner::UM_SdCard : return(F("SD-Card (UM)")); break; // "usermod_sd_card.h" -- Uses SPI pins
case PinOwner::UM_PWM_OUTPUTS : return(F("PWM Output (UM)")); break; // "usermod_pwm_outputs.h"
case PinOwner::UM_Example : return(F("example (UM)")); break; // unspecified usermod
case PinOwner::UM_Unspecified : return(F("usermod (UM)")); break; // unspecified usermod
@@ -497,7 +498,6 @@ bool PinManagerClass::isPinOk(byte gpio, bool output)
PinOwner PinManagerClass::getPinOwner(byte gpio) {
if (gpio >= WLED_NUM_PINS) return PinOwner::None; // catch error case, to avoid array out-of-bounds access
if (!isPinOk(gpio, false)) return PinOwner::None;
if (gpio >= WLED_NUM_PINS) return PinOwner::None; // WLEDMM: catch error cases
return ownerTag[gpio];
}

View File

@@ -74,7 +74,7 @@ class PinManagerClass {
#define WLED_NUM_PINS 50
uint8_t pinAlloc[7] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; //WLEDMM bugfix - 56bit, 1 bit per pin, we use 50 bits on -S3
uint8_t ledcAlloc[2] = {0x00, 0x00}; //16 LEDC channels
PinOwner ownerTag[WLED_NUM_PINS] = { PinOwner::None }; // WLEDMM bugfix - new MCU's have up to 50 GPIO
PinOwner ownerTag[WLED_NUM_PINS] = { PinOwner::None }; // new MCU's have up to 50 GPIO
PinOwner ownerConflict[WLED_NUM_PINS] = { PinOwner::None }; // WLEDMM: record pin alloc conflicts
#endif
struct {

View File

@@ -176,8 +176,11 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
btnPin[i] = -1;
pinManager.deallocatePin(hw_btn_pin,PinOwner::Button);
} else { // WLEDMM end
if (disablePullUp) {
pinMode(btnPin[i], INPUT);
} else {
pinMode(btnPin[i], buttonType[i]==BTN_TYPE_PUSH_ACT_HIGH ? INPUT_PULLDOWN : INPUT_PULLUP);
}
} }
#else
pinMode(btnPin[i], INPUT_PULLUP);
#endif

View File

@@ -45,7 +45,7 @@ void handleUpload(AsyncWebServerRequest *request, const String& filename, size_t
request->_tempFile = WLED_FS.open(finalname, "w");
DEBUG_PRINT(F("Uploading "));
DEBUG_PRINTLN(finalname);
if (finalname.equals("/presets.json")) presetsModifiedTime = toki.second(); // WLEDMM
if (finalname.equals("/presets.json")) presetsModifiedTime = toki.second();
}
if (len) {
request->_tempFile.write(data,len);