Skip to content

Remove Component base class #356

@lizlooney

Description

@lizlooney
  • Remove opmode_start, opmode_periodic, and opmode_end methods from external_samples python classes.
  • Instead, do stuff in their constructors (instead of opmode_start), create background thread (instead of opmode_periodic), and are closable (instead of opmode_end).
  • Put some kind of marker in the doc strings that indicates that the class represents a hardware device (what we've been calling a "component") that can be added to a robot.
  • Constructors should take arguments that are not just numbers. If there were classes that identified that a numeric value is actually a CAN port or a USB port, etc (similar to wpimath.units.milliseconds, but for types of ports on the Systemcore or Motioncore or ExpansionHub), then blocks would know how to generate code to instantiate the hardware device.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions