added support for PowerShot G2 thanks to Hans Ulrich Niedermann

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2337 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Philippe Marzouk
2001-09-29 09:50:01 +00:00
parent 80a742dde8
commit 27c8b178d7
4 changed files with 18 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ following models:
- Powershot S300 / Digital IXUS 300
- Powershot IXY Digital 300 (not tested)
- Powershot G1
- Powershot G2 (seems to work like the G1, but we're still testing)
- Powershot A10 (not tested)
- Powershot A20 (not tested)
- Powershot Pro90 IS (not tested)

View File

@@ -76,6 +76,7 @@ static struct {
{ "Canon IXY DIGITAL", 0x04A9, 0x3046, 0 },
{ "Canon Digital IXUS", 0x04A9, 0x3047, 0 },
{ "Canon PowerShot G1", 0x04A9, 0x3048, 1 },
{ "Canon PowerShot G2", 0x04A9, 0x3055, 0 },
{ "Canon PowerShot Pro90 IS", 0x04A9, 0x3049, 1 },
{ "Canon IXY DIGITAL 300", 0x04A9, 0x304B, 0 },
{ "Canon PowerShot S300", 0x04A9, 0x304C, 0 },
@@ -242,6 +243,8 @@ char *camera_model_string(Camera *camera)
return "Powershot S20";
case CANON_PS_G1:
return "Powershot G1";
case CANON_PS_G2:
return "Powershot G2";
case CANON_PS_S100:
return "Powershot S100 / Digital IXUS / IXY DIGITAL";
case CANON_PS_S300:
@@ -843,6 +846,7 @@ int camera_summary(Camera *camera, CameraText *summary)
case CANON_PS_S10: model = "Canon Powershot S10"; break;
case CANON_PS_S20: model = "Canon Powershot S20"; break;
case CANON_PS_G1: model = "Canon Powershot G1"; break;
case CANON_PS_G2: model = "Canon Powershot G2"; break;
case CANON_PS_S100: model = "Canon Powershot S100 / Digital IXUS / IXY DIGITAL"; break;
case CANON_PS_S300: model = "Canon Powershot S300 / Digital IXUS 300 / IXY DIGITAL 300"; break;
case CANON_PS_A10: model = "Canon Powershot A10"; break;

View File

@@ -1044,6 +1044,12 @@ int psa50_ready(Camera *camera)
A5 = 0;
return 1;
}
else if (!strcmp("Canon PowerShot G2",cs->ident)) {
gp_frontend_status(camera, "Detected a Powershot G2");
cs->model = CANON_PS_G2;
A5 = 0;
return 1;
}
else if ((!strcmp("Canon DIGITAL IXUS",cs->ident))
|| (!strcmp("Canon IXY DIGITAL",cs->ident))
|| (!strcmp("Canon PowerShot S110",cs->ident))
@@ -1207,6 +1213,10 @@ int psa50_ready(Camera *camera)
gp_frontend_status(camera, "Detected a Powershot G1");
cs->model = CANON_PS_G1;
A5 = 0;
} else if (!strcmp("Canon PowerShot G2",psa50_id)) {
gp_frontend_status(camera, "Detected a Powershot G2");
cs->model = CANON_PS_G2;
A5 = 0;
} else if (!strcmp("Canon PowerShot A10",psa50_id)) {
gp_frontend_status(camera, "Detected a Powershot A10");
cs->model = CANON_PS_A10;
@@ -1529,6 +1539,7 @@ unsigned char *psa50_get_file_serial(Camera *camera, const char *name,int *lengt
if (!file) {
total = get_int(msg+4);
if(cs->model == CANON_PS_S20 || cs->model==CANON_PS_G1
|| cs->model==CANON_PS_G2
|| cs->model == CANON_PS_S10) {
maxfilesize=10000000;
}
@@ -1606,7 +1617,7 @@ unsigned char *psa50_get_file_usb(Camera *camera, const char *name,int *length)
if (!file) {
total=len;
if(cs->model == CANON_PS_S10 || cs->model == CANON_PS_S20
|| cs->model == CANON_PS_G1 || cs->model == CANON_PS_S300
|| cs->model == CANON_PS_G2 || cs->model == CANON_PS_G1 || cs->model == CANON_PS_S300
|| cs->model == CANON_PS_S100 || cs->model == CANON_PS_A10
|| cs->model == CANON_PS_A20 || cs->model == CANON_EOS_D30
|| cs->model == CANON_PS_PRO90_IS) {

View File

@@ -47,6 +47,7 @@ typedef enum {
CANON_PS_S100,
CANON_PS_S300,
CANON_PS_G1,
CANON_PS_G2,
CANON_PS_A10,
CANON_PS_A20,
CANON_EOS_D30,