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] "bug-ish": the third scan of a bio resets the "Distance to Scan 2" position to itself #37

Closed
Tracked by #39
slippycheeze opened this issue Jan 8, 2023 · 3 comments · Fixed by #40
Closed
Tracked by #39
Assignees
Labels
bug Something isn't working
Milestone

Comments

@slippycheeze
Copy link
Contributor

Describe the bug
I wasn't sure if I should even file this as a bug, but: the third scan of any biological target will reset the "Distance to Scan 2" marked to point to itself. That also turns the text red, because it is now within a couple of meters.

Then, a short while later, the sample is fully processed, and the distance markers clear. So the red text vanishes, and the problem goes away.

Note: I actually decided to file this, finally, after I twice got fooled by this sequence of events:

  1. perform the third scan on something.
  2. notice the red text for scan 2.
  3. immediately jump in the SRV, cancelling the animation for the final sample processsing.
  4. drive 1,500m and hunt around for a few minutes to find my third sample.
  5. pull out my sample tool, and see it go into the "finishing sampling process" animation.
  6. scan 3/3 is recorded and the distance clears.

...yeah, I genuinely forgot I had already gotten two scans of something in the time it took me to find the third sample. These are usually things like bacteria or osseus where the "high density" populations are 1.0 to 1.5KM apart or more, and I'm doing this on SRV/foot. It is surprisingly easy to get distracted and lose state when this is the third or fourth sample in a row on a planet. (well, for me.)

To Reproduce
Steps to reproduce the behavior:

  1. Sample any biological thing, twice, to get to 2/3 samples.
  2. Find a third instance, at a good sampling range from the other two.
  3. Observe that "distance to scan 1, and 2" are both green.
  4. perform bio sample 3/3.
  5. observe that distance to sample 2 goes red briefly, while the sampling process works through

Expected behavior
the 3/3 sample shouldn't overwrite the 2/3 sample location.

Screenshots
if necessary I'll reproduce this and supply them, but I didn't grab any.

Desktop (please complete the following information):

  • OS: windows 11
  • AST Version: all since the colour changed for distance to scan X; I think before that too, but I never noticed.
  • EDMC Version: 5.7.0
@slippycheeze slippycheeze added the bug Something isn't working label Jan 8, 2023
@slippycheeze slippycheeze changed the title [BUG] "bug-ish": the third scan of a bio resets the "Distance to Scan #2" position to itself [BUG] "bug-ish": the third scan of a bio resets the "Distance to Scan 2" position to itself Jan 8, 2023
@Balvald
Copy link
Owner

Balvald commented Jan 8, 2023

This one is due to the third sample first gives us a second "Sample" Scantype event and then the "Analysis" Scantype event. Essentially this behavious is in the plugin since the CCR functionality was added which should be since v0.2.0

This means I gotta differentiate between the first "Sample" Scantype event and the second one.
So when encountering a "Sample" Scantype event I need to check if we are on the same body and if it is the same plant as the one currently logged as the last plant. needs #35 to be fixed before I do this one, if the name doesn't update because I wrecked that one in 0.2.4 which it reportandly doesn't.

Adding to this. I should do something aswell on any encounter of "Sample" Scantype event when I recognize that it is not the same species on the same body as already logged: Then it should update the coordinates of the first scan to [None, None] as in this case the user has skipped the first scan "Log" with the plugin by not using it. That way it won't show wrong information after any "Sample" Scantype event

@Balvald Balvald self-assigned this Jan 8, 2023
@Balvald Balvald added this to the v0.2.5 milestone Jan 8, 2023
@Balvald
Copy link
Owner

Balvald commented Jan 8, 2023

For the peculiar case that the plugin misses the first "sample" scantype event

(as in user does the first scan. progress 1/3. closes edmc, does the second scan, progress still 1/3 cuz plugin is not active. opens it again then does the third one. progress 2/3 have to assume its the second scan only to get analysis right after which fixes the progress to its rightful 3/3)

we'll end up doing it anyway and there'll be no way around it as we cannot properly differentiate at that time if it would be the first (scan progress 2/3) or the second (progress 3/3 with the analysis event right after) "sample" scantype event.

we only know for sure that its 3/3 when we get the "analysis" scantype event and that one only gets written into the journal once the "finishing sampling process" animation starts.

Essentially I'll deem this fixed when it's reduced to happening only in the above mentioned case.

@Balvald
Copy link
Owner

Balvald commented Jan 8, 2023

Tidbit thats only loosely connected: its possible to have all samples and then throw them all away
by getting that 3rd scan,
immediately going to the srv
drive to next plant and get out of srv
then directly when pulling the scanner out you instead try to scan a new species and it overwritten

In this case we get a "Log" Scantype event l ahead of the "Analysis" Scantype event for the old samples thus throwing them away.

Balvald added a commit that referenced this issue Jan 8, 2023
this should implement something that'll fix #37

also again redo the fix for #35 because I unknowingly removed the commit with the
SHA: 4276c39
out of the repos history while rebasing.
So it's changes are again found in here.
Balvald added a commit that referenced this issue Jan 8, 2023
What was missing:

In "Log" scantype event did not clear the scan 2 pos distance string.
since after "Log" we only have distance 1.

didn't use the proper last_scan_plant string (have to split it because of #29 ) didn't do that before was resetting distance 1 without showing everytime before I changed this. Also forgot to clear the string variable.

Though I needed to adjust the case for when to update the distances.
Might be doing nothing since on "1/3" plugin.AST_scan_2_pos_vector[0] will always be None.
atleast now it properly checks for plugin.AST_scan_2_pos_vector.

extended line in the preferences menu.
no string or other ui element in there should be longer than line.

readme updated so that the "new" features are not really new since they've been in two prior releases. with varying ways of them working.

demoted all the logger.info calls in journalcrawler.py to logger.debug.
@Balvald Balvald closed this as completed in 8e3b401 Jan 8, 2023
Balvald added a commit that referenced this issue Jan 8, 2023
What was missing:

In "Log" scantype event did not clear the scan 2 pos distance string.
since after "Log" we only have distance 1.

didn't use the proper last_scan_plant string (have to split it because of #29 ) didn't do that before was resetting distance 1 without showing everytime before I changed this. Also forgot to clear the string variable.

Though I needed to adjust the case for when to update the distances.
Might be doing nothing since on "1/3" plugin.AST_scan_2_pos_vector[0] will always be None.
atleast now it properly checks for plugin.AST_scan_2_pos_vector.

extended line in the preferences menu.
no string or other ui element in there should be longer than line.

readme updated so that the "new" features are not really new since they've been in two prior releases. with varying ways of them working.

demoted all the logger.info calls in journalcrawler.py to logger.debug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants