mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-22 00:06:24 +01:00
Merge branch 'master' of https://github.com/jjwbruijn/OpenEPaperLink
This commit is contained in:
@@ -24,7 +24,16 @@
|
||||
"mac_suffix":"0131",
|
||||
"MD5":"A27D978C48888FA045E8D3F90DC27029",
|
||||
"type":240,
|
||||
"note":"Segmented, UK, TSC0 Ebie"
|
||||
"note":"Segmented, UK"
|
||||
},
|
||||
{
|
||||
"name":"NoDisplay ZBS243 AP",
|
||||
"mac_offset":0,
|
||||
"mac_format":0,
|
||||
"mac_suffix":"0000",
|
||||
"MD5":"ABBAABBAD3ADD0D0CAFED3F90DC27029",
|
||||
"type":255,
|
||||
"note":"NoDisplay ZBS243 AP"
|
||||
},
|
||||
{
|
||||
"name":"4.2 Black + NFC",
|
||||
|
||||
@@ -288,7 +288,7 @@ void flasher::getMacFromWiFi() {
|
||||
bool flasher::backupFlash() {
|
||||
getFirmwareMD5();
|
||||
if (!zbs->select_flash(0)) return false;
|
||||
md5char[16]=0x00;
|
||||
md5char[16] = 0x00;
|
||||
fs::File backup = LittleFS.open("/" + (String)md5char + "_backup.bin", "w", true);
|
||||
for (uint32_t c = 0; c < 65535; c++) {
|
||||
backup.write(zbs->read_flash(c));
|
||||
@@ -654,6 +654,7 @@ bool doTagFlash() {
|
||||
f->getInfoBlockType();
|
||||
f->readInfoBlock();
|
||||
f->writeFlashFromPack("/Tag_FW_Pack.bin", f->tagtype);
|
||||
f->zbs->reset();
|
||||
} else {
|
||||
// couldn't find the md5 from the infoblock
|
||||
Serial.printf("Found an already-flashed tag, but we couldn't find its fingerprint (%s) in the database\n", f->md5char);
|
||||
|
||||
@@ -41,7 +41,7 @@ void timeTask(void* parameter) {
|
||||
void setup() {
|
||||
// starts the led task/state machine
|
||||
xTaskCreate(ledTask, "ledhandler", 2000, NULL, 2, NULL);
|
||||
vTaskDelay(10/portTICK_PERIOD_MS);
|
||||
vTaskDelay(10 / portTICK_PERIOD_MS);
|
||||
|
||||
// show a nice pattern to indicate the AP is booting / waiting for WiFi setup
|
||||
#ifdef HAS_RGB_LED
|
||||
@@ -128,6 +128,20 @@ void loop() {
|
||||
vTaskDelay(10000 / portTICK_PERIOD_MS);
|
||||
// performDeviceFlash();
|
||||
while (1) {
|
||||
vTaskDelay(10000 / portTICK_PERIOD_MS);
|
||||
#ifdef OPENEPAPERLINK_PCB
|
||||
if (extTagConnected()) {
|
||||
flashCountDown(3);
|
||||
|
||||
pinMode(FLASHER_EXT_TEST, OUTPUT);
|
||||
digitalWrite(FLASHER_EXT_TEST, LOW);
|
||||
|
||||
doTagFlash();
|
||||
|
||||
vTaskDelay(10000 / portTICK_PERIOD_MS);
|
||||
pinMode(FLASHER_EXT_TEST, INPUT);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
#endif
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user