From cccbee30a86b03ef2c40f7cfb13591743ce7462d Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Mon, 1 Mar 2021 00:28:25 -0800 Subject: [PATCH] Remove global radio_progress Change to function-specific counters --- dm1801.c | 2 ++ gd77.c | 2 ++ md380.c | 2 ++ radio.c | 3 --- radio.h | 5 ----- rd5r.c | 2 ++ uv380.c | 4 +++- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dm1801.c b/dm1801.c index ec2fd75..f426b4a 100644 --- a/dm1801.c +++ b/dm1801.c @@ -348,6 +348,7 @@ static void dm1801_print_version(radio_device_t *radio, FILE *out) static void download(radio_device_t *radio) { int bno; + int radio_progress = 0; // Read range 0x80...0x1ee5f. #define NBLK 989 @@ -390,6 +391,7 @@ static void dm1801_download(radio_device_t *radio) static void dm1801_upload(radio_device_t *radio, int cont_flag) { int bno; + int radio_progress = 0; // Write range 0x80...0x1ee5f. for (bno = 1; bno < NBLK; bno++) { diff --git a/gd77.c b/gd77.c index 9132c44..741c0b4 100644 --- a/gd77.c +++ b/gd77.c @@ -348,6 +348,7 @@ static void gd77_print_version(radio_device_t *radio, FILE *out) static void download(radio_device_t *radio) { int bno; + int radio_progress = 0; // Read range 0x80...0x1e29f. for (bno=1; bno<966; bno++) { @@ -388,6 +389,7 @@ static void gd77_download(radio_device_t *radio) static void gd77_upload(radio_device_t *radio, int cont_flag) { int bno; + int radio_progress = 0; // Write range 0x80...0x1e29f. for (bno=1; bno<966; bno++) { diff --git a/md380.c b/md380.c index c5a6c77..9921509 100644 --- a/md380.c +++ b/md380.c @@ -365,6 +365,7 @@ static void md380_print_version(radio_device_t *radio, FILE *out) static void md380_download(radio_device_t *radio) { int bno; + int radio_progress = 0; for (bno=0; bno