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

SensorArray class #10

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

SensorArray class #10

wants to merge 3 commits into from

Conversation

LinnierGames
Copy link
Member

@LinnierGames LinnierGames commented Dec 31, 2016

closes #4

Okay, so kinda just pulled this out of my ass and not sure if it's set up right to work with the project.

Additions

  • SensorArray constructor takes an array of pin values from left to right, or -1 to 1 adding to a SensorsArray list. This list index from head, but inserts new nodes from the tail. Thus, you index from 0 to the last node, which is the tail.
  • Sensor node each holds the pin number, position in relation to -1 to 1, and the instance of the sensor instance (which is left in comments)

@blhough
Copy link
Member

blhough commented Jan 1, 2017

FYI this is a linked list not an array.
I think an array implementation would be more efficient and simpler

@LinnierGames
Copy link
Member Author

:P true I guess i could have made a struct that a vector keeps track of in case we wanted to store more than just a sensor object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants