This repo contains some small tools from terminal command line to help for daily development. For example, one may want to know each byte of a float variable, then he/she can simply run the following command to find it:
float-to-u8 1.234cd /path/to/dj-tool
make
sudo make installThe installed files will be in folder /usr/local/bin. They are
double-to-u8
float-to-u8
u8-to-double
u8-to-floatThe above files (commands) can be run from any path, if no argument was attached, it will show help information like this:
usage:
u8-to-float <u8> <u8> <u8> <u8> l/b
u8-to-float <u8> <u8> <u8> <u8> little/bigRun the command:
float-to-u8 1.234It will output:
float: 1.234000 <=> u8: [182, 243, 157, 63] (little endian)
float: 1.234000 <=> u8: [0xB6, 0xF3, 0x9D, 0x3F] (little endian)Run the command:
u8-to-float 0 0 32 65 [l]It will output:
u8: [0, 0, 32, 65] <=> float: 10.000000 (little endian)