packFile bug修复
This commit is contained in:
parent
15f9cf693b
commit
185dd63cf8
@ -442,8 +442,7 @@ static void upSendFile_thread_entry(void *parameter)
|
||||
}
|
||||
|
||||
LOG_D("ready to send '%s---%d'",f->fname,f->index);
|
||||
static rt_uint8_t len =0;
|
||||
len = pack_File(f->fname, 0, d, s);
|
||||
uint8_t len = pack_File(f->fname, 0, d, s);
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
LOG_HEX("msg",27,d[i],s[i]);
|
||||
}
|
||||
|
@ -294,6 +294,7 @@ rt_uint8_t pack_File(const char *fin, rt_uint8_t flag, const rt_uint8_t (*dout)[
|
||||
}
|
||||
|
||||
//更新算法,改用特定大小依次读取文件,弃用一次性全部读入文件
|
||||
// static uint8_t row =0;
|
||||
uint8_t row = (file_size / flen) + (file_size % flen > 0 ? 1 : 0);
|
||||
cfg.fallpiece[0] = row;
|
||||
|
||||
@ -346,7 +347,8 @@ rt_uint8_t pack_File(const char *fin, rt_uint8_t flag, const rt_uint8_t (*dout)[
|
||||
close(fd_in);
|
||||
}
|
||||
|
||||
return row;
|
||||
// return row;
|
||||
return cfg.fallpiece[0];
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user