Merge branch 'main' into pixart

This commit is contained in:
Blaz Kristan 2023-01-20 16:23:51 +01:00
commit 2b8d8d4e9c
3 changed files with 4 additions and 4 deletions

View File

@ -383,9 +383,9 @@ class UsermodTemperature : public Usermod {
void appendConfigData()
{
oappend(SET_F("addInfo('")); oappend(SET_F(FPSTR(_name))); oappend(SET_F(":")); oappend(SET_F(FPSTR(_parasite)));
oappend(SET_F("addInfo('")); oappend(String(FPSTR(_name)).c_str()); oappend(SET_F(":")); oappend(String(FPSTR(_parasite)).c_str());
oappend(SET_F("',1,'<i>(if no Vcc connected)</i>');")); // 0 is field type, 1 is actual field
oappend(SET_F("addInfo('")); oappend(SET_F(FPSTR(_name))); oappend(SET_F(":")); oappend(SET_F(FPSTR(_parasitePin)));
oappend(SET_F("addInfo('")); oappend(String(FPSTR(_name)).c_str()); oappend(SET_F(":")); oappend(String(FPSTR(_parasitePin)).c_str());
oappend(SET_F("',1,'<i>(for external MOSFET)</i>');")); // 0 is field type, 1 is actual field
}

View File

@ -184,7 +184,7 @@ class MultiRelay : public Usermod {
*/
MultiRelay() {
const int8_t defPins[] = {MULTI_RELAY_PINS};
for (int i=0; i<MULTI_RELAY_MAX_RELAYS; i++) {
for (size_t i=0; i<MULTI_RELAY_MAX_RELAYS; i++) {
_relay[i].pin = i<sizeof(defPins) ? defPins[i] : -1;
_relay[i].delay = 0;
_relay[i].mode = false;

View File

@ -4851,7 +4851,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
for (int y = 0; y < rows; y++) for (int x = 0; x < cols; x++) prevLeds[XY(x,y)] = CRGB::Black;
memset(crcBuffer, 0, sizeof(uint16_t)*crcBufferLen);
} else if (strip.now - SEGENV.step < FRAMETIME_FIXED * map(SEGMENT.speed,0,255,64,4)) { // warning: comparison between signed and unsigned integer expressions
} else if (strip.now - SEGENV.step < FRAMETIME_FIXED * (uint32_t)map(SEGMENT.speed,0,255,64,4)) {
// update only when appropriate time passes (in 42 FPS slots)
return FRAMETIME;
}