Skip to content

Commit

Permalink
Event mode: Disallow Router or Repeater roles
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern committed Jul 29, 2024
1 parent f016eb4 commit cfe9e37
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/AdminModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
requiresReboot = true;
}
}
#if EVENT_MODE
// If we're in event mode, nobody is a Router or Repeater
if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||
config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) {
config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;
}
#endif
break;
case meshtastic_Config_position_tag:
LOG_INFO("Setting config: Position\n");
Expand Down

0 comments on commit cfe9e37

Please sign in to comment.