setSpeedFactor for animartrix
This commit is contained in:
@@ -925,7 +925,7 @@ lib_deps_M =
|
|||||||
OneWire@~2.3.5 ; used for USERMOD_FOUR_LINE_DISPLAY and USERMOD_DALLASTEMPERATURE
|
OneWire@~2.3.5 ; used for USERMOD_FOUR_LINE_DISPLAY and USERMOD_DALLASTEMPERATURE
|
||||||
olikraus/U8g2 @ ^2.28.8 ; used for USERMOD_FOUR_LINE_DISPLAY
|
olikraus/U8g2 @ ^2.28.8 ; used for USERMOD_FOUR_LINE_DISPLAY
|
||||||
ElectronicCats/MPU6050 @ 0.6.0 ; used for USERMOD_MPU6050_IMU
|
ElectronicCats/MPU6050 @ 0.6.0 ; used for USERMOD_MPU6050_IMU
|
||||||
https://github.com/netmindz/animartrix.git#d7c1896166f13fec2917c305222a77e3b504d060
|
https://github.com/netmindz/animartrix.git#65bcfc5410464fc9721dd13d11a0e29eaf7a94e5
|
||||||
|
|
||||||
lib_deps_V4_M =
|
lib_deps_V4_M =
|
||||||
;https://github.com/blazoncek/OneWire.git ; includes bugfixes for inconsistent readings
|
;https://github.com/blazoncek/OneWire.git ; includes bugfixes for inconsistent readings
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class ANIMartRIXMod:public ANIMartRIX {
|
|||||||
if (SEGENV.call == 0) {
|
if (SEGENV.call == 0) {
|
||||||
init(SEGMENT.virtualWidth(), SEGMENT.virtualHeight(), false);
|
init(SEGMENT.virtualWidth(), SEGMENT.virtualHeight(), false);
|
||||||
}
|
}
|
||||||
float speedFactor = map(source, 0, 255, 1, 100) / 10;
|
float speedFactor = map(SEGMENT.speed, 0, 255, 1, 100) / 10;
|
||||||
setSpeedFactor(speedFactor);
|
setSpeedFactor(speedFactor);
|
||||||
}
|
}
|
||||||
void setPixelColor(int x, int y, rgb pixel) {
|
void setPixelColor(int x, int y, rgb pixel) {
|
||||||
@@ -420,6 +420,7 @@ class AnimartrixUsermod : public Usermod {
|
|||||||
|
|
||||||
void addToJsonInfo(JsonObject& root)
|
void addToJsonInfo(JsonObject& root)
|
||||||
{
|
{
|
||||||
|
if(!enabled) return;
|
||||||
char myStringBuffer[16]; // buffer for snprintf()
|
char myStringBuffer[16]; // buffer for snprintf()
|
||||||
JsonObject user = root["u"];
|
JsonObject user = root["u"];
|
||||||
if (user.isNull()) user = root.createNestedObject("u");
|
if (user.isNull()) user = root.createNestedObject("u");
|
||||||
|
|||||||
Reference in New Issue
Block a user