[ESP8266] Changed length type to size_t TRAVIS_FORCE_BUILD

This commit is contained in:
jgromes 2020-07-06 17:28:17 +02:00
parent eabbf9e5af
commit 8cbbf3d668
2 changed files with 3 additions and 3 deletions

View file

@ -160,10 +160,10 @@ int16_t ESP8266::send(const char* data) {
return(ERR_NONE); return(ERR_NONE);
} }
int16_t ESP8266::send(uint8_t* data, uint32_t len) { int16_t ESP8266::send(uint8_t* data, size_t len) {
// build AT command // build AT command
char lenStr[8]; char lenStr[8];
sprintf(lenStr, "%lu", len); sprintf(lenStr, "%u", (uint16_t)len);
const char atStr[] = "AT+CIPSEND="; const char atStr[] = "AT+CIPSEND=";
#ifdef RADIOLIB_STATIC_ONLY #ifdef RADIOLIB_STATIC_ONLY
char cmd[RADIOLIB_STATIC_ARRAY_SIZE]; char cmd[RADIOLIB_STATIC_ARRAY_SIZE];

View file

@ -51,7 +51,7 @@ class ESP8266: public TransportLayer {
int16_t openTransportConnection(const char* host, const char* protocol, uint16_t port, uint16_t tcpKeepAlive = 0) override; int16_t openTransportConnection(const char* host, const char* protocol, uint16_t port, uint16_t tcpKeepAlive = 0) override;
int16_t closeTransportConnection() override; int16_t closeTransportConnection() override;
int16_t send(const char* data) override; int16_t send(const char* data) override;
int16_t send(uint8_t* data, uint32_t len) override; int16_t send(uint8_t* data, size_t len) override;
size_t receive(uint8_t* data, size_t len, uint32_t timeout = 10000) override; size_t receive(uint8_t* data, size_t len, uint32_t timeout = 10000) override;
size_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10) override; size_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10) override;