Releases: dmadison/NintendoExtensionCtrl
Version 0.8.3
New Features:
ExtensionPort
now includes a linked list for all associated controller instances. Users no longer have to write their ownconnect()
function when using multiple controller types within the same program (see the MultipleTypes example) (#71)
User-Facing Changes:
- Created a new function,
getExpectedType()
, which returns the controller type expected by the class
Backend Changes:
ExtensionData
is no longer in the global namespace, having been supplanted byExtensionPort
since 0.7.1- All
_Shared
classes now use theBase
suffix, as they lack the 'shared' properties assembled elsewhere - Include guards are now capitalized to indicate that they're preprocessor constants
Bugfixes:
printDebug
buffers can fit worst-case scenario integers without overflowing (previously caused warnings with SAMD core) (#70)- Fixed a potential initialization order issue when using extension data as a class member
- Fixed
ExtensionPort
anduDrawTablet
keyword highlighting
Version 0.8.2
Bugfixes:
- Fixes an initialization issue with some third party Classic Controller models (#68)
Version 0.8.1
New Features:
- The
ClassicController
class should now work out of the box with most third party Classic Controller variations without any extra user configuration.
User-Facing Changes:
- Analog controls for the Classic Controller now use a full byte (0-255) regardless of mode. This will break programs that use the old data ranges!
- Controller-specific I²C functions (read/write) are now publicly accessible.
- Added a
readRegister
I²C function
Backend Changes:
ClassicController
will now always attempt to initialize in "high resolution" mode.- Changes to the
ClassicController
data mode are now verified by reading the updated control data.
Version 0.8.0
New Controllers Supported:
New Features:
- The Classic Controller now supports "high resolution" mode: 8 bits for every analog input. (#62)
- You can now use the
controllerTypeMatches()
function to check if the connected controller matches the controller class.
User-Facing Changes:
connect()
no longer performs a control data update. Callupdate()
before attempting to read controller data.- The confusing
reconnect()
function has been deprecated and removed. Useconnect()
instead. - The
isThirdParty
andfixThirdParty
functions for the NES Mini controller have been removed. TheNESMiniController
class now supports these mappings automatically as part of the Classic Controller's "high resolution" mode. - Data request size is now shared across grouped controller instances.
- Data request size is now handled by the library automatically and reset on connection.
- Programs using shared data instances with
ExtensionPort
must now call a virtualspecificInit()
to finish initialization for certain controllers (Drawsome Tablet, NES Mini, SNES Mini). See the MultipleTypes example for reference.
Back-End Changes
CtrlIndex
has been refactored asIndexMap
for better conformity to the other mapping typenames.- The I²C functions have been moved into the
ExtensionController
class. These are available as both static and protected member functions, allowing derived controller types to write and read arbitrary data from the controller. - I²C conversion delays now happen at the write level instead of during data read. If a delay isn't needed this can be overriden in the function arguments.
- Controllers can now do controller-specific initialization using the virtual
specificInit()
function. This is called at the end of a successfulconnect()
. - The namespace-scoped
identifyController()
function has been refactored asdecodeIdentity()
to avoid confusion with the class-scopedidentifyController()
function.
Bugfixes:
- The Classic Controller's trigger button keywords (
buttonL
/buttonR
) have been fixed. - Classic Controllers should no longer misidentify as "Unknown Controller" if the microcontroller is reset during communication.
Big thanks to @nullstalgia for adding support for the drawing tablets, and for introducing me to the "high resolution" mode for the Classic Controller.
Version 0.7.4
User-Facing Changes:
- For the DJ Hero turntable, the
crossfadeSlider()
function now reports an unsigned value (0-15) instead of a signed value (-8-7) to be more consistent with other control functions in the library.
This release will break any sketches that use the DJ turntable controller with the crossfadeSlider()
function.
Version 0.7.3
User-Facing Changes:
- The functions to support non-Nintendo brand NES controllers have been refactored:
isKnockoff()
is nowisThirdParty()
fixKnockoffData()
is nowfixThirdPartyData()
- The ID check for
fixThirdPartyData()
can now be forcibly overridden by passingtrue
as an argument. This will corrupt data for other controllers, so use with caution. - The 8BitDo wireless receiver is now supported as a third party NES controller
- Added a
getRequestSize()
function
This release will break any sketches using the NES "knockoff" check and repair functions. You must update those lines to use the new function names in order to fix the errors.
Version 0.7.2
Bugfixes:
- Fixes the public-facing I²C reference by making it a function that returns a reference rather than a public member.
Existing code that uses the public I²C reference stored in the class will need to be refactored to include parentheses.
Version 0.7.1
User-Facing Changes:
ExtensionController
has been renamed toExtensionPort
. If you're using a generic object or multiple controller types in a shared data configuration you will need to rename them.ExtensionPort
has been renamed back toExtensionController
(pre-0.7.0) and is accessible outside of the namespace for building type-agnostic classes for extension controllers.
This will break compatibility with existing programs if you're referencing either of these two classes.
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).
Version 0.6.2
Adds support for 3rd party NES Mini controllers.
Bugfixes:
- Fixes SNES DebugPrint example sketch to use SNES class instead of NES (typo)