diff --git a/examples/wireless/power-adaptation-distance.cc b/examples/wireless/power-adaptation-distance.cc index 7c18d929c..ca059268b 100644 --- a/examples/wireless/power-adaptation-distance.cc +++ b/examples/wireless/power-adaptation-distance.cc @@ -359,7 +359,7 @@ int main (int argc, char *argv[]) wifiStaDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiStaNodes.Get (0))); //Configure the AP node - wifi.SetRemoteStationManager (manager, "DefaultTxPowerLevel", UintegerValue (maxPower), "RtsCtsThreshold", UintegerValue (rtsThreshold)); + wifi.SetRemoteStationManager (manager, "DefaultTxPowerLevel", UintegerValue (powerLevels - 1), "RtsCtsThreshold", UintegerValue (rtsThreshold)); wifiPhy.Set ("TxPowerStart", DoubleValue (minPower)); wifiPhy.Set ("TxPowerEnd", DoubleValue (maxPower)); wifiPhy.Set ("TxPowerLevels", UintegerValue (powerLevels)); diff --git a/examples/wireless/power-adaptation-interference.cc b/examples/wireless/power-adaptation-interference.cc index e769d9f16..9510ac5ae 100644 --- a/examples/wireless/power-adaptation-interference.cc +++ b/examples/wireless/power-adaptation-interference.cc @@ -410,7 +410,7 @@ int main (int argc, char *argv[]) wifiStaDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiStaNodes.Get (1))); //Configure the AP nodes - wifi.SetRemoteStationManager (manager, "DefaultTxPowerLevel", UintegerValue (maxPower), "RtsCtsThreshold", UintegerValue (rtsThreshold)); + wifi.SetRemoteStationManager (manager, "DefaultTxPowerLevel", UintegerValue (powerLevels - 1), "RtsCtsThreshold", UintegerValue (rtsThreshold)); wifiPhy.Set ("TxPowerStart", DoubleValue (minPower)); wifiPhy.Set ("TxPowerEnd", DoubleValue (maxPower)); wifiPhy.Set ("TxPowerLevels", UintegerValue (powerLevels));