| 111 | } |
| 112 | |
| 113 | bool report(bool result) { |
| 114 | if (result) { |
| 115 | wsSerial("<✔", "green"); |
| 116 | #ifdef HAS_TFT |
| 117 | tft2.setTextColor(TFT_GREEN); |
| 118 | tft2.setCursor(5, 30, 2); |
| 119 | tft2.print("v"); |
| 120 | tft2.setCursor(6, 30, 2); |
| 121 | tft2.print("v"); |
| 122 | vTaskDelay(100 / portTICK_PERIOD_MS); |
| 123 | #endif |
| 124 | } else { |
| 125 | errors++; |
| 126 | autoFlashStep = AUTOFLASH_STEP_ABORT; |
| 127 | wsSerial("<✘", "red"); |
| 128 | #ifdef HAS_TFT |
| 129 | tft2.setTextColor(TFT_RED); |
| 130 | tft2.setCursor(5, 30, 2); |
| 131 | tft2.print("x"); |
| 132 | tft2.setCursor(6, 30, 2); |
| 133 | tft2.print("x"); |
| 134 | vTaskDelay(500 / portTICK_PERIOD_MS); |
| 135 | #endif |
| 136 | } |
| 137 | return result; |
| 138 | } |
| 139 | |
| 140 | void onDataReceived(void* arg, AsyncClient* client, void* data, size_t len) { |
| 141 | flasherDataHandler((uint8_t*)data, len, TRANSPORT_TCP); |
no test coverage detected