Add function to test if serial configuration is in progress
This was formely tested all over using testing for the state of gSerialConfigCountDown_500ms in a couple of ways. This logic have been extracted into a function to make the code more readable. Also testing it with > 0 was a bit misleading as the variable is unsigned so tesing with == and != is enough.
This commit is contained in:
@@ -107,7 +107,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
|
||||
{
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
if (!bKeyPressed || gSerialConfigCountDown_500ms > 0)
|
||||
if (!bKeyPressed || SerialConfigInProgress())
|
||||
{ // PTT released
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // we are transmitting .. stop
|
||||
|
Reference in New Issue
Block a user