Marker Constants Mismatch

9 views
Skip to first unread message

Peter Law

unread,
Nov 9, 2015, 6:43:48 PM11/9/15
to srobo...@googlegroups.com
Hi,

In the srobo-game thread about the game rules [1] I wrote:
>> Unless there are any objections I'll work on docs patches which match
>> this. The full API I'll work to is thus:
>>
>> marker_type: one of:
>> * MARKER_ARENA,
>> * MARKER_ROBOT,
>> * MARKER_TOP,
>> * MARKER_BOTTOM, or
>> * MARKER_SIDE
>>
>> token_net: one of:
>> * None, # for arenas and robots
>> * NET_A,
>> * NET_B, or
>> * NET_C

Rob wrote:
> I am implementing this right now in sr-robot, and will be shipping it almost
> immediately.

Unfortunately when I then implemented the pyenv-dummy and docs
changes, I used MARKER_TOKEN_TOP, MARKER_TOKEN_SIDE And
MARKER_TOKEN_BOTTOM. I've no idea why this happened, and I thought at
the time I'd checked that I was using the right names. However it
happened, it also managed to slip through review.

The result of this is that the constants in the docs and IDE are
different to those which the students will see on the robot.

I think there are basically the following solutions:
* Modify the docs and IDE and hope that no teams already have code
which uses the constants
* Modify sr-robot to support both sets of constants
* Modify sr-robot to use the documented constants

I'm in favour of the second option. It allows people to use the
documented constants [2] while also not breaking anyone who's worked
out what the constants really are.

To this end I've submitted g:2584 which implements the second option.

Thanks,
Peter

[1] https://groups.google.com/d/msg/srobo-game/-m845hF2Ar0/mPfNJbknBgAJ
[2] Which I actually prefer as it's more explicit

g:2584 https://www.studentrobotics.org/gerrit/2584
Reply all
Reply to author
Forward
0 new messages