-
Notifications
You must be signed in to change notification settings - Fork 234
Replace UrlEncode library with local implementation. #811
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
Changes from all commits
6bd5cfb
23b16eb
67b1940
2712f55
8445c69
b931c84
75508cb
fe80d0c
918f71b
7af691a
c554c75
7ccdcf8
f879f77
b23c7f6
12bc9c7
adf84a4
7ca0128
f4160c5
d3792bb
1498545
d359e81
2a09787
3fe1d32
0cedbb6
2517b45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| //+-------------------------------------------------------------------------- | ||
| // | ||
| // File: UrlEncode.h | ||
| // | ||
| // NightDriverStrip - (c) 2026 Plummer's Software LLC. All Rights Reserved. | ||
| // | ||
| // This file is part of the NightDriver software project. | ||
| // | ||
| // NightDriver is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
| // | ||
| // NightDriver is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU General Public License | ||
| // along with Nightdriver. It is normally found in copying.txt | ||
| // If not, see <https://www.gnu.org/licenses/>. | ||
| // | ||
| // Description: | ||
| // | ||
| // Helper to URL-encode strings for API calls. | ||
| // Implemenation provides RFC 1738 style percent-encoding. | ||
| // | ||
| //--------------------------------------------------------------------------- | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <Arduino.h> | ||
|
|
||
| String urlEncode(const String& str); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -604,4 +604,4 @@ class PatternWeather : public EffectWithId<PatternWeather> | |
| } | ||
| }; | ||
|
|
||
| #endif | ||
| #endif | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll pretend I didn't see this feature being snuck in with the UrlEncode refactor. ;)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the integration. Moving uptime, unchanged, from a file that was networking (where it used to live because debug stuff was entangled with network stuff) to a file that is home for debugging was not a new feature and was not sneaky. It was a very deliberate change as part of making ENABLE_WIFI (which clearly otherwise applies to networking.cc) honest, as it required that method to be rehomed so it could still be available even in builds without ENABLE_WIFI, as this is useful over the console port. I landed DoUptime back in 2023 in #402 because when running long times for leaks or stability testing, I want to see that it's been running a long time and didn't crash or reboot minutes before I walked back into the room. Even then we noted it was an awkward fit But agreed that this PR morphed from "don't download and install a 20 line function 50 times" to make ENABLE_WIFI (and related networking #defines) actually bracket when they claim to bracket. That was me taking your request to its conclusion.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ...which I appreciate. In any case, the comment was mainly about the addition of the "uptime" command to the CLI command set. To which you may say "are you serious?", to which I would reply "no, that's why I approved and merged." I think the PR adds a number of sanity checks/extra safeguards to a complicated area of the codebase (anything networking), which is unequivocally a good thing to do. So, thank you for it!
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But uptime wasn't added. It was added in 2023. It was moved from one file to another. Are we talking past each other? But, yeah, this definitely ballooned, but leaves it better than we found it. |
Uh oh!
There was an error while loading. Please reload this page.