Regarding Xadow.getChrgState()

Hi,

I have a question regarding Xadow.getChrgState().

In xadow.cpp, xadow::getChrgState() is implemented as follows.

unsigned char xadow::getChrgState()
{
    unsigned char Temp = CHRGpin & CHRGbit;
    
    if(!Temp)
    {
        return NOCHARGE;
    }
    Temp = DONEpin & DONEbit;
    if(!Temp)
    {
        return CHARGDONE;
    }
    return NOCHARGE;
}

But if I understand correctly, that should be as follows. Otherwise, the function never returns CHARGING. Moreover, /CHRG means charging, instead of no charge. Is this correct?

unsigned char xadow::getChrgState()
{
    unsigned char Temp = CHRGpin & CHRGbit;

    if(!Temp)
    {
        return CHARGING;
    }
    Temp = DONEpin & DONEbit;
    if(!Temp)
    {
        return CHARGDONE;
    }
    return NOCHARGE;
}

I’m sorry if this is a false alarm.