Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2016-12-12 18:27:06 +0300
committerDavid Crocker <dcrocker@eschertech.com>2016-12-12 18:27:39 +0300
commitcd5af6c7b13656a555cdc5ffbb8e37624ce9af67 (patch)
treeceed8ac57fda8910ff28194e1a7460beb0b6afac /src/Storage
parent4896bba4e81a38792f3c72ff31363d7ed68132df (diff)
Version 1.17rc1
- Added support for M374 (save height map) and M375 (load height map) - Added M376 (set bed compensation taper height) - Added T parameter to G31 command - M500, M501 and M502 now use config_override.g instead of flash memory. The parameters saved and restored are: -- M307 auto tune results -- PID parameters, if you used M301 to override the auto tune PID settings -- Delta printer M665 and M666 settings -- G31 trigger height, trigger value and X and Y offsets - The M501 auto save option has been removed - Removed S and T parameters from M301 command. Use M307 command instead. - M301 with negative P parameter no longer sets bang-bang mode. Use M307 instead. - Added P parameter to the G31 command to specify Z probe type. This allows you to view the parameters for the Z probe(s) and to set parameters for a particular Z probe type without selecting that type. G31 P or G31 P0 prints the parameters of the currently-selected Z probe. - Z probe offsets are now applied during G30 probing with specified XY coordinates, including during delta auto calibration - Z probe recovery time is now applied from the end of the travel move just before probing - Fixed bad dive height when using G29 with a large trigger height - Fixed bad JSON message during printing when there were no active extruders - Added exception handlers and store a software reset code when an exception occurs - Fixed reset reason text because on the Duet WiFi a watchdog reset can look like an external reset - G30 S-1 how printes the stopped height - Implemented M401 and M402
Diffstat (limited to 'src/Storage')
-rw-r--r--src/Storage/MassStorage.cpp12
-rw-r--r--src/Storage/MassStorage.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Storage/MassStorage.cpp b/src/Storage/MassStorage.cpp
index 06b38627..b296329d 100644
--- a/src/Storage/MassStorage.cpp
+++ b/src/Storage/MassStorage.cpp
@@ -301,17 +301,19 @@ time_t MassStorage::GetLastModifiedTime(const char* directory, const char *fileN
return 0;
}
-bool MassStorage::SetLastModifiedTime(const char *file, time_t time)
+bool MassStorage::SetLastModifiedTime(const char* directory, const char *fileName, time_t time)
{
- FILINFO fno;
+ const char *location = (directory != nullptr)
+ ? platform->GetMassStorage()->CombineName(directory, fileName)
+ : fileName;
const struct tm * const timeInfo = gmtime(&time);
-
+ FILINFO fno;
fno.fdate = (WORD)(((timeInfo->tm_year - 80) * 512U) | (timeInfo->tm_mon + 1) * 32U | timeInfo->tm_mday);
fno.ftime = (WORD)(timeInfo->tm_hour * 2048U | timeInfo->tm_min * 32U | timeInfo->tm_sec / 2U);
- const bool ok = (f_utime(file, &fno) == FR_OK);
+ const bool ok = (f_utime(location, &fno) == FR_OK);
if (!ok)
{
- reprap.GetPlatform()->MessageF(HTTP_MESSAGE, "SetLastModifiedTime didn't work for file '%s'\n", file);
+ reprap.GetPlatform()->MessageF(HTTP_MESSAGE, "SetLastModifiedTime didn't work for file '%s'\n", location);
}
return ok;
}
diff --git a/src/Storage/MassStorage.h b/src/Storage/MassStorage.h
index 3ccf973d..ee355796 100644
--- a/src/Storage/MassStorage.h
+++ b/src/Storage/MassStorage.h
@@ -31,7 +31,7 @@ public:
bool DirectoryExists(const char *path) const;
bool DirectoryExists(const char* directory, const char* subDirectory);
time_t GetLastModifiedTime(const char* directory, const char *fileName) const;
- bool SetLastModifiedTime(const char *file, time_t time);
+ bool SetLastModifiedTime(const char* directory, const char *file, time_t time);
bool Mount(size_t card, StringRef& reply, bool reportSuccess);
bool Unmount(size_t card, StringRef& reply);
bool IsDriveMounted(size_t drive) const { return drive < NumSdCards && isMounted[drive]; }