Motor doesn't stop when compressor stopped #6

Closed
opened 2026-03-21 16:59:46 +01:00 by namcho · 0 comments
Owner

When stopping the compressor via API, motor speed stays at ~1500 RPM instead of dropping to 0.\n\nRoot Cause: In CompressorEmulator.stop(), the physics engine's load_factor was never set to 0. The state machine transitioned to OFF but the physics kept running with the previous load_factor (e.g., 0.8).\n\nFix: Added physics.set_load_factor(0) in CompressorEmulator.stop() before setting _running=False.

When stopping the compressor via API, motor speed stays at ~1500 RPM instead of dropping to 0.\n\n**Root Cause:** In CompressorEmulator.stop(), the physics engine's load_factor was never set to 0. The state machine transitioned to OFF but the physics kept running with the previous load_factor (e.g., 0.8).\n\n**Fix:** Added physics.set_load_factor(0) in CompressorEmulator.stop() before setting _running=False.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
namcho/compressor-emulator#6
No description provided.