My CRC8 is dysfunctional and I'm not sure why!
The code you have above is a polynomial of x8 + x5 + x4 + 1. I thought it looked familiar and I just checked some code and it's what the Dallas 1-wire devices use, so I guess you've found some code written for those devices (as also implied from the class name).

The x8 + x2 + x1 + 1 this device requires is also known as CRC-8-CCITT. There's a problem with your modified code but revert back to the first version and try changing 0x8C to 0xE0. There's a table of them on Wikipedia under polynomial representations of cyclic redundancy checks.