Skip to content

Commit 5be2eb1

Browse files
committed
Drop logging around model id, accuracy etc.
1 parent 6de22b6 commit 5be2eb1

File tree

1 file changed

+0
-103
lines changed

1 file changed

+0
-103
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_MLX90632D.h

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -91,76 +91,21 @@ class WipperSnapper_I2C_Driver_MLX90632D : public WipperSnapper_I2C_Driver {
9191
WS_DEBUG_PRINTLN(F("Device reset failed"));
9292
return false;
9393
}
94-
WS_DEBUG_PRINTLN(F("Device reset: SUCCESS"));
95-
96-
uint64_t productID = _mlx90632->getProductID();
97-
WS_DEBUG_PRINT(F("Product ID: 0x"));
98-
WS_DEBUG_PRINT((uint32_t)(productID >> 32), HEX);
99-
WS_DEBUG_PRINTLN((uint32_t)(productID & 0xFFFFFFFF), HEX);
10094

10195
uint16_t productCode = _mlx90632->getProductCode();
102-
WS_DEBUG_PRINT(F("Product Code: 0x"));
103-
WS_DEBUG_PRINTLN(productCode, HEX);
104-
105-
uint16_t eepromVersion = _mlx90632->getEEPROMVersion();
106-
WS_DEBUG_PRINT(F("EEPROM Version: 0x"));
107-
WS_DEBUG_PRINTLN(eepromVersion, HEX);
108-
10996
// Decode product code bits
11097
uint8_t fov = (productCode >> 8) & 0x3;
11198
uint8_t package = (productCode >> 5) & 0x7;
11299
uint8_t accuracy = productCode & 0x1F;
113100

114-
WS_DEBUG_PRINT(F("FOV: "));
115-
WS_DEBUG_PRINTLN(fov == 0 ? F("50°") : F("Unknown"));
116-
117-
WS_DEBUG_PRINT(F("Package: "));
118-
WS_DEBUG_PRINTLN(package == 1 ? F("SFN 3x3") : F("Unknown"));
119-
120-
WS_DEBUG_PRINT(F("Accuracy: "));
121-
if (accuracy == 1) {
122-
WS_DEBUG_PRINTLN(F("Medical"));
123-
} else if (accuracy == 2) {
124-
WS_DEBUG_PRINTLN(F("Standard"));
125-
} else {
126-
WS_DEBUG_PRINTLN(F("Unknown"));
127-
}
128-
129-
// Set and get mode - choose one:
130-
WS_DEBUG_PRINTLN(F("\n--- Mode Settings ---"));
131101
if (!_mlx90632->setMode(MLX90632_MODE_CONTINUOUS)) {
132-
// if (!_mlx90632->setMode(MLX90632_MODE_STEP)) { // Uncomment
133-
// for step mode testing if
134-
// (!_mlx90632->setMode(MLX90632_MODE_SLEEPING_STEP)) { // Uncomment for
135-
// sleeping step mode testing
136102
WS_DEBUG_PRINTLN(F("Failed to set mode"));
137103
return false;
138104
}
139105

140-
// TODO: use Step mode?
141-
mlx90632_mode_t currentMode = _mlx90632->getMode();
142-
WS_DEBUG_PRINT(F("Current mode: "));
143-
switch (currentMode) {
144-
case MLX90632_MODE_HALT:
145-
WS_DEBUG_PRINTLN(F("Halt"));
146-
break;
147-
case MLX90632_MODE_SLEEPING_STEP:
148-
WS_DEBUG_PRINTLN(F("Sleeping Step"));
149-
break;
150-
case MLX90632_MODE_STEP:
151-
WS_DEBUG_PRINTLN(F("Step"));
152-
break;
153-
case MLX90632_MODE_CONTINUOUS:
154-
WS_DEBUG_PRINTLN(F("Continuous"));
155-
break;
156-
default:
157-
WS_DEBUG_PRINTLN(F("Unknown"));
158-
}
159-
160106
// set accuracy mode based on medical if detected
161107
if (accuracy == 1) {
162108
// Set and get measurement select (medical)
163-
WS_DEBUG_PRINTLN(F("\n--- Measurement Select Settings ---"));
164109
if (!extendedInsteadOfMedicalRange &&
165110
!_mlx90632->setMeasurementSelect(MLX90632_MEAS_MEDICAL)) {
166111
WS_DEBUG_PRINTLN(F("Failed to set measurement select to Medical"));
@@ -172,62 +117,14 @@ class WipperSnapper_I2C_Driver_MLX90632D : public WipperSnapper_I2C_Driver {
172117
F("Failed to set measurement select to Extended Range"));
173118
return false;
174119
}
175-
176-
mlx90632_meas_select_t currentMeasSelect =
177-
_mlx90632->getMeasurementSelect();
178-
WS_DEBUG_PRINT(F("Current measurement select: "));
179-
switch (currentMeasSelect) {
180-
case MLX90632_MEAS_MEDICAL:
181-
WS_DEBUG_PRINTLN(F("Medical"));
182-
break;
183-
case MLX90632_MEAS_EXTENDED_RANGE:
184-
WS_DEBUG_PRINTLN(F("Extended Range"));
185-
break;
186-
default:
187-
WS_DEBUG_PRINTLN(F("Unknown"));
188-
}
189120
}
190121

191122
// Set and get refresh rate (default to 2Hz)
192-
WS_DEBUG_PRINTLN(F("\n--- Refresh Rate Settings ---"));
193123
if (!_mlx90632->setRefreshRate(MLX90632_REFRESH_2HZ)) {
194124
WS_DEBUG_PRINTLN(F("Failed to set refresh rate to 2Hz"));
195125
return false;
196126
}
197127

198-
mlx90632_refresh_rate_t currentRefreshRate = _mlx90632->getRefreshRate();
199-
WS_DEBUG_PRINT(F("Current refresh rate: "));
200-
switch (currentRefreshRate) {
201-
case MLX90632_REFRESH_0_5HZ:
202-
WS_DEBUG_PRINTLN(F("0.5 Hz"));
203-
break;
204-
case MLX90632_REFRESH_1HZ:
205-
WS_DEBUG_PRINTLN(F("1 Hz"));
206-
break;
207-
case MLX90632_REFRESH_2HZ:
208-
WS_DEBUG_PRINTLN(F("2 Hz"));
209-
break;
210-
case MLX90632_REFRESH_4HZ:
211-
WS_DEBUG_PRINTLN(F("4 Hz"));
212-
break;
213-
case MLX90632_REFRESH_8HZ:
214-
WS_DEBUG_PRINTLN(F("8 Hz"));
215-
break;
216-
case MLX90632_REFRESH_16HZ:
217-
WS_DEBUG_PRINTLN(F("16 Hz"));
218-
break;
219-
case MLX90632_REFRESH_32HZ:
220-
WS_DEBUG_PRINTLN(F("32 Hz"));
221-
break;
222-
case MLX90632_REFRESH_64HZ:
223-
WS_DEBUG_PRINTLN(F("64 Hz"));
224-
break;
225-
default:
226-
WS_DEBUG_PRINTLN(F("Unknown"));
227-
}
228-
229-
// Clear new data flag before starting continuous measurements
230-
WS_DEBUG_PRINTLN(F("\\n--- Starting Continuous Measurements ---"));
231128
if (!_mlx90632->resetNewData()) {
232129
WS_DEBUG_PRINTLN(F("Failed to reset new data flag"));
233130
return false;

0 commit comments

Comments
 (0)