Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix for Precharge Contactor Handling in SHUTDOWN_REQUESTED State and Web Interface Enhancement for Contactor Status Display #584

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

amarofarinha
Copy link
Collaborator

What

This PR addresses a bug fix and introduces a new feature in the Battery Emulator project. The bug affects the handling of precharge contactor in the SHUTDOWN_REQUESTED state, and the feature adds enhanced visibility to contactor states in the web interface.

Why

When the battery emulator reaches the MAX_ALLOWED_FAULT_TICKS limit, it enters the SHUTDOWN_REQUESTED state. However, an issue in the handle_contactors introduced on equipment stop functionality code was allowing the system to immediately transition to a DISCONNECTED state. This bypassed the proper shutdown sequence, causing the precharge contactor to remain in a HIGH state. Additionally, providing visibility into the states of all contactors (precharge, negative, and positive) in the web interface allows users to better monitor and diagnose the system status.

How

The bug fix ensures that, when the system enters the SHUTDOWN_REQUESTED state, equipment_stop_active is also set to true, ensuring the contactors follow the intended shutdown sequence. Furthermore, the web interface has been updated to display the states of all key contactors (precharge, negative, and positive), giving users clear, real-time insight into their statuses directly from the webserver interface.

…and Web Interface Enhancement for Contactor Status Display
@amarofarinha
Copy link
Collaborator Author

Starting:
image

Precharge off:
image

Error. all off:
image

Copy link
Owner

@dalathegreat dalathegreat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean fix! Thanks @amarofarinha !

@amarofarinha amarofarinha merged commit d3bee5b into dalathegreat:main Nov 3, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants