tramp: fixed issue with multiple changes through MSP

This bug has been introduced with 662b9552df.
This commit is contained in:
Raphael Coeffic 2017-02-07 22:33:42 +01:00 committed by borisbstyle
parent 39f3934ce3
commit b209998286
1 changed files with 4 additions and 7 deletions

View File

@ -134,6 +134,8 @@ void trampCmdU16(uint8_t cmd, uint16_t param)
void trampSetFreq(uint16_t freq)
{
trampConfFreq = freq;
if(trampConfFreq != trampCurFreq)
trampFreqRetries = TRAMP_MAX_RETRIES;
}
void trampSendFreq(uint16_t freq)
@ -149,6 +151,8 @@ void trampSetBandChan(uint8_t band, uint8_t chan)
void trampSetRFPower(uint16_t level)
{
trampConfPower = level;
if(trampConfPower != trampCurPower)
trampPowerRetries = TRAMP_MAX_RETRIES;
}
void trampSendRFPower(uint16_t level)
@ -163,13 +167,6 @@ bool trampCommitChanges()
return false;
trampStatus = TRAMP_STATUS_SET_FREQ_PW;
if(trampConfFreq != trampCurFreq)
trampFreqRetries = TRAMP_MAX_RETRIES;
if(trampConfPower != trampCurPower)
trampPowerRetries = TRAMP_MAX_RETRIES;
return true;
}