apa102: fix unit tests.

Changing the temperature calculation from float64 to lookup tables causes small
(<3 in value) changes in the recorded data.
pull/1/head
Marc-Antoine Ruel 10 years ago
parent 8925bb0af7
commit 8a8a4edc01

@ -449,11 +449,11 @@ func TestDevLong(t *testing.T) {
// code path so make sure each code path results in the exact same output.
var expectedi250t5000 = []byte{
0x00, 0x00, 0x00, 0x00, 0xE1, 0x08, 0x04, 0x00, 0xE1, 0x14, 0x10, 0xC, 0xE1,
0x20, 0x1C, 0x18, 0xE1, 0x2C, 0x28, 0x24, 0xE1, 0x38, 0x34, 0x30, 0xE1, 0x3F,
0x40, 0x3C, 0xE1, 0x43, 0x46, 0x48, 0xE1, 0x54, 0x4C, 0x4E, 0xE1, 0x7B, 0x63,
0x56, 0xE1, 0xC1, 0x96, 0x73, 0xE2, 0x97, 0x78, 0x5A, 0xE2, 0xE7, 0xBF, 0x94,
0xE4, 0xAA, 0x93, 0x77, 0xE4, 0xF1, 0xD8, 0xB8, 0xFF, 0x2B, 0x27, 0x23, 0xFF,
0x39, 0x36, 0x32, 0xFF, 0xFF,
0x20, 0x1C, 0x18, 0xE1, 0x2C, 0x28, 0x24, 0xE1, 0x38, 0x34, 0x30, 0xE1, 0x41,
0x40, 0x3C, 0xE1, 0x44, 0x47, 0x48, 0xE1, 0x53, 0x4C, 0x4E, 0xE1, 0x78, 0x62,
0x56, 0xE1, 0xBD, 0x94, 0x73, 0xE2, 0x95, 0x77, 0x5A, 0xE2, 0xE5, 0xBD, 0x94,
0xE4, 0xAA, 0x92, 0x77, 0xE4, 0xF3, 0xD7, 0xB8, 0xFF, 0x2B, 0x28, 0x23, 0xFF,
0x3A, 0x36, 0x32, 0xFF, 0xFF,
}
func TestDevTemperatureWarm(t *testing.T) {

Loading…
Cancel
Save