Ignore zero-length PDO mappings when looking up objects.
Ignore zero-length PDO mappings when looking up objects.

If for whatever reason a mapping entry must be created with zero
length, don't consider it valid when accessing a PDO member by name.
Check if the length is non-zero in canopen.pdo.Map.__getitem__().

Background: Although such mappings should be discarded in read(), for
some devices it is necessary to include them when sending PDO
mappings.  The one this was tested with has a fixed number of eight
entries, corresponding to each PDO data byte.  Mapping e.g. 16-bit
variables is done by entering the object index twice, with subindex 00
and 01, respectively.  The actual bit length parameter is then
disregarded.

So for this library, an entry with length=16 and subindex=00 works
normally and second entry with length=0 and subindex=01 does not hurt.
The device gets both mappings when calling save(), though.

Note that such overriding of the subindex=01 in an entry for basic
integer types is non-standard and currently not yet supported in this
library.

christiansandberg/canopen,christiansandberg/canopen