File tree Expand file tree Collapse file tree 5 files changed +10
-4
lines changed
Expand file tree Collapse file tree 5 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ WiFiServer wifiServer(80);
1515void setup ()
1616{
1717 Serial.begin (115200 );
18+ Serial.println (" Starting Wifi Connection..." );
1819
1920 WiFi.begin (const_cast <char *>(ssid), password);
2021 while (WiFi.status () != WL_CONNECTED)
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ lib_dir = ../
2020platform = espressif
2121framework = arduino
2222board = esp01
23+ # Custom upload tool to force use of esptool.py instead of default esptool.
24+ # See: http://arduino.stackexchange.com/questions/20219/upload-with-esptool-fails-with-espcomm-send-command-cant-receive-slip-payload
25+ extra_script = ../../Tools/platformio_esptool.py
2326
2427[env:uno]
2528platform = atmelavr
Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ bool ArduinoHttpServer::HttpResource::isValid()
3737// ! Retrieve resource part at the specified index.
3838// ! \details E.g. HttpResource("/api/sensors/1/state")[1]
3939// ! returns "sensors"
40- String ArduinoHttpServer::HttpResource::operator [](const int index) const
40+ String ArduinoHttpServer::HttpResource::operator [](const unsigned int index) const
4141{
4242 int fromOffset (0 );
4343
4444 // Forward till we reach desired index.
45- for (int currentIndex=0 ; currentIndex <= index; ++currentIndex)
45+ for (unsigned int currentIndex=0 ; currentIndex <= index; ++currentIndex)
4646 {
4747 fromOffset = m_resource.indexOf (RESOURCE_SEPERATOR, fromOffset);
4848 ++fromOffset; // Seek past '/'.
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class HttpResource
2525 HttpResource& operator =(const HttpResource& other);
2626
2727 bool isValid ();
28- String operator [](const int index) const ;
28+ String operator [](const unsigned int index) const ;
2929 const String& toString () const ;
3030
3131private:
Original file line number Diff line number Diff line change @@ -117,7 +117,8 @@ ArduinoHttpServer::StreamHttpRequest<MAX_BODY_LENGTH>::StreamHttpRequest(Stream&
117117 m_errorDescription(),
118118 m_lineBufferStrTokContext(0 )
119119{
120- m_stream.setTimeout (LINE_READ_TIMEOUT_MS);
120+ static_assert (MAX_BODY_LENGTH >= 0 , " HTTP body length less then zero specified." );
121+ m_stream.setTimeout (LINE_READ_TIMEOUT_MS);
121122}
122123
123124// ------------------------------------------------------------------------------
@@ -264,6 +265,7 @@ void ArduinoHttpServer::StreamHttpRequest<MAX_BODY_LENGTH>::parseVersion()
264265 message += version;
265266 message += " \" ." ;
266267 setError (message);
268+
267269 }
268270
269271}
You can’t perform that action at this time.
0 commit comments