Skip to content

Kill Switch Controller (Arduino) #37

Description

@konnorandrews

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);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions