1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 01:35:28 +03:00

More coderabbit ...

This commit is contained in:
Mark Haslinghuis 2025-06-12 23:15:49 +02:00
parent 6a06ca1ed1
commit b218963680
2 changed files with 4 additions and 4 deletions

View file

@ -156,7 +156,7 @@ export class MSPQueueMonitor {
* Check for alert conditions * Check for alert conditions
*/ */
_checkAlerts() { _checkAlerts() {
const queueSize = this.msp.callbacks.length; const queueSize = this.msp.callbacks?.length ?? 0;
// Queue full alert // Queue full alert
const wasQueueFull = this.alerts.queueFull; const wasQueueFull = this.alerts.queueFull;
@ -607,7 +607,7 @@ export class MSPQueueMonitor {
} }
// Clear instrumentation flag // Clear instrumentation flag
delete this.msp._mspQueueMonitorInstrumented; this.msp._mspQueueMonitorInstrumented = undefined;
this.listeners = []; this.listeners = [];

View file

@ -92,10 +92,10 @@ export class MSPStressTest {
} }
this.monitor.stopMonitoring(); this.monitor.stopMonitoring();
this.monitor.destroy(); // Clean up MSP method patches and restore original behavior
this.testResults = results; this.testResults = results;
const report = this.generateTestReport(results); const report = this.generateTestReport(results);
// Now its safe to tear the monitor down
this.monitor.destroy();
console.log("\n📊 Stress Test Suite Complete"); console.log("\n📊 Stress Test Suite Complete");
console.log(report.summary); console.log(report.summary);