i started a while ago to implement that as well but did not finish yet. Please find attached my implementation. My input parameter was by now the lower 8 byte of the ipv6 address. At the the end the question is which datatype to use for the output uint8, uint16 or uint32.
Hi , thanks for providing the source files.
For the data type, I think at least uint16_t. the unit could be different to different boards by replacing it with a marco definiation.
At last, I think your implementation missed the final step which is the modulation part.
These functions simply implements sax hash i encapsulated that in an additional function returning the final results for:
slotOffset(MAC) = 1 + hash(EUI64) % (length(Slotframe_1) - 1)
channelOffset(MAC) = hash(EUI64) % 16
at least I replaced 16 by MAX_NUMCHANNEL, and the offset of 1 which avoids conflicts with the minimal cell by another macro, since it interferred with the old design using serialrx cells in addition prior to your changes to xonoff