diff options
author | Josh Allen <axlecrusher@gmail.com> | 2017-02-14 06:12:49 -0500 |
---|---|---|
committer | Josh Allen <axlecrusher@gmail.com> | 2017-02-14 06:12:49 -0500 |
commit | 5509a5722af2e00fed5797b038076c0e7b8cc435 (patch) | |
tree | 02f60aae9ab858366f24ef8b645508b306af4fa7 /tools/ootx_decode/HMD_Datagen.c | |
parent | 712920777d3b914beda78ac381af9541731bc03f (diff) | |
parent | f0e743ccc98397ee011ea10a6068263b5f3dbae7 (diff) | |
download | libsurvive-5509a5722af2e00fed5797b038076c0e7b8cc435.tar.gz libsurvive-5509a5722af2e00fed5797b038076c0e7b8cc435.tar.bz2 |
Merge branch 'ootx_decoder_context_cleanup'
Diffstat (limited to 'tools/ootx_decode/HMD_Datagen.c')
-rw-r--r-- | tools/ootx_decode/HMD_Datagen.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/ootx_decode/HMD_Datagen.c b/tools/ootx_decode/HMD_Datagen.c index f2e8b19..15ed62c 100644 --- a/tools/ootx_decode/HMD_Datagen.c +++ b/tools/ootx_decode/HMD_Datagen.c @@ -1,4 +1,4 @@ -// (C) 2016 Joshua Allen, MIT/x11 License. +// (C) 2017 Joshua Allen, MIT/x11 License. // //All MIT/x11 Licensed Code in this file may be relicensed freely under the GPL or LGPL licenses. @@ -9,8 +9,9 @@ #include <stdint.h> #include <time.h> #include <stdlib.h> +#include <zlib.h> -#include "crc32.h" +//this program is broken and does not produce useable data. uint32_t time_stamp = -525198892; @@ -33,7 +34,8 @@ int main(int argc, char* argv[]) print_preamble(); uint16_t payload_lenth = strlen(str); - uint32_t crc = crc32(0xffffffff,(uint8_t*)str,payload_lenth); + uint32_t crc = crc32( 0L, Z_NULL, 0 ); + crc = crc32( crc, (uint8_t*)str,payload_lenth); print_uint16(payload_lenth); print_payload(str,payload_lenth); @@ -98,4 +100,4 @@ void print_bit(uint8_t data) { */ //fire off a callback when a full OOTX packet is received -}
\ No newline at end of file +} |