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

Kill Switch Controller (Arduino) #37

Open
6 of 11 tasks
konnorandrews opened this issue Apr 2, 2018 · 0 comments
Open
6 of 11 tasks

Kill Switch Controller (Arduino) #37

konnorandrews opened this issue Apr 2, 2018 · 0 comments
Assignees
Projects

Comments

@konnorandrews
Copy link
Member

konnorandrews commented Apr 2, 2018

Requirements

  • add void enable() to controller interface (this should allow movement)
  • add void disable() to controller interface (this should stop any movement)
  • added to submarine/utils/arduino/Hub/src/Controllers
  • implements the Controller interface
  • ignores all execute commands
  • attaches an interrupt handler
  • when an interrupt is called, an event should be sent to the interrupt handler using the provided hub
  • the event should be [ 3 /* interrupt id */, 1 /* new state */ ]
  • call disable() on all controllers when interrupt is disabled
  • call enable() on all controllers when interrupt is enabled
  • send an event on start

Other thoughts

#define BUTTON_1 8 // arduino pin numbers

#define INTERRUPT_HANDLER 10 // c++ system to send it to

auto controller = new Controllers::KillSwitch(BUTTON_1, INTERRUPT_HANDLER, controllersToStop);

// create Hub

controller.use(hub);

@konnorandrews konnorandrews added this to To Do in Kill Switch Apr 2, 2018
@konnorandrews konnorandrews changed the title Interrupt Controller (Arduino) Kill Switch Controller (Arduino) Apr 2, 2018
@TJonesy TJonesy self-assigned this Apr 17, 2018
@TJonesy TJonesy moved this from To Do to Waiting Review in Kill Switch May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Kill Switch
Waiting Review
Development

No branches or pull requests

2 participants