NetLogo / GoGo-RXTX-Extension

NetLogo extension for controlling a GoGo board. bundled with NetLogo
4 stars 2 forks source link

Add GoGoSense Compatibility #5

Closed MinasTyuru closed 12 years ago

MinasTyuru commented 12 years ago

The GoGoSense project is a project to expand the capabilities of the GoGo Board. This commit adds a command to NetLogo called "msensor." This requests an extended sensor value from the GoGo Board or independent GoGoSense board (which can connect to NetLogo directly, or connect to the GoGo Board).

The sensor request is sent in the form [out header] 0b11100000 [sensor number high byte] [low byte]. 0b11100000 does not collide with any of the commands listed in the GoGo Board serial protocol. The connected board responds with [in header] [sensor value high byte] [low byte], in the same way as it would reply to a normal sensor request.

This commit does not yet support burst mode for the extended sensor bank.

This commit also contains debug code. Each instance of GoGoController has a public String, debugText. Various methods append output to this string: specifically, when a method is waiting for input from the GoGo Board, it writes "[description of expected input]_[received input as hex string] ." For example, when waiting for the first reply header, "RH1_0xFF " could be appended to the string. Users can access the string with the command gogo:debug, and clear it with gogo:clear.

TheBizzle commented 12 years ago

Alright, everything seems to be operating correctly. However, I apologize but I'm going to have to keep dragging this process out more and more for you; I'm declining this pull request and requesting that you to make some changes before submitting a new pull request–but don't worry; you're almost there!

Things That Need Addressing

Code Style
Debugging Functionality
API Design


--Jason

TheBizzle commented 12 years ago

Alright, looks like you caught both of the things I was about to nag you about before I could get a chance to do so. I'll merge it in. Thank you for your patience and efforts.

MinasTyuru commented 12 years ago

No problem, thanks for the help!