mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Handle no accelerometer
This commit is contained in:
@@ -202,7 +202,7 @@
|
|||||||
|
|
||||||
#ifdef MODEL_T55
|
#ifdef MODEL_T55
|
||||||
// T55 Hotplate is similar to Project-Argon, PCB heater + PT100 sensor but no current rolloff compensation
|
// T55 Hotplate is similar to Project-Argon, PCB heater + PT100 sensor but no current rolloff compensation
|
||||||
// Uses a HUB238 for PD negotiation like the S60P, also has a buzzer
|
// Uses a HUB238 for PD negotiation like the S60, also has a buzzer. Feels like designed to share with S60
|
||||||
// Hold back left button for "DFU"
|
// Hold back left button for "DFU"
|
||||||
|
|
||||||
#define VOLTAGE_DIV 460 // Default divider scaler
|
#define VOLTAGE_DIV 460 // Default divider scaler
|
||||||
@@ -225,11 +225,12 @@
|
|||||||
|
|
||||||
#define OLED_128x32
|
#define OLED_128x32
|
||||||
#define OLED_FLIP 1 // Mounted upside down
|
#define OLED_FLIP 1 // Mounted upside down
|
||||||
#define POW_PD_EXT 2
|
#define POW_PD_EXT 1 // Older HUB238
|
||||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
||||||
#define DEBUG_POWER_MENU_BUTTON_B 1
|
#define DEBUG_POWER_MENU_BUTTON_B 1
|
||||||
#define HAS_POWER_DEBUG_MENU
|
#define HAS_POWER_DEBUG_MENU
|
||||||
#define TEMP_NTC
|
#define TEMP_NTC
|
||||||
|
#define NO_ACCEL 1
|
||||||
#define I2C_SOFT_BUS_2 // For now we are doing software I2C to get around hardware chip issues
|
#define I2C_SOFT_BUS_2 // For now we are doing software I2C to get around hardware chip issues
|
||||||
#define OLED_I2CBB2
|
#define OLED_I2CBB2
|
||||||
#define FILTER_DISPLAYED_TIP_TEMP 4 // Filtering for GUI display
|
#define FILTER_DISPLAYED_TIP_TEMP 4 // Filtering for GUI display
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ TickType_t lastMovementTime = 0;
|
|||||||
// Order matters for probe order, some Acceleromters do NOT like bad reads; and we have a bunch of overlap of addresses
|
// Order matters for probe order, some Acceleromters do NOT like bad reads; and we have a bunch of overlap of addresses
|
||||||
void detectAccelerometerVersion() {
|
void detectAccelerometerVersion() {
|
||||||
DetectedAccelerometerVersion = AccelType::Scanning;
|
DetectedAccelerometerVersion = AccelType::Scanning;
|
||||||
|
#ifdef NO_ACCEL
|
||||||
|
setSettingValue(SettingsOptions::Sensitivity, 0);
|
||||||
|
DetectedAccelerometerVersion = AccelType::None;
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ACCEL_MMA
|
#ifdef ACCEL_MMA
|
||||||
if (MMA8652FC::detect()) {
|
if (MMA8652FC::detect()) {
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ OperatingMode showWarnings(const ButtonState buttons, guiContext *cxt) {
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 2: // Accelerometer detection
|
case 2: // Accelerometer detection
|
||||||
|
#ifdef NO_ACCEL
|
||||||
|
cxt->scratch_state.state1 = 3;
|
||||||
|
#else
|
||||||
if (DetectedAccelerometerVersion == AccelType::Scanning) {
|
if (DetectedAccelerometerVersion == AccelType::Scanning) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -49,6 +52,8 @@ OperatingMode showWarnings(const ButtonState buttons, guiContext *cxt) {
|
|||||||
} else {
|
} else {
|
||||||
cxt->scratch_state.state1 = 3;
|
cxt->scratch_state.state1 = 3;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user