Railstars / Aegaeon

A feature-rich, NMRA standards compliant DCC decoder in 8K. Targeted at ATtiny84A.
10 stars 3 forks source link

UnitTest: DCCDecoderTests, UpdateBasicSpeedPacket #1

Closed DEGoodmanWilson closed 11 years ago

DEGoodmanWilson commented 11 years ago

DCC_Decoder_Test.cpp:157: error: Failure in TEST(DCCDecoderTests, UpdateBasicSpeedPacket) expected <0> but was < 3 (0x03)>

The error is that the conversion from 28 to 128 speed steps miscalculates in the case of speed step 29 (largest in 28 speed step range): It computes it as 126, when in fact it should be 127. Need to insert a special case to handle.