Hi,
Here is a link to the code that I am using on the ebike.
1drv.ms
Originally, I used a fixed value of 50V for the power calculation. This is now changed to reading the battery voltage from a voltage divider which is sampled from the display connector.
It might be best to replace the sample with a constant 50V for your testing.