I bet the next working address is 0x0200
Just booting the firmware locks up the camera hard
//-------------------------------------------------------------------static void fselect_purge_cb(unsigned int btn) { DIR *d, *d2, *d3, *d4; struct dirent *de, *de2, *de3, *de4; struct fitem *ptr, *ptr2; char sub_dir[20], sub_dir_search[20]; char selected_item[256]; int i, found=0; if (btn==MBOX_BTN_YES) { //If selected folder is DCIM (this is to purge all RAW files in any Canon folder) if (selected->name[0] == 'D' && selected->name[1] == 'C' && selected->name[2] == 'I' && selected->name[3] == 'M') { sprintf(current_dir+strlen(current_dir), "/%s", selected->name); d=opendir(current_dir); while ((de=readdir(d)) != NULL) {//Loop to find all Canon folders if (de->name[0] != '.' && de->name[1] != '.') {//If item is not UpDir sprintf(sub_dir, "%s/%s", current_dir, de->name); d2=opendir(sub_dir); while ((de2=readdir(d2)) != NULL) {//Loop to find all the RAW files inside a Canon folder if (de2->name[0] == 'C' || de2->name[9] == 'C') {//If file is RAW (Either CRW/CR2 prefix or file extension) d3=opendir(current_dir); while ((de3=readdir(d3)) != NULL) {//Loop to find all Canon folders if (de3->name[0] != '.' && de3->name[1] != '.') {//If item is not UpDir sprintf(sub_dir_search, "%s/%s", current_dir, de3->name); d4=opendir(sub_dir_search); while ((de4=readdir(d4)) != NULL) {//Loop to find a corresponding JPG file inside a Canon folder if (de2->name[4] == de4->name[4] && de2->name[5] == de4->name[5] &&//If the four digits of the Canon number are the same de2->name[6] == de4->name[6] && de2->name[7] == de4->name[7] && de4->name[9] == 'J' && !(de4->name[0] == 'C' || de4->name[9] == 'C' || de4->name[0] == 0xE5)) {//If file is JPG, is not CRW/CR2 and is not a deleted item started(); found=1;//A JPG file with the same Canon number was found } } closedir(d4); } } closedir(d3); //If no JPG found, delete RAW file if (found == 0) { sprintf(selected_item, "%s/%s", sub_dir, de2->name); remove(selected_item); finished(); } else { found=0; finished(); } } } closedir(d2); } } closedir(d); i=strlen(current_dir); while (current_dir[--i] != '/'); current_dir[i]=0; } //If item is a Canon folder (this is to purge all RAW files inside a single Canon folder) else if (selected->name[3] == 'C') { sprintf(current_dir+strlen(current_dir), "/%s", selected->name); d=opendir(current_dir); while ((de=readdir(d)) != NULL) {//Loop to find all the RAW files inside the Canon folder if (de->name[0] == 'C' || de->name[9] == 'C') {//If file is RAW (Either CRW/CR2 prefix or file extension) d2=opendir(current_dir); while ((de2=readdir(d2)) != NULL) {//Loop to find a corresponding JPG file inside the Canon folder if (de->name[4] == de2->name[4] && de->name[5] == de2->name[5] &&//If the four digits of the Canon number are the same de->name[6] == de2->name[6] && de->name[7] == de2->name[7] && de2->name[9] == 'J' && !(de2->name[0] == 'C' || de2->name[9] == 'C' || de2->name[0] == 0xE5)) {//If file is JPG and is not CRW/CR2 and is not a deleted item started(); found=1;//A JPG file with the same Canon number was found } } closedir(d2); //If no JPG found, delete RAW file if (found == 0) { sprintf(selected_item, "%s/%s", current_dir, de->name); remove(selected_item); finished(); } else { found=0; finished(); } } } closedir(d); i=strlen(current_dir); while (current_dir[--i] != '/'); current_dir[i]=0; } else { //If inside a Canon folder (files list) for (ptr=head; ptr; ptr=ptr->next) {//Loop to find all the RAW files in the list if ((ptr->name[0] == 'C' || ptr->name[9] == 'C') && !(ptr->marked)) {//If file is RAW (Either CRW/CR2 prefix or file extension) and is not marked for (ptr2=head; ptr2; ptr2=ptr2->next) {//Loop to find a corresponding JPG file in the list if (ptr->name[4] == ptr2->name[4] && ptr->name[5] == ptr2->name[5] &&//If the four digits of the Canon number are the same ptr->name[6] == ptr2->name[6] && ptr->name[7] == ptr2->name[7] && ptr2->name[9] == 'J' && !(ptr2->name[0] == 'C' || ptr2->name[9] == 'C')) {//If file is JPG and is not CRW/CR2 started(); found=1; } } //If no JPG found, delete RAW file if (found == 0) { sprintf(selected_file, "%s/%s", current_dir, ptr->name); remove(selected_file); finished(); } else { found=0; finished(); } } } } gui_fselect_read_dir(current_dir); } gui_fselect_redraw = 2;}
sprintf(selected_file, "%s/%s", current_dir, ptr->name);
if (de->name[0] == 'C' || de->name[9] == 'C') {//If file is RAW (Either CRW/CR2 prefix or file extension)
de2->name[9] == 'J' && !(de2->name[0] == 'C' || de2->name[9] == 'C' || de2->name[0] == 0xE5)) {//If file is JPG and is not CRW/CR2 and is not a deleted item
Started by hangglider Feature Requests
Started by SkyWalker9 General Chat
Started by Mike Lee General Discussion and Assistance
Started by esranjith « 1 2 » Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by Dave92F1 RAW Shooting and Processing