Fix "discards qualifiers" compiler error (#253)

GCC wouldn't compile because NeoPixelBus::CanShow() is declared const but IsReadyToUpdate() is not:

    NeoPixelBus.h:161:40: error: passing 'const NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedWs2812x>' as 'this' argument of 'bool NeoEsp8266DmaMethodBase<T_SPEED>::IsReadyToUpdate() [with T_SPEED = NeoEsp8266DmaSpeedWs2812x]' discards qualifiers [-fpermissive]

Making IsReadyToUpdate() const solves the issue.
This commit is contained in:
Szabolcs Székelyi
2019-02-14 03:46:28 -05:00
committed by Michael Miller
parent 9762439c85
commit 670535baaf

View File

@@ -168,7 +168,7 @@ public:
free(_i2sBufDesc);
}
bool IsReadyToUpdate()
bool IsReadyToUpdate() const
{
return (_dmaState == NeoDmaState_Idle);
}