-int GetPrescoBits(uint32_t sitecode, uint32_t usercode, uint8_t *prescoBits) {
- uint8_t pre[66];
- memset(pre, 0, sizeof(pre));
- prescoBits[7]=1;
- num_to_bytebits(26, 8, pre);
-
- uint8_t wiegand[24];
- num_to_bytebits(sitecode, 8, wiegand);
- num_to_bytebits(usercode, 16, wiegand+8);
-
- wiegand_add_parity(pre+8, wiegand, 24);
- size_t bitLen = addParity(pre, prescoBits+8, 66, 4, 1);
-
- if (bitLen != 88) return 0;
+// calc not certain - intended to get bitstream for programming / sim
+int GetPrescoBits(uint32_t fullcode, uint8_t *prescoBits) {
+ num_to_bytebits(0x10D00000, 32, prescoBits);
+ num_to_bytebits(0x00000000, 32, prescoBits+32);
+ num_to_bytebits(0x00000000, 32, prescoBits+64);
+ num_to_bytebits(fullcode , 32, prescoBits+96);