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

Medical Statemachine - Fix locality EH breaking current state #7136

Merged
merged 3 commits into from
Sep 28, 2019

Conversation

PabstMirror
Copy link
Contributor

Fix #7126
Problems from PR #6950

On locality change we have to do something to make sure state machine is in correct state
But I didn't realize how local EH actually works and each time a new client connected it was sending locality transfer events

This PR just uses the existing vars to determine state locally.

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Aug 12, 2019
@PabstMirror PabstMirror added this to the Medical Rewrite milestone Aug 12, 2019
@commy2
Copy link
Contributor

commy2 commented Aug 12, 2019

Can you explain how the Local event works with JIP etc?

@PabstMirror
Copy link
Contributor Author

PabstMirror commented Aug 13, 2019

z1 (server):
localityChangedEH: _unit=z2, _isLocal=false

z2 (on init or jip):
localityChangedEH: _unit=z2, _isLocal=false
localityChangedEH: _unit=z1, _isLocal=false
localityChangedEH: _unit=t1, _isLocal=false
2 frames later: localityChangedEH: _unit=z2, _isLocal=true

So anytime somone jipped, it was sending a event with the Default state

};
} else {
/*
// Not sure if this is even needed, idea is that on locality transfer we broadcast more up to date info
Copy link
Member

@TheMagnetar TheMagnetar Sep 4, 2019

Choose a reason for hiding this comment

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

I think this should be the case in order to send the latest information, specially if the medical states vary between clients (you have a completely different medical state and some information may be even lost). In any case, it should be done before doing a manual transition to a particular state in my opinion.

@PabstMirror PabstMirror merged commit b8c45c0 into master Sep 28, 2019
@PabstMirror PabstMirror deleted the bigDumb branch September 28, 2019 20:52
@PabstMirror PabstMirror modified the milestones: Medical Rewrite, 3.13.0, 3.13.0-temp2 Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unconscious Issues (Not waking up, bugged wakeup)
5 participants