summaryrefslogtreecommitdiff
path: root/camlibs/kodak/dc210
diff options
context:
space:
mode:
authorMichael Koltan <koltan@gmx.de>2002-10-20 10:43:29 +0000
committerMichael Koltan <koltan@gmx.de>2002-10-20 10:43:29 +0000
commit4c23049bd313131d3319815a91ff593bfcdcc4b5 (patch)
treeb49a71e372944fe11146ce048705747fe459b98b /camlibs/kodak/dc210
parent9b02cde2476f4016e00387c82beab3415f55c159 (diff)
downloadlibgphoto2-4c23049bd313131d3319815a91ff593bfcdcc4b5.tar.gz
Improved error recovery in file download and removed bugs in
battery status and ac adapter connection display git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@5406 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/kodak/dc210')
-rw-r--r--camlibs/kodak/dc210/ChangeLog9
-rw-r--r--camlibs/kodak/dc210/TODO4
-rw-r--r--camlibs/kodak/dc210/dc210.c11
-rw-r--r--camlibs/kodak/dc210/dc210.h1
-rw-r--r--camlibs/kodak/dc210/library.c9
5 files changed, 18 insertions, 16 deletions
diff --git a/camlibs/kodak/dc210/ChangeLog b/camlibs/kodak/dc210/ChangeLog
index b8e0543f8..242aba991 100644
--- a/camlibs/kodak/dc210/ChangeLog
+++ b/camlibs/kodak/dc210/ChangeLog
@@ -1,3 +1,12 @@
+2002-10-20 Michael Koltan <koltan@gmx.de>
+
+ * Improved error recovery on package read
+ timeout when downloading file from camera
+ + Corrected error in battery status / ac
+ adaptor connection. Reading of battery
+ status still doesn't work, so took the
+ unreliable display from summary
+
2002-09-10 Marcus Meissner <marcus@jet.franken.de>
* Made exp_compensation a signed char, removed
diff --git a/camlibs/kodak/dc210/TODO b/camlibs/kodak/dc210/TODO
index 74eee9751..5a6c92f32 100644
--- a/camlibs/kodak/dc210/TODO
+++ b/camlibs/kodak/dc210/TODO
@@ -5,6 +5,4 @@ There are still some minor problems/issues:
- Internationalization
- Allow switching the thumbnail type in preferences
- Clean up the code and add some more comments
-
-To tackle these problems I have to update my linux installation,
-so don't expect them too soon. \ No newline at end of file
+- Find the error in reading the battery status
diff --git a/camlibs/kodak/dc210/dc210.c b/camlibs/kodak/dc210/dc210.c
index 417181af7..eaf6584be 100644
--- a/camlibs/kodak/dc210/dc210.c
+++ b/camlibs/kodak/dc210/dc210.c
@@ -534,18 +534,13 @@ static int camera_summary (Camera *camera, CameraText *summary,
};
strcat(summary_string, buff);
- if (status.fast_preview)
- snprintf(buff, 1024, "Fast preview is on\n");
- else
- snprintf(buff, 1024, "Fast preview is off\n");
- strcat(summary_string, buff);
-
- switch (status.battery){
+ /* battery check still doesn't work */
+ /* switch (status.battery){
case 0: snprintf(buff,1024,"Battery charge is good\n"); break;
case 1: snprintf(buff,1024,"Battery charge is low\n"); break;
case 2: snprintf(buff,1024,"Battery is not charged\n"); break;
};
- strcat(summary_string,buff);
+ strcat(summary_string,buff);*/
if (status.acstatus)
snprintf(buff,1024,"AC adapter is connected\n");
diff --git a/camlibs/kodak/dc210/dc210.h b/camlibs/kodak/dc210/dc210.h
index ff0fae599..0dc9e2c37 100644
--- a/camlibs/kodak/dc210/dc210.h
+++ b/camlibs/kodak/dc210/dc210.h
@@ -56,7 +56,6 @@ typedef struct {
char camera_type_id;
char firmwareMajor;
char firmwareMinor;
- char fast_preview;
char battery;
char acstatus;
long int time;
diff --git a/camlibs/kodak/dc210/library.c b/camlibs/kodak/dc210/library.c
index fd0b389f3..263583884 100644
--- a/camlibs/kodak/dc210/library.c
+++ b/camlibs/kodak/dc210/library.c
@@ -445,8 +445,10 @@ static int dc210_read_to_file
fatal_error = 1;
for (k = 0; k < RETRIES; k++){
/* read packet */
- if (gp_port_read(camera->port, b, blocksize) < 0)
+ if (gp_port_read(camera->port, b, blocksize) < 0){
+ dc210_write_single_char(camera, DC210_ILLEGAL_PACKET);
continue;
+ };
/* read checksum */
if (dc210_read_single_char(camera, &cs_read) == GP_ERROR){
free(b);
@@ -1180,9 +1182,8 @@ int dc210_get_status (Camera *camera, dc210_status *status) {
status->firmwareMajor = data[2];
status->firmwareMinor = data[3];
- status->fast_preview = data[8];
- status->battery = data[9];
- status->acstatus = data[10];
+ status->battery = data[8];
+ status->acstatus = data[9];
/* seconds since unix epoc */
status->time = CAMERA_GET_EPOC + ((unsigned char) data[12] * 0x1000000 +