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.