Skip to content

Version 0.7.0

Compare
Choose a tag to compare
@dmadison dmadison released this 07 Dec 15:53
· 160 commits to master since this release
3c574a9

I have reworked the library back-end so that controller classes inherit directly from the communication class using an external (shared) data struct. This should make understanding the library's structure easier, and avoids some of the weird relationships that grew out of the multiple inheritance model.

User-Facing Changes:

  • Communications functions (connect, update, etc.) are now available on shared controller instances!
  • Request size now functions on a per-type basis. You can request 21 bytes from a Classic Controller and 6 bytes from a Nunchuk without having to call the setRequestSize function when the types change!
  • The Data type definition has been refactored as Shared. Any sketches built using multiple controller support a la ControllerName::Data will have to be refactored. See the MultipleTypes example.
  • Mini console controllers function perfectly as Classic Controllers and are supported as such. You can use the ClassicController class for any project that uses both Mini controllers (NES / SNES) and Classic Controllers.
  • NES Mini 3rd party / knockoff controller support has been added as an extension of the ClassicController class. You must call fixKnockoffData after each successful update to make the controllers work properly, in addition to the request size increase. See the NES controller examples.

Backend:

  • Split ExtensionController into ExtensionPort (comms) and ExtensionData (shared comms data).
  • Namespace guarded ExtensionPort and ExtensionData.
  • Public class definitions now use using statements instead of typedef.
  • Added protected setControlData function for modifying received register data (e.g. for NES knockoff support).