lfs commands for numbers, format fix, error print on lfs write fail, add debouncer stub, int lfs write self test

This commit is contained in:
openshwprojects
2023-02-02 09:56:53 +01:00
parent 7a01b755d4
commit 0b62712e26
10 changed files with 93 additions and 14 deletions

View File

@ -558,6 +558,10 @@ static int http_rest_post_lfs_file(http_request_t* request) {
do {
//ADDLOG_DEBUG(LOG_FEATURE_API, "%d bytes to write", writelen);
len = lfs_file_write(&lfs, file, writebuf, writelen);
if (len < 0) {
ADDLOG_ERROR(LOG_FEATURE_API, "Failed to write to %s with error %i", fpath,len);
break;
}
total += len;
if (len > 0) {
//ADDLOG_DEBUG(LOG_FEATURE_API, "%d bytes written", len);