Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
StonedDawg committed Feb 2, 2022
1 parent 54fd64c commit de63704
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib/CONFIG/config.h
Expand Up @@ -129,7 +129,8 @@ typedef struct {
uint8_t powerOnCounter;
uint8_t modelId;
uint8_t power;
uint8_t antennaMode;
uint8_t antennaMode; //keep antenna mode in struct even in non diversity RX,
// because turning feature diversity on and off would require change of RX config version.
char ssid[33];
char password[33];
rx_config_pwm_t pwmChannels[PWM_MAX_CHANNELS];
Expand Down
4 changes: 2 additions & 2 deletions src/lib/LUA/rx_devLUA.cpp
Expand Up @@ -65,14 +65,14 @@ static void registerLuaParameters()
#if defined(GPIO_PIN_ANTENNA_SELECT) && defined(USE_DIVERSITY)
registerLUAParameter(&luaAntennaMode, [](uint8_t id, uint8_t arg){
config.SetAntennaMode(arg);
config.Commit();
config.Commit();// this commit doesn't trigger restart
devicesTriggerEvent();
});
#endif

registerLUAParameter(&luaTlmPower, [](uint8_t id, uint8_t arg){
config.SetPower(arg);
//config.Commit();
//config.Commit(); this commit trigger restart
if(arg == 0){
POWERMGNT.setPower(MinPower);
} else {
Expand Down

0 comments on commit de63704

Please sign in to comment.