| 270 | } |
| 271 | |
| 272 | bool flasher::backupFlash() { |
| 273 | getFirmwareMD5(); |
| 274 | if (!zbs->select_flash(0)) return false; |
| 275 | md5char[16] = 0x00; |
| 276 | xSemaphoreTake(fsMutex, portMAX_DELAY); |
| 277 | fs::File backup = contentFS->open("/" + (String)md5char + "_backup.bin", "w", true); |
| 278 | for (uint32_t c = 0; c < 65535; c++) { |
| 279 | backup.write(zbs->read_flash(c)); |
| 280 | } |
| 281 | backup.close(); |
| 282 | xSemaphoreGive(fsMutex); |
| 283 | return true; |
| 284 | } |
| 285 | |
| 286 | // extract original mac from firmware (1.54" and 2.9") and make it 2 bytes longer based on info in settings.h |
| 287 | void flasher::get_mac_format1() { |
no test coverage detected