Skip to content

Commit

Permalink
Switch off MPU6050 per default (switch on in pio.ini)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudwijma committed Jun 23, 2024
1 parent ac271fe commit 8243577
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ build_flags =
-D STARBASE_DEVMODE
${ESPAsyncWebServer.build_flags}
${STARBASE_USERMOD_E131.build_flags}
${STARBASE_USERMOD_MPU6050.build_flags}
; ${STARBASE_USERMOD_MPU6050.build_flags}
; ${STARBASE_USERMOD_HA.build_flags}
lib_deps =
${ESPAsyncWebServer.lib_deps}
https://github.com/bblanchon/ArduinoJson.git#v7.0.3
; https://github.com/Jason2866/ESP32_Show_Info.git
${STARBASE_USERMOD_E131.lib_deps}
${STARBASE_USERMOD_MPU6050.lib_deps}
; ${STARBASE_USERMOD_MPU6050.lib_deps}
; ${STARBASE_USERMOD_HA.lib_deps}


Expand Down
12 changes: 9 additions & 3 deletions src/App/LedEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
#include "../User/UserModE131.h"
#endif

#include "../User/UserModMPU6050.h"
#ifdef STARBASE_USERMOD_MPU6050
#include "../User/UserModMPU6050.h"
#endif

//utility function
float distance(float x1, float y1, float z1, float x2, float y2, float z2) {
Expand Down Expand Up @@ -1934,7 +1936,9 @@ class ParticleTest: public Effect {
uint8_t speed = leds.sharedData.read<uint8_t>();
uint8_t numParticles = leds.sharedData.read<uint8_t>();
Coord3D vel = leds.sharedData.read<Coord3D>();
bool gyro = leds.sharedData.read<bool>();
#ifdef STARBASE_USERMOD_MPU6050
bool gyro = leds.sharedData.read<bool>();
#endif
bool debugPrint = leds.sharedData.read<bool>();

// Effect Variables
Expand Down Expand Up @@ -2021,7 +2025,9 @@ class ParticleTest: public Effect {
ui->initSlider (parentVar, "Speed", leds.sharedData.write<uint8_t>(1), 0, 30);
ui->initSlider (parentVar, "Number of Particles", leds.sharedData.write<uint8_t>(1), 1, 255);
ui->initCoord3D(parentVar, "Velocity", leds.sharedData.write<Coord3D>({0,0,0}), -1, 1);
ui->initCheckBox(parentVar, "Gyro", leds.sharedData.write<bool>(false));
#ifdef STARBASE_USERMOD_MPU6050
ui->initCheckBox(parentVar, "Gyro", leds.sharedData.write<bool>(false));
#endif
ui->initCheckBox(parentVar, "Debug Print", leds.sharedData.write<bool>(false));
}
};
Expand Down

0 comments on commit 8243577

Please sign in to comment.