-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing beacon interval to SoftAP config #8695
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allow passing beacon_interval to the softAP
allow beacon interval to be passed to the softAP config
d-a-v
reviewed
Dec 14, 2022
I think whole point of preinitalizing variables by compiler is that it is code designed for embedded system, so this leaves chance for compiler to cut some slack during optimization phase f.e. by reusing constants.
Leaving them uninit and adding extra code to return defaults would make sense in bigger environment, but it will just add bloat on embedded syste
…-------- Original Message --------
On Dec 16, 2022, 14:44, david gauchard wrote:
@d-a-v commented on this pull request.
---------------------------------------------------------------
In [libraries/ESP8266WiFi/src/ESP8266WiFiAP.h](#8695 (comment)):
> @@ -37,8 +37,8 @@ class ESP8266WiFiAPClass {
public:
- bool softAP(const char* ssid, const char* psk = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
- bool softAP(const String& ssid,const String& psk = emptyString,int channel = 1,int ssid_hidden = 0,int max_connection = 4);
+ bool softAP(const char* ssid, const char* psk = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4, int beacon_interval = 100);
+ bool softAP(const String& ssid,const String& psk = emptyString,int channel = 1,int ssid_hidden = 0,int max_connection = 4,int beacon_interval = 100);
I don't know if I was clear and sorry for that.
I meant it is preferable to do this, in case of subclassing / overloading.
bool
softAP
(
const
char
* ssid,
const
char
* psk =
NULL
,
int
channel =
1
,
int
ssid_hidden =
0
,
int
max_connection =
4
)
{
return
softAP
(ssid, psk, channel, hidden, max_connection,
100
);
}
+
bool
softAP
(
const
char
* ssid,
const
char
* psk,
int
channel,
int
ssid_hidden,
int
max_connection,
int
beacon_interval);
—
Reply to this email directly, [view it on GitHub](#8695 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ASY4EOBUMNUDK6L6GACZIILWNRW2BANCNFSM6AAAAAARJHJK2E).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
For binary stability one can use immediate binary wrapper functions, solving incompatibility, bit like LDPRELOAD mechanism in linux.
For embedded system with opensource environment expecting binary compatibility is quite high aim, certainly not achieveable for such a volatile target like 8266 which will most likely disappear once trade sanctions will take traction. Even worse, i guess to crumble sanctioned entities, entire architecture will be convoluted leaving recompile as only option, so caring about binary compatibility in this very moment of history would be unethical really.
…-------- Original Message --------
On Dec 17, 2022, 11:09, Max Prokhorov wrote:
@mcspr commented on this pull request.
---------------------------------------------------------------
In [libraries/ESP8266WiFi/src/ESP8266WiFiAP.h](#8695 (comment)):
> @@ -37,8 +37,8 @@ class ESP8266WiFiAPClass {
public:
- bool softAP(const char* ssid, const char* psk = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
- bool softAP(const String& ssid,const String& psk = emptyString,int channel = 1,int ssid_hidden = 0,int max_connection = 4);
+ bool softAP(const char* ssid, const char* psk = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4, int beacon_interval = 100);
+ bool softAP(const String& ssid,const String& psk = emptyString,int channel = 1,int ssid_hidden = 0,int max_connection = 4,int beacon_interval = 100);
I don't believe this matters in our case too too much?
Ambiguous overload is resolved at build time, everything is ok on that part.
If we worry about faulty default method used, arguments are expanded left-to-right so user will magically use the new method after upgrading our version.
If we worry about binary stability and preserving existing function signature in the .o file... idk how does one need to build its software for it to matter :)
—
Reply to this email directly, [view it on GitHub](#8695 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ASY4EOFHCOLD2BG6GAULEFDWNWGMHANCNFSM6AAAAAARJHJK2E).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
d-a-v
approved these changes
Dec 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow passing beacon_interval to SoftAP config.
Beacon interval affects DTIM and affects overall energy efficiency of AP (and responsiveness).
Decrease to make AP more realtime
Increase to make AP (and it's nodes) more energy and spectrum efficient.
Afffects waking up of nodes from light sleep too.