~gpcf/advtrains-discuss

7 2

train.door_open documentation where?

Details
Message ID
<GFT9ZV7Ma9tTcwbuBqGRdEXlQn65EjAzLyH7u1g8iEQFOSQOynVu9mVdpUTa4c-oOsu10_N05mzheFfvdZ82_0XOhglKKAgbb0S81UN5O3A=@protonmail.com>
DKIM signature
missing
Download raw message
I have noticed quite a big hole in my
portfolio: contributed to other git projects.  

I was initally considering adding to the
Linux Kernel so my code gets everywhere, but
decided against it seeing the size of the
source compared to free space on my disk (and
it'd probably be a security nightmare).  

I decided to work on Advtrains but do not know
how to use the train.door_open variable at
all and bananach space search only finds
commit log messages.  Where do i access
documentation for this variable?
Details
Message ID
<d39b70ca-bc93-3938-e8fd-82352a14b8be@forksworld.de>
In-Reply-To
<GFT9ZV7Ma9tTcwbuBqGRdEXlQn65EjAzLyH7u1g8iEQFOSQOynVu9mVdpUTa4c-oOsu10_N05mzheFfvdZ82_0XOhglKKAgbb0S81UN5O3A=@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
> I decided to work on Advtrains but do not know
> how to use the train.door_open variable at
> all and bananach space search only finds
> commit log messages.  Where do i access
> documentation for this variable?

1. What _exactly_ do you want to work on in Advtrains?
2. Considering that you have decided to work on Advtrains, why did you 
not consider looking into the source code and figuring it out yourself?
Details
Message ID
<M1y3d0VV7TA9BHQVZ2dpej4W2EG4etMO8OJakTNrxW6vBmpD90PTboM5XWP1QLn7gDU2K8OW20wki7tWtuVsbOXs4uaADAd0FslI8k39UB8=@protonmail.com>
In-Reply-To
<d39b70ca-bc93-3938-e8fd-82352a14b8be@forksworld.de> (view parent)
DKIM signature
missing
Download raw message
 
> 1. What exactly do you want to work
on in Advtrains?

Door indexes.

> 2. Considering that you have decided
to work on Advtrains, why did you
> not consider looking into the source
code and figuring it out yourself?

I did try to search but Windows
Explorer can't really explore as well
as it could, and i did mention that i
searched bananach.space, more
specifically for "door_open", which
brought up nothing.
Details
Message ID
<af4cbe5d-9a69-d3f5-1d63-b4e5728fbf74@forksworld.de>
In-Reply-To
<M1y3d0VV7TA9BHQVZ2dpej4W2EG4etMO8OJakTNrxW6vBmpD90PTboM5XWP1QLn7gDU2K8OW20wki7tWtuVsbOXs4uaADAd0FslI8k39UB8=@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
>> 1. What exactly do you want to work
>> on in Advtrains?
> 
> Door indexes.
> 
>> 2. Considering that you have decided
>> to work on Advtrains, why did you
>> not consider looking into the source
>> code and figuring it out yourself?
> 
> I did try to search but Windows
> Explorer can't really explore as well
> as it could, and i did mention that i
> searched bananach.space, more
> specifically for "door_open", which
> brought up nothing.

Why did you look at the commit log? Commit messages on Advtrains tend to 
be short, and implementation details are generally not described. It 
does not sound surprising to me at all that you did not find anything there.

Instead, I am quite sure that there is something sensible on Windows 
that is close to `grep -rn -C3` on Linux. IMO not being able to figure 
out how to search through a directory of text files is among the last 
reasons to not read the source code, and it is definitely not a reason 
if you want to actually work on Advtrains.

In any case, train.door_open is
* -1 if only the left door is open
* 0 if doors are closed
* 1 if only the right door is open

The direction is relative to the direction of the train.
Details
Message ID
<Nz7NwiKyQYWKOCrlqHI8fFud3F9v2veY6YsfTPPUj7dklQItytbgBiKgKXgXSBmrooNiimUilXDiH2_LeB3x5AhK8gcoqlzZUXRbOqKw3A8=@protonmail.com>
In-Reply-To
<af4cbe5d-9a69-d3f5-1d63-b4e5728fbf74@forksworld.de> (view parent)
DKIM signature
missing
Download raw message
> Why did you look at the commit log?

Bananach did. I used the search
function IN TREE VIEW and it still
thought it was a good idea to search
the commit log.

> Instead, I am quite sure that there
is something sensible on Windows
> that is close to `grep -rn -C3` on
Linux.

As soon as i get back to my linux
machine i'll have a look. 

> In any case, train.door_open is
> * -1 if only the left door is open
> * 0 if doors are closed
> * 1 if only the right door is open
> 
> The direction is relative to the
direction of the train.

Thanks. How would i limit it to a
specific number of carriages? Orwell [1]
did mention that there were functions
whih existed but i'm completely lost as
to where to look for functions based on
functionality.


[1] http://advtrains.de/wiki/doku.php?id=dev:proposals:door_indexes#t1649_0000_orwell
Details
Message ID
<b6cdef66-0406-4e20-6224-3b46e13da494@forksworld.de>
In-Reply-To
<Nz7NwiKyQYWKOCrlqHI8fFud3F9v2veY6YsfTPPUj7dklQItytbgBiKgKXgXSBmrooNiimUilXDiH2_LeB3x5AhK8gcoqlzZUXRbOqKw3A8=@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
>> Why did you look at the commit log?
> 
> Bananach did. I used the search
> function IN TREE VIEW and it still
> thought it was a good idea to search
> the commit log.

The search box has a dropdown beside it that says "log msg" by default, 
so I am not sure why you are surprised about this.

>> In any case, train.door_open is
>> * -1 if only the left door is open
>> * 0 if doors are closed
>> * 1 if only the right door is open
>>
>> The direction is relative to the
>> direction of the train.
> 
> Thanks. How would i limit it to a
> specific number of carriages? Orwell [1]
> did mention that there were functions
> whih existed but i'm completely lost as
> to where to look for functions based on
> functionality.
> 
> [1] http://advtrains.de/wiki/doku.php?id=dev:proposals:door_indexes#t1649_0000_orwell

You can't, until it is implemented.

Orwell wrote that "Advtrains has the functions and tools required to 
implement the position lookups you describe", not wagon-specific door 
status.

Considering that, on the same discussion page, you mentioned "[a] simple 
addition to an ATC command" to add door indices, I suppose it should be 
"simple" enough to figure out where and how to implement it.
Details
Message ID
<uLAF7gVj4bTFq4cjRpohlM-ba93UmjSCP6XbM8ZJXPNkPiWUvy-lPVky4HTxpAO2W-bR3Pj3-iKpRERv5zxcWD22TXFfXu6Og3ViaQNf1r8=@protonmail.com>
In-Reply-To
<b6cdef66-0406-4e20-6224-3b46e13da494@forksworld.de> (view parent)
DKIM signature
missing
Download raw message
> The search box has a dropdown beside
it that says "log msg" by default,
> so I am not sure why you are
surprised about this.

I did use it, but even the one most
likely, "range" seems to search
commits.


https://git.bananach.space/advtrains.git/log/?qt=range&q=door

> You can't, until it is implemented.
> 
> Orwell wrote that "Advtrains has the
functions and tools required to
> implement the position lookups you
describe", not wagon-specific door
> status.

Oh, ok, i guess my reading skills
aren't that great anymore because i
have stopped using English as much as i
used to.

> Considering that, on the same
discussion page, you mentioned "[a]
simple
> addition to an ATC command" to add
door indices, I suppose it should be
> "simple" enough to figure out where
and how to implement it.

Ok, you got me. I'm at home right now
and i'll add the "simple addition" soon.
Details
Message ID
<5d0983dd-f719-609a-3499-1fe762fa5d87@forksworld.de>
In-Reply-To
<uLAF7gVj4bTFq4cjRpohlM-ba93UmjSCP6XbM8ZJXPNkPiWUvy-lPVky4HTxpAO2W-bR3Pj3-iKpRERv5zxcWD22TXFfXu6Og3ViaQNf1r8=@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
>> The search box has a dropdown beside
>> it that says "log msg" by default,
>> so I am not sure why you are
>> surprised about this.
> 
> I did use it, but even the one most
> likely, "range" seems to search
> commits.

It seems like "range" searches for commits that belong to a branch or up 
to a tag.
>> Considering that, on the same
>> discussion page, you mentioned "[a]
>> simple
>> addition to an ATC command" to add
>> door indices, I suppose it should be
>> "simple" enough to figure out where
>> and how to implement it.
> 
> Ok, you got me. I'm at home right now
> and i'll add the "simple addition" soon.

By the way, the atcjit branch _might_ be helpful in some ways, although 
I can not say that for sure.
Reply to thread Export thread (mbox)