- Timestamp:
- 01/10/11 02:06:43 (2 years ago)
- File:
-
- 1 edited
-
trunk/core/raw.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/raw.c
r1035 r1039 23 23 #define RAW_TARGET_FILENAME "%s%04d%s" 24 24 #define RAW_BRACKETING_FILENAME "%s%04d_%02d%s" 25 26 #define PATH_BADPIXEL_BIN "A/CHDK/badpixel.bin" 27 #define PATH_BAD_TMP_BIN "A/CHDK/bad_tmp.bin" 25 28 26 29 //------------------------------------------------------------------- … … 127 130 char* altrawadr = get_alt_raw_image_addr(); 128 131 129 // ! ! ! exclusively for special script which creates badpixel.bin ! ! !132 // ! ! ! exclusively for badpixel creation ! ! ! 130 133 // NOTE: get_bad_count_and_write_file() must be called from here and cannot be called 131 134 // outside of this function. 132 if (conf.save_raw==255) conf.save_raw=get_bad_count_and_write_file("A/CHDK/bad_tmp.bin"); 135 // TODO now that we make badpixel in code, special use of save_raw is not needed 136 // also don't need to actually save a raw when making bad pixel 137 if (conf.save_raw==255) conf.save_raw=get_bad_count_and_write_file(PATH_BAD_TMP_BIN); 133 138 // 134 139 … … 487 492 488 493 badpix_cnt1 = conf.save_raw; 494 conf.save_raw = 255; 489 495 shooting_set_tv96_direct(96, SET_LATER); 490 496 … … 501 507 if (badpix_cnt1 == badpix_cnt2) 502 508 { 509 // TODO script asked confirmation first 510 // should sanity check bad pixel count at least, 511 /// wrong buffer address could make badpixel bigger than available mem 503 512 char msg[32]; 504 513 console_add_line("badpixel.bin created."); 505 514 sprintf(msg, "Bad pixel count: %d", badpix_cnt1); 506 515 console_add_line(msg); 516 DeleteFile_Fut(PATH_BADPIXEL_BIN); 517 RenameFile_Fut(PATH_BAD_TMP_BIN,PATH_BADPIXEL_BIN); 507 518 } 508 519 else … … 511 522 console_add_line("Please try again."); 512 523 } 513 524 DeleteFile_Fut(PATH_BAD_TMP_BIN); 525 514 526 action_push_delay(3000); 515 527 break;
Note: See TracChangeset
for help on using the changeset viewer.