1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-08-01 11:25:50 +00:00

Firmware updater: rework cancelling

This commit is contained in:
Vojtech Kral
2018-05-21 15:24:24 +02:00
parent 4f4649d046
commit a43e72f696
10 changed files with 101 additions and 45 deletions
+12 -2
View File
@@ -727,12 +727,22 @@ void sort_programmers(LISTID programmers);
/* formerly avr.h */
typedef bool (*FP_UpdateProgress)(int percent, double etime, char *hdr);
typedef void (*FP_UpdateProgress)(int percent, double etime, char *hdr);
extern struct avrpart parts[];
extern FP_UpdateProgress update_progress;
extern bool cancel_flag;
#define RETURN_IF_CANCEL() \
do { \
if (cancel_flag) { \
avrdude_message(MSG_INFO, "%s(): Cancelled, exiting...\n", __func__); \
return -99; \
} \
} while (0)
#ifdef __cplusplus
extern "C" {
#endif
@@ -769,7 +779,7 @@ int avr_mem_hiaddr(AVRMEM * mem);
int avr_chip_erase(PROGRAMMER * pgm, AVRPART * p);
bool report_progress (int completed, int total, char *hdr);
void report_progress (int completed, int total, char *hdr);
#ifdef __cplusplus
}