-
Notifications
You must be signed in to change notification settings - Fork 119
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
slight improvement of autopilot #10
Conversation
the-zorro
commented
Dec 29, 2016
- undock support
- stoping script on arriving to station
- undock support - stoping script on arriving to station
Thanks for the PR, feel free to split it into multiple Commits/PRs as you see fit. I see some issues with merging commit f68bfea into master:
|
Host.Log("Arrived, stopping here"); | ||
goto loop; | ||
} else { | ||
Undock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand why the control flow for Undock
has been implemented this way:
Do we want to call Undock
multiple times? If not, what is the reason that the call to Undock
is contained in the loop block?
|
||
while(fly) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the fly
variable? Can this not be simplified by using the condition used below to assign to fly
as the looping condition?
All true. Just focusing more on getting it work and getting familiar with
the API than keeping it pretty. But I'll change it tonight.
One more thing. I'm not from .Net world, so I'm using IntelliJ Rider as my
IDE and it doesn't assume some assemblies are referenced by default. Do you
mind if my changes will include some of those assemblies (System.Runtime,
System.IO) into project files?
…On Dec 29, 2016 12:31 PM, "Michael Rätzel" ***@***.***> wrote:
I do not understand why the control flow for Undock has been implemented
this way:
Do we want to call Undock multiple times? If not, what is the reason that
the call to Undock is contained in the loop block?
Why the fly variable? Can this not be simplified by breaking out of the
loop as soon as the char is docked?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPKE_haq49x5Du5xLp76ROQ2-Ug07T8ks5rNBiQgaJpZM4LXW3p>
.
|
It depends on what is in those assemblies and what the benefit of including those would be. Where would other users get these assemblies from? |
I added second commit. I removed Undock method entirely and just placed undock code before the main loop. Script stopping is done by break instead of variable. "simple" version is reverted, mine is called Travel.zorro.cs |
Made a mistake, did not mean to approve all changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I try to build commit 0d9bf3b in Visual Studio 2015 it gives me those two compile errors:
Severity Code Description Project File Line Suppression State
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\Facades\System.IO.dll'. Remove one of the duplicate references. Sanderling K:\Source\Repos\Sanderling\src\Sanderling\Sanderling\CSC 1 Active
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\Facades\System.Runtime.dll'. Remove one of the duplicate references. Sanderling K:\Source\Repos\Sanderling\src\Sanderling\Sanderling\CSC 1 Active
Thus, it seems like the change breaks the build for users with Visual Studio 2015 and therefore can not be integrated into master.
I will look into setting up CI build to provide feedback for such problems faster in the future.
Interesting. Is there way to make it so that it will satisfy both tools? |
I don't know. |
After dozen tries it seems fixed by installing one of M$ development packs. I think it was 4.6.1. Now both m$build and my IDE can compile unmodified projects. |
I see that you added a commit. Since commit #0d9bf3b is still in this PR, I assume the PR is not complete yet. |
It's not complete. I found one thing I'd like to change in the autopilot script, but that other commits you see are probably from another branch. In that branch I've modified mining script a lot, but I'm not sure it's a good idea to include it into your releases. Let me know if you think otherwise. |
Let the bot finish the session when there is nothing left to do: Finish the session three minutes after the last activity was required. This condition also covers the case where the route led to docking in a station. See the feedback at Arcitectus/Sanderling#10 (comment)
The feature to stop the bot after docking is now implemented in the example autopilot bot at Viir/bots@8b7ca99 About the undocking feature: I am not sure this would be compatible with routes containing multiple stations: What would happen after the bot docks at the first station? In any case, bots are now located in the dedicated repository, at https://github.com/Viir/bots |