05-03-2015 10:36 PM
@stephenb2 wrote:
I did reverse the binary array before conversion so that the MSB came first (not shown in the trimmed code sample).
My code will create a string with exactly 5 bytes.
Use the middle code (note that I had to reverse the array first because you apparently reversed it earlier).
Have you tried? Does it work?
05-04-2015 09:17 AM
@altenbach wrote:
@stephenb2 wrote:
I did reverse the binary array before conversion so that the MSB came first (not shown in the trimmed code sample).
My code will create a string with exactly 5 bytes.
Use the middle code (note that I had to reverse the array first because you apparently reversed it earlier).
Have you tried? Does it work?
I hope to try the solutions with the hardware this morning.
I've attached your middle solution as a standalone. Did I get that right? Why a string subset with offset of 3?
05-04-2015 09:53 AM
@stephenb2 wrote:
I've attached your middle solution as a standalone. Did I get that right? Why a string subset with offset of 3?
Because converting to U64 will get you 8 bytes. You only need five of them.
You don't need any hardware to test. Does it otherwise look right currently?
05-04-2015 10:42 AM
@altenbach wrote:
Because converting to U64 will get you 8 bytes. You only need five of them.
You don't need any hardware to test. Does it otherwise look right currently?
I understand now, thanks. Both solutions produce the same result and seem valid.