ticalc-usb
ticalc-usb copied to clipboard
Add device.getDirectory
Adds a method to get the list of variables on a device.
This PR also adds support for receiving fragmented virtual packets and an expectAny method for receiving a virtual packet of unknown type.
It also makes several changes to parameter handling:
- Adds a public function for getting parameters from the device
- Allows non-numerical parameters to be constructed and destructed
- Fixes a bug in which an unrecognized parameter caused parsing to fail, as the code always expected a size to be provided, despite this not being the case when the device doesn't return a value for the parameter.
- Fixed a test case which relied on this bug
- Changed the return type of destructParameters to be an object rather than an array and to only include valid parameters
- Updated the test cases to use the new return format
I've only tested this on the CE, so it will probably need additional testing before being merged.