Closed ste7anste7an closed 1 year ago
This is not needed. The size parameter in the mode strutcture can be any number (not rounded to power of 2). Only when the payload is created, the number of bytes that are send are rounded up to the next power of 2. This happens already in LPF2/lpf2_new.py in load_payload
https://github.com/antonvh/PUPRemote/blob/6acafcbe56bcd3a99f395b0d8c2eac0c18ed23ca/LPF2/lpf2_new.py#L117
https://github.com/antonvh/PUPRemote/blob/7cffd7331b237a5f96c6d25186238bdeab2b913b/LPF2/pupremote.py#L55
Round the size to the next power of 2. When working with two format strings for each direction, we should take the max of struct.calcsize of both format strings
Proposal: