From b79a1766aaf207943772b2565f674853e2be8314 Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Sun, 12 Feb 2017 10:47:17 -0500 Subject: fix copyright --- tools/ootx_decode/HMD_Datagen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/ootx_decode/HMD_Datagen.c') diff --git a/tools/ootx_decode/HMD_Datagen.c b/tools/ootx_decode/HMD_Datagen.c index f2e8b19..34bf543 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. -- cgit v1.2.3 From c67f528d10f55e34d0d254fb59494778bcb04e90 Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Mon, 13 Feb 2017 16:04:01 -0500 Subject: use zlib crc32 --- tools/ootx_decode/HMD_Datagen.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/ootx_decode/HMD_Datagen.c') diff --git a/tools/ootx_decode/HMD_Datagen.c b/tools/ootx_decode/HMD_Datagen.c index 34bf543..15ed62c 100644 --- a/tools/ootx_decode/HMD_Datagen.c +++ b/tools/ootx_decode/HMD_Datagen.c @@ -9,8 +9,9 @@ #include #include #include +#include -#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 +} -- cgit v1.2.3