Skip to content

Commit

Permalink
Fixing 2 bugs
Browse files Browse the repository at this point in the history
* Prepending 'renameFile' with 'WiFiDrv' so that 'WiFiDrv::renameFile', otherwise a linker error concurs.
* Setting correct command response for function SpiDrv::waitResponseCmd
  • Loading branch information
aentinger committed Jun 24, 2020
1 parent 49f9738 commit 1de666a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utility/wifi_drv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ int8_t WiFiDrv::downloadFile(const char* url, uint8_t url_len, const char *filen
return _data;
}

int8_t renameFile(const char * old_file_name, uint8_t const old_file_name_len, const char * new_file_name, uint8_t const new_file_name_len)
int8_t WiFiDrv::renameFile(const char * old_file_name, uint8_t const old_file_name_len, const char * new_file_name, uint8_t const new_file_name_len)
{
WAIT_FOR_SLAVE_SELECT();
/* Send Command */
Expand All @@ -1133,7 +1133,7 @@ int8_t renameFile(const char * old_file_name, uint8_t const old_file_name_len, c
/* Wait for reply */
uint8_t data = 0;
uint8_t dataLen = 0;
if (!SpiDrv::waitResponseCmd(DOWNLOAD_FILE, PARAM_NUMS_1, &data, &dataLen))
if (!SpiDrv::waitResponseCmd(RENAME_FILE, PARAM_NUMS_1, &data, &dataLen))
{
WARN("error waitResponse");
data = WL_FAILURE;
Expand Down

0 comments on commit 1de666a

Please sign in to comment.