mpu6050 usermod: allow to disable usermod

* added usermod config information (so it can be disabled)
* check that "INTERRUPT_PIN" does support interrupts (MM specific)
* expose "dmpReady" in public interface
* adjusted games usermod to switch to "simulation" in case mpu6050 is not active

Still toDo:
1. add interrupt PIN and errormessages to settings page.
2. de-alloc intPin when disabled (and disable interrupt)
3. usermod is still destroying DEBUG_PRINT macros.
4. temporarily disable MPU interrupt when  onUpdateBegin(true)
This commit is contained in:
Frank
2023-03-14 20:52:48 +01:00
parent a0576ba591
commit 2de7971623
5 changed files with 94 additions and 28 deletions

View File

@@ -49,6 +49,7 @@ String PinManagerClass::getOwnerText(PinOwner tag) {
case PinOwner::UM_Audioreactive : return(F("AudioReactive (UM)")); break; // audioreative usermod - analog or digital audio input
case PinOwner::UM_Temperature : return(F("Temperature (UM)")); break; // "usermod_temperature.h"
case PinOwner::UM_PIR : return(F("PIR (UM)")); break; // "usermod_PIR_sensor_switch.h"
case PinOwner::UM_IMU : return(F("IMU mpu6050 (UM)")); break; // "usermod_mpu6050_imu.h"
case PinOwner::UM_FourLineDisplay : return(F("4Line Display (UM)")); break; // "usermod_v2_four_line_display.h -- May use "standard" HW_I2C pins
case PinOwner::UM_RotaryEncoderUI : return(F("Rotary Enc. (UM)")); break; // "usermod_v2_rotary_encoder_ui.h"
case PinOwner::UM_MultiRelay : return(F("Multi Relay (UM)")); break; // "usermod_multi_relay.h"

View File

@@ -41,7 +41,7 @@ enum struct PinOwner : uint8_t {
UM_Temperature = USERMOD_ID_TEMPERATURE, // 0x03 // Usermod "usermod_temperature.h"
// #define USERMOD_ID_FIXNETSERVICES // 0x04 // Usermod "usermod_Fix_unreachable_netservices.h" -- Does not allocate pins
UM_PIR = USERMOD_ID_PIRSWITCH, // 0x05 // Usermod "usermod_PIR_sensor_switch.h"
// #define USERMOD_ID_IMU // 0x06 // Usermod "usermod_mpu6050_imu.h" -- Uses "standard" HW_I2C pins
UM_IMU = USERMOD_ID_IMU, // 0x06 // Usermod "usermod_mpu6050_imu.h" -- Uses "standard" HW_I2C pins
UM_FourLineDisplay = USERMOD_ID_FOUR_LINE_DISP, // 0x07 // Usermod "usermod_v2_four_line_display.h -- May use "standard" HW_I2C pins
UM_RotaryEncoderUI = USERMOD_ID_ROTARY_ENC_UI, // 0x08 // Usermod "usermod_v2_rotary_encoder_ui.h"
// #define USERMOD_ID_AUTO_SAVE // 0x09 // Usermod "usermod_v2_auto_save.h" -- Does not allocate pins

View File

@@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2303130
#define VERSION 2303141
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG