From ce81741953d58b42d83c16b87313f3d6305b8300 Mon Sep 17 00:00:00 2001 From: matsfunk Date: Sun, 1 May 2022 19:10:47 +0200 Subject: [PATCH] v1.5.12 - removed commented code from merged PR --- dist/oocsi.zip | Bin 39104 -> 39179 bytes dist/oocsi/DFDataset.cpp | 36 ++++++++++++++++++++-------------- dist/oocsi/DFDataset.h | 2 +- dist/oocsi/library.properties | 4 ++-- src/DFDataset.cpp | 9 +-------- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/dist/oocsi.zip b/dist/oocsi.zip index 9ba618455d07fca15399ebb718741576f3b33f1c..835fe80353c9f6758c7ed2cf43ad74e59187d8db 100644 GIT binary patch delta 5206 zcmZWtbyO7Gx1AXp=>ZgwPH90phwcU$8Wf}kX^<*yY9Mot#jAix3doPwjM;NqmF@z4*=i-0JfQhb%YIAM8Bhf)2Eo> z9s&TMO#(57MGJ3}0Q|+D(jWXVz4j>@B)gM>E7thiDHnq+--ykAZf7V{I1WiHYxQ?0 zA<@O$T-`gkIYd+IK$tUgv;Bqr+489Rc6VzkD=V)n1>Q-*+o!3-m61u|97}5tT97gQ z)aApSE2|!5G=rhSEznUrvWs!YzcGY=R#%MvI0-eT-iqs^ApwIa?;ve zQlrq$lu!M*LVPs|gk8@xb_F(Njl~6c7T-N)m9HmIG*MB(JRKVwE1kigB(`EQ_o(U> zbR}t=%qVZe($BC6CK-7G&^yayDe9uGYZKD*1yeY~K=C!_YI(W0RraBdZ^>eHu;9)q zPoNKr2WO!ZXXl@A_&+epy)hT$>7lf$PbkHbU*l0kkS0EJi17~0mCkZe#Vy=YK^v0V zRaKA6%7JPs$nH2*5-6LTx+7Q%IwQSa{2e4lh(plN70>FXS3eF4hkB-vOy zMnw$px-vV_NZVRHID<4ShY1@% zG2Zv!3c%MX$R?H-oo77341eQ&VyKt*SsDBx z!?Z-DXq=aXJc$73wQyP-e4$u8UMbT8`s|+LORr7WOZ=};84n>c^<1w{s*PAk6zM68 zkg;VoK24GQ@K++$TBMG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p&!$*Z|YWpOk2pydRY2a6@RN}ic%)>61^%Lg*L zHTlyQ%$o%_??{CxeuXgKI(iYNW>_w2TBx3HU#`HOf*L3aBL3J{0g8EvPb&W65>&+5 zVEi~VXzjs!3Z)O=K3VIp5+h8et4pP1u;1HoU+>H}+nA&1yP@))2N-t!HjU z@>b?hqprA-K68VEl`#W33GUC3Et@}u9n#<&t|!qm1skoA--8icydUS;UyTOjT82bC z^{|h!aW}UOY9I?SPPlfKxNf_JtjGNd1BBjqs9W&})~>rHg~=9Ro7c2g1V-{MF;3cQ zIAAK=|16PU|0?spP6AN1TQ~vX|6MAD#|be1|1bJ~67vFlfcZEnoYw$-yaY}KpdT-W z0|64^<#1Gi>3A7jZXpnmAS48+CqTiXl0bX}H!vs(0T>cVfvyB5924M6f(4jJ5eSIn z0#X!dfUra;I79Ux%LGt@$$;fV8L*|sUn>Pjf+=@?8SHAoY){G_q{F5ZWa;E=5D@h9A-xmM2w}1*<0ze~K5*%UkZ$t@D z+ui~ClcC@v2cQFw7C<6}0BJN7{OI*x%Y#P)MB~u`6=+2;tJ^<_1)xol0MESr8{WmI z2AsU;fMGN#P@cjB_VW3gB%MkK?4*c+r33zL4ZxQ{Kzb?*^Z#mvf0}^qf9ea$3;1Vz MNaZ3R3I7BC3xB9){ @@ -509,12 +515,12 @@ const char* DFDataset::urlencode(const char* str) if (c > 9){ code0=c - 10 + 'A'; } - code2='\0'; - encodedString+='%'; - encodedString+=code0; - encodedString+=code1; + sprintf(encodedString, "%s%c", encodedString, '%'); + sprintf(encodedString, "%s%c", encodedString, code0); + sprintf(encodedString, "%s%c", encodedString, code1); } yield(); } - return encodedString.c_str(); + + strcpy(dst, encodedString); } diff --git a/dist/oocsi/DFDataset.h b/dist/oocsi/DFDataset.h index ee0a551..a3d2f10 100644 --- a/dist/oocsi/DFDataset.h +++ b/dist/oocsi/DFDataset.h @@ -109,7 +109,7 @@ class DFDataset { void println(); void println(const String &message); void println(char message); - const char* urlencode(const char* str); + void urlencode(char* dst, const char* src); }; #endif diff --git a/dist/oocsi/library.properties b/dist/oocsi/library.properties index d2bd2cd..6476587 100644 --- a/dist/oocsi/library.properties +++ b/dist/oocsi/library.properties @@ -1,11 +1,11 @@ name=OOCSI -version=1.5.11 +version=1.5.12 author=Jort Band, Mathias Funk maintainer=Mathias Funk sentence=OOCSI client library for the ESP32, ESP8266, Arduino MKR Wifi 101, Arduino UNO Wifi, Arduino Nano 33 IoT, and Arduino Nano RP2040 paragraph=Library for easy connection and communication with the ESP32, ESP8266 and Arduino NANO 33 IoT modules over the OOCSI platform category=Communication url=https://github.com/iddi/oocsi-esp -architectures=esp32,esp8266,samd,megaavr,mbed_nano,mbed_rp2040 +architectures=esp32,esp8266,samd,megaavr,mbed_nano,mbed_rp2040,rp2040 includes=OOCSI.h depends=ArduinoJson,ArduinoHttpClient \ No newline at end of file diff --git a/src/DFDataset.cpp b/src/DFDataset.cpp index 7b08515..26db6c0 100644 --- a/src/DFDataset.cpp +++ b/src/DFDataset.cpp @@ -497,15 +497,13 @@ void DFDataset::setLogging(bool log) { void DFDataset::urlencode(char* dst, const char* src) { char encodedString[200] = ""; - //String encodedString=""; char c; char code0; char code1; - //char code2; + for (int i =0; i < strlen(src); i++){ c=src[i]; if (isalnum(c)){ - // encodedString+=c; sprintf(encodedString, "%s%c", encodedString, c); } else { code1=(c & 0xf)+'0'; @@ -517,17 +515,12 @@ void DFDataset::urlencode(char* dst, const char* src) if (c > 9){ code0=c - 10 + 'A'; } - code2='\0'; - //encodedString+='%'; sprintf(encodedString, "%s%c", encodedString, '%'); - //encodedString+=code0; sprintf(encodedString, "%s%c", encodedString, code0); - //encodedString+=code1; sprintf(encodedString, "%s%c", encodedString, code1); } yield(); } - //return encodedString.c_str(); strcpy(dst, encodedString); }