Skip to content

Commit 330fdfa

Browse files
committed
Remove old fuji stuff
1 parent ebd40de commit 330fdfa

File tree

4 files changed

+2
-83
lines changed

4 files changed

+2
-83
lines changed

src/cl_data.h

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -160,52 +160,6 @@ enum PtpCHDKCommands {
160160
PTP_CHDK_UploadFile = 5,
161161
};
162162

163-
// Response to struct FujiInitPacket
164-
struct PtpFujiInitResp {
165-
uint32_t x1;
166-
uint32_t x2;
167-
uint32_t x3;
168-
uint32_t x4;
169-
char cam_name[54];
170-
};
171-
172-
// Appears to be an array for events
173-
struct PtpFujiEvents {
174-
uint16_t length;
175-
struct PtpFujiEventsEntry {
176-
uint16_t code;
177-
uint32_t value;
178-
}events[];
179-
};
180-
181-
// Looks very similar to standard ISO ObjectInfo, but random bits moved around.
182-
// variable data starts at same location.
183-
struct PtpFujiObjectInfo {
184-
uint32_t storage_id;
185-
uint16_t obj_format;
186-
uint16_t protection;
187-
uint32_t fuji_max_partial_size;
188-
uint8_t fuji_unknown2;
189-
uint32_t compressed_size;
190-
uint16_t fuji_unknown3;
191-
uint16_t fuji_unknown4;
192-
uint8_t fuji_unknown5;
193-
uint32_t img_width;
194-
uint32_t img_height;
195-
uint32_t img_bit_depth;
196-
uint32_t parent_obj;
197-
uint16_t assoc_type;
198-
uint32_t assoc_desc;
199-
uint32_t sequence_num;
200-
201-
#define PTP_FUJI_OBJ_INFO_VAR_START 52
202-
203-
char filename[64];
204-
char date_created[32];
205-
char settings[32];
206-
char meta[32];
207-
};
208-
209163
#pragma pack(pop)
210164

211165
#ifdef CAMLIB_INCLUDE_IMPL
@@ -234,10 +188,6 @@ int ptp_eos_get_imgformat_value(uint32_t data[5]);
234188

235189
void *ptp_pack_chdk_upload_file(struct PtpRuntime *r, char *in, char *out, int *length);
236190

237-
// Fuji (PTP/IP)
238-
int ptp_fuji_get_init_info(struct PtpRuntime *r, struct PtpFujiInitResp *resp);
239-
int ptp_fuji_parse_object_info(struct PtpRuntime *r, struct PtpFujiObjectInfo *oi);
240-
241191
#endif
242192

243193
#endif

src/data.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -606,35 +606,3 @@ int ptp_eos_events_json(struct PtpRuntime *r, char *buffer, int max) {
606606

607607
return curr;
608608
}
609-
610-
// TODO: move to fudge
611-
int ptp_fuji_get_init_info(struct PtpRuntime *r, struct PtpFujiInitResp *resp) {
612-
uint8_t *d = ptp_get_payload(r);
613-
614-
d += ptp_read_u32(d, &resp->x1);
615-
d += ptp_read_u32(d, &resp->x2);
616-
d += ptp_read_u32(d, &resp->x3);
617-
d += ptp_read_u32(d, &resp->x4);
618-
619-
ptp_read_unicode_string(resp->cam_name, (char *)d, sizeof(resp->cam_name));
620-
621-
return 0;
622-
}
623-
624-
int ptp_fuji_parse_object_info(struct PtpRuntime *r, struct PtpFujiObjectInfo *oi) {
625-
uint8_t *d = ptp_get_payload(r);
626-
memcpy(oi, d, PTP_FUJI_OBJ_INFO_VAR_START);
627-
d += PTP_FUJI_OBJ_INFO_VAR_START;
628-
d += ptp_read_string(d, oi->filename, sizeof(oi->filename));
629-
630-
/* TODO: Figure out payload later:
631-
0D 44 00 53 00 43 00 46 00 35 00 30 00 38 00 37 00 2E 00 4A 00 50 00 47 00
632-
00 00 10 32 00 30 00 31 00 35 00 30 00 35 00 32 00 34 00 54 00 30 00 31 00
633-
31 00 37 00 31 00 30 00 00 00 00 0E 4F 00 72 00 69 00 65 00 6E 00 74 00 61
634-
00 74 00 69 00 6F 00 6E 00 3A 00 31 00 00 00 0C 00 00 00 03 00 01 20 0E 00
635-
00 00 00
636-
*/
637-
638-
return 0;
639-
}
640-

src/generic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ int ptp_validate_property_value(struct PtpRuntime *r, int prop_code, uint32_t va
2727
break;
2828
default:
2929
ptp_panic("Unsupported PTP prop length %X\n", prop_code);
30+
return 0;
3031
}
3132

3233
if (value == cur_val) {

src/lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int ptp_send(struct PtpRuntime *r, struct PtpCommand *cmd) {
162162
int rc = ptp_receive_bulk_packets(r);
163163
if (rc < 0) {
164164
ptp_mutex_unlock_thread(r);
165-
ptp_verbose_log("Failed to recieve packets: %d\n", rc);
165+
ptp_verbose_log("Failed to receive packets: %d\n", rc);
166166
return PTP_IO_ERR;
167167
}
168168

0 commit comments

Comments
 (0)