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 @@ -316,10 +316,9 @@ unsigned long arduino::WiFiClass::getTime() {
316
316
317
317
#if defined(COMPONENT_4343W_FS)
318
318
319
- #define WIFI_FIRMWARE_NAME " 4343WA1.BIN"
319
+ #define WIFI_FIRMWARE_PATH " /wlan/ 4343WA1.BIN"
320
320
321
321
bool firmware_available = false ;
322
- static std::string fullname;
323
322
324
323
#include " wiced_filesystem.h"
325
324
#include " resources.h"
@@ -342,21 +341,17 @@ wiced_result_t whd_firmware_check_hook(const char *mounted_name, int mount_err)
342
341
{
343
342
DIR *dir;
344
343
struct dirent *ent;
345
- std::string dir_name (mounted_name);
344
+ String dir_name (mounted_name);
346
345
if (mount_err) {
347
346
wiced_filesystem_mount_error ();
348
347
} else {
349
348
if ((dir = opendir (mounted_name)) != NULL ) {
350
349
// print all the files and directories within directory
351
350
while ((ent = readdir (dir)) != NULL ) {
352
- fullname = " /" + dir_name + " /" + std::string (ent->d_name );
353
- if (std::string (ent-> d_name ) == WIFI_FIRMWARE_NAME ) {
351
+ String fullname = " /" + dir_name + " /" + String (ent->d_name );
352
+ if (fullname == WIFI_FIRMWARE_PATH ) {
354
353
closedir (dir);
355
354
firmware_available = true ;
356
- // Update Mbed resource default mount point /wlan
357
- wifi_firmware_image.val .fs .filename = (const char *)fullname.c_str ();
358
- // Serial.println(fullname.c_str());
359
- // Serial.println((char*)(wifi_firmware_image.val.fs.filename));
360
355
return WICED_SUCCESS;
361
356
}
362
357
}
You can’t perform that action at this time.
0 commit comments