File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -328,10 +328,9 @@ void arduino::WiFiClass::feedWatchdog()
328
328
329
329
#if defined(COMPONENT_4343W_FS)
330
330
331
- #define WIFI_FIRMWARE_NAME " 4343WA1.BIN"
331
+ #define WIFI_FIRMWARE_PATH " /wlan/ 4343WA1.BIN"
332
332
333
333
bool firmware_available = false ;
334
- static std::string fullname;
335
334
336
335
#include " wiced_filesystem.h"
337
336
#include " resources.h"
@@ -354,21 +353,17 @@ wiced_result_t whd_firmware_check_hook(const char *mounted_name, int mount_err)
354
353
{
355
354
DIR *dir;
356
355
struct dirent *ent;
357
- std::string dir_name (mounted_name);
356
+ String dir_name (mounted_name);
358
357
if (mount_err) {
359
358
wiced_filesystem_mount_error ();
360
359
} else {
361
360
if ((dir = opendir (mounted_name)) != NULL ) {
362
361
// print all the files and directories within directory
363
362
while ((ent = readdir (dir)) != NULL ) {
364
- fullname = " /" + dir_name + " /" + std::string (ent->d_name );
365
- if (std::string (ent-> d_name ) == WIFI_FIRMWARE_NAME ) {
363
+ String fullname = " /" + dir_name + " /" + String (ent->d_name );
364
+ if (fullname == WIFI_FIRMWARE_PATH ) {
366
365
closedir (dir);
367
366
firmware_available = true ;
368
- // Update Mbed resource default mount point /wlan
369
- wifi_firmware_image.val .fs .filename = (const char *)fullname.c_str ();
370
- // Serial.println(fullname.c_str());
371
- // Serial.println((char*)(wifi_firmware_image.val.fs.filename));
372
367
return WICED_SUCCESS;
373
368
}
374
369
}
You can’t perform that action at this time.
0 commit comments