File tree 6 files changed +3321
-3320
lines changed
6 files changed +3321
-3320
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,8 @@ int main() {
207
207
/* Initialize the lzss module with the data which
208
208
* it requires.
209
209
*/
210
- lzss_init (&update_file, (uint32_t )SKETCH_START);
210
+ uint32_t const LZSS_FILE_SIZE = update_file.size () - sizeof (ota_header.buf );
211
+ lzss_init (&update_file, (uint32_t )SKETCH_START, LZSS_FILE_SIZE);
211
212
/* During the process of decoding UPDATE.BIN.LZSS
212
213
* is decompressed and stored as UPDATE.BIN.
213
214
*/
Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ static uint32_t flash_addr = 0;
48
48
PUBLIC FUNCTIONS
49
49
**************************************************************************************/
50
50
51
- void lzss_init (WiFiStorageFile * update_file_ptr, uint32_t const sketch_start)
51
+ void lzss_init (WiFiStorageFile * update_file_ptr, uint32_t const sketch_start, uint32_t const lzss_file_size )
52
52
{
53
53
SKETCH_START = sketch_start;
54
54
flash_addr = sketch_start;
55
55
update_file = update_file_ptr;
56
- LZSS_FILE_SIZE = update_file-> size () ;
56
+ LZSS_FILE_SIZE = lzss_file_size ;
57
57
}
58
58
59
59
void lzss_flush ()
Original file line number Diff line number Diff line change 13
13
FUNCTION DEFINITION
14
14
**************************************************************************************/
15
15
16
- void lzss_init (WiFiStorageFile * update_file_ptr , uint32_t const sketch_start );
16
+ void lzss_init (WiFiStorageFile * update_file_ptr , uint32_t const sketch_start , uint32_t const lzss_file_size );
17
17
void lzss_decode ();
18
18
void lzss_flush ();
19
19
You can’t perform that action at this time.
0 commit comments