Version 0.7.0
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 asShared
. Any sketches built using multiple controller support a laControllerName::Data
will have to be refactored. See theMultipleTypes
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 callfixKnockoffData
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
intoExtensionPort
(comms) andExtensionData
(shared comms data). - Namespace guarded
ExtensionPort
andExtensionData
. - Public class definitions now use
using
statements instead oftypedef
. - Added protected
setControlData
function for modifying received register data (e.g. for NES knockoff support).