aboutsummaryrefslogtreecommitdiff
path: root/tools/ootx_decode/HMD_Datagen.c
diff options
context:
space:
mode:
authorJosh Allen <axlecrusher@gmail.com>2017-02-13 16:04:01 -0500
committerJosh Allen <axlecrusher@gmail.com>2017-02-13 16:04:01 -0500
commitc67f528d10f55e34d0d254fb59494778bcb04e90 (patch)
tree0ab4458991b8c30a8116bffa615dd1cc85036772 /tools/ootx_decode/HMD_Datagen.c
parent7fdfd9fff265d38ae002d8007a02f746f42fd3f2 (diff)
downloadlibsurvive-c67f528d10f55e34d0d254fb59494778bcb04e90.tar.gz
libsurvive-c67f528d10f55e34d0d254fb59494778bcb04e90.tar.bz2
use zlib crc32
Diffstat (limited to 'tools/ootx_decode/HMD_Datagen.c')
-rw-r--r--tools/ootx_decode/HMD_Datagen.c8
1 files changed, 5 insertions, 3 deletions
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 <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
+}