Previous improvements

- Checking correctly JSON file before using it
- Disable DFU Uart cause gives problems when don't read incoming port data.
This commit is contained in:
BitMaker 2023-04-17 23:24:42 +02:00
parent e88a8578a4
commit 472894d0e8
4 changed files with 35 additions and 7 deletions

View File

@ -0,0 +1,14 @@
{
"folders": [
{
"path": "../../../../../../../Documents/Proyectos/Electrotec/DISPLAYS/SERIES/SERIE DP/SOFTWARE DE TESTEO/PythonScripts/GenerateXMLDPI"
},
{
"name": "NerdMinerV2",
"path": "."
}
],
"settings": {
"platformio-ide.useDevelopmentPIOCore": true
}
}

6
huge_app.csv Normal file
View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000,0xE0000,
coredump, data, coredump,0x3F0000,0x10000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x300000
5 spiffs data spiffs 0x310000 0xE0000
6 coredump data coredump 0x3F0000 0x10000

View File

@ -22,14 +22,15 @@ upload_speed = 921600
# 2 x 4.5MB app, 6.875MB SPIFFS # 2 x 4.5MB app, 6.875MB SPIFFS
;board_build.partitions = large_spiffs_16MB.csv ;board_build.partitions = large_spiffs_16MB.csv
board_build.partitions = default_8MB.csv ;board_build.partitions = default_8MB.csv
board_build.partitions = huge_app.csv
;board_build.partitions = default.csv ;board_build.partitions = default.csv
build_flags = build_flags =
-D LV_LVGL_H_INCLUDE_SIMPLE -D LV_LVGL_H_INCLUDE_SIMPLE
-D BOARD_HAS_PSRAM -D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1 ;-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1 ;-D ARDUINO_USB_CDC_ON_BOOT=1
-D DEBUG_MINING=1 -D DEBUG_MINING=1
lib_deps = lib_deps =
https://github.com/takkaO/OpenFontRender https://github.com/takkaO/OpenFontRender

View File

@ -118,6 +118,7 @@ void runWorker(void *name) {
Serial.println(""); Serial.println("");
Serial.printf("\n[WORKER] Started. Running %s on core %d\n", (char *)name, xPortGetCoreID()); Serial.printf("\n[WORKER] Started. Running %s on core %d\n", (char *)name, xPortGetCoreID());
;Serial.printf("### [Total Heap / Free heap]: %d / %d \n", ESP.getHeapSize(), ESP.getFreeHeap());
String ADDRESS = String(btcString); String ADDRESS = String(btcString);
@ -161,10 +162,7 @@ void runWorker(void *name) {
Serial.print(" error: "); Serial.println(error); Serial.print(" error: "); Serial.println(error);
if((extranonce1.length() == 0) || line.length() == 0 || (error != 0)) { if((extranonce1.length() == 0) || line.length() == 0 || (error != 0)) {
Serial.printf("[WORKER] %s >>>>>>>>> Work aborted\n", (char *)name); Serial.printf("[WORKER] %s >>>>>>>>> Work aborted\n", (char *)name);
Serial.printf("extranonce1 length: %u | line2 length: %u | error code: %u \n", Serial.printf("extranonce1 length: %u | line2 length: %u | error code: %u \n", extranonce1.length(), line.length(), error);
extranonce1.length(),
line.length(),
error);
client.stop(); client.stop();
doc.clear(); doc.clear();
doc.garbageCollect(); doc.garbageCollect();
@ -204,6 +202,15 @@ void runWorker(void *name) {
Serial.print(" ntime: "); Serial.println(ntime); Serial.print(" ntime: "); Serial.println(ntime);
Serial.print(" clean_jobs: "); Serial.println(clean_jobs); Serial.print(" clean_jobs: "); Serial.println(clean_jobs);
#endif #endif
//Check if parameters where correctly received
if((job_id.length() == 0)||(prevhash.length() == 0)||(coinb2.length() == 0)||(ntime.length() == 0)) {
Serial.println(">>>>>>>>> Worker aborted");
client.stop();
doc.clear();
doc.garbageCollect();
continue;
}
doc.clear(); doc.clear();
templates++; templates++;