| 
31 | 31 | from dwarf_python_api.lib.dwarf_utils import perform_stopAstroWidePhoto  | 
32 | 32 | from dwarf_python_api.lib.dwarf_utils import perform_waitEndAstroWidePhoto  | 
33 | 33 | from dwarf_python_api.lib.dwarf_utils import perform_update_camera_setting  | 
 | 34 | +from dwarf_python_api.lib.dwarf_utils import perform_update_all_camera_setting  | 
34 | 35 | from dwarf_python_api.lib.dwarf_utils import perform_get_all_camera_setting  | 
35 | 36 | from dwarf_python_api.lib.dwarf_utils import perform_get_all_feature_camera_setting  | 
36 | 37 | from dwarf_python_api.lib.dwarf_utils import perform_get_all_camera_wide_setting  | 
@@ -365,6 +366,8 @@ def option_C3():  | 
365 | 366 | 
 
  | 
366 | 367 |         if matching_entry:  | 
367 | 368 |             # Extract specific fields for the matching entry  | 
 | 369 | +           auto_mode = matching_entry["auto_mode"]  | 
 | 370 | +           print(f"The exposition mode is: {'Manual' if auto_mode else 'Auto'}")  | 
368 | 371 |            index_value = matching_entry["index"]  | 
369 | 372 | 
 
  | 
370 | 373 |            camera_exposure = str(get_exposure_name_by_index(index_value,config_to_dwarf_id_str(dwarf_id)))  | 
@@ -479,6 +482,8 @@ def option_C3():  | 
479 | 482 | 
 
  | 
480 | 483 |         if matching_entry:  | 
481 | 484 |             # Extract specific fields for the matching entry  | 
 | 485 | +           auto_mode = matching_entry["auto_mode"]  | 
 | 486 | +           print(f"The wide exposition mode is: {'Manual' if auto_mode else 'Auto'}")  | 
482 | 487 |            index_value = matching_entry["index"]  | 
483 | 488 | 
 
  | 
484 | 489 |            camera_wide_exposure = str(get_wide_exposure_name_by_index(index_value,config_to_dwarf_id_str(dwarf_id)))  | 
@@ -546,7 +551,71 @@ def option_C4():  | 
546 | 551 |         print("the wide gain is:", camera_wide_gain)  | 
547 | 552 |         perform_update_camera_setting("wide_gain", camera_wide_gain, config_to_dwarf_id_str(dwarf_id))  | 
548 | 553 | 
 
  | 
549 |  | - | 
 | 554 | +def option_CT4():  | 
 | 555 | +    print("You selected Option CT4. Import Saved Config All Tele Camera all Data into Dwarf")  | 
 | 556 | +    print("")  | 
 | 557 | +    # Add your Option CW4 functionality here  | 
 | 558 | +    # get dwarf type id  | 
 | 559 | +    data_config = dwarf_python_api.get_config_data.get_config_data()  | 
 | 560 | +    dwarf_id = data_config['dwarf_id']  | 
 | 561 | +    dwarf_id_int = config_to_dwarf_id_int(dwarf_id)  | 
 | 562 | +    print(f"Connected to Dwarf {'Mini' if dwarf_id_int == 5 else dwarf_id_int}")  | 
 | 563 | + | 
 | 564 | +    allValue = {  | 
 | 565 | +        'camera_exposure': False,  | 
 | 566 | +        'camera_gain': False,  | 
 | 567 | +        'camera_ircut': 0,  | 
 | 568 | +        'camera_wb_mode': 0,  | 
 | 569 | +        'camera_wb_index_type': 2,  | 
 | 570 | +        'camera_wb_index': 0,  | 
 | 571 | +        'camera_brightness': 0,  | 
 | 572 | +        'camera_contrast': 0,  | 
 | 573 | +        'camera_saturation': 0,  | 
 | 574 | +        'camera_sharpness': 50,  | 
 | 575 | +        'camera_jpg_quality': 80  | 
 | 576 | +    }  | 
 | 577 | +    allValue['camera_exposure'] = read_camera_exposure()  | 
 | 578 | +    if (allValue['camera_exposure']):  | 
 | 579 | +        print("the wide exposition is: ", allValue['camera_exposure'])  | 
 | 580 | + | 
 | 581 | +    allValue['camera_gain'] = read_camera_gain()  | 
 | 582 | +    if (allValue['camera_gain']):  | 
 | 583 | +        print("the wide gain is:", allValue['camera_gain'])  | 
 | 584 | + | 
 | 585 | +    perform_update_all_camera_setting("tele", allValue, config_to_dwarf_id_str(dwarf_id))  | 
 | 586 | + | 
 | 587 | +def option_CW4():  | 
 | 588 | +    print("You selected Option CW4. Import Saved Config All Wide Camera all Data into Dwarf")  | 
 | 589 | +    print("")  | 
 | 590 | +    # Add your Option CW4 functionality here  | 
 | 591 | +    # get dwarf type id  | 
 | 592 | +    data_config = dwarf_python_api.get_config_data.get_config_data()  | 
 | 593 | +    dwarf_id = data_config['dwarf_id']  | 
 | 594 | +    dwarf_id_int = config_to_dwarf_id_int(dwarf_id)  | 
 | 595 | +    print(f"Connected to Dwarf {'Mini' if dwarf_id_int == 5 else dwarf_id_int}")  | 
 | 596 | + | 
 | 597 | +    allValue = {  | 
 | 598 | +        'camera_exposure': False,  | 
 | 599 | +        'camera_gain': False,  | 
 | 600 | +        'camera_ircut': 0,  | 
 | 601 | +        'camera_wb_mode': 0,  | 
 | 602 | +        'camera_wb_index_type': 2,  | 
 | 603 | +        'camera_wb_index': 0,  | 
 | 604 | +        'camera_brightness': 0,  | 
 | 605 | +        'camera_contrast': 0,  | 
 | 606 | +        'camera_saturation': 0,  | 
 | 607 | +        'camera_sharpness': 50,  | 
 | 608 | +        'camera_jpg_quality': 80  | 
 | 609 | +    }  | 
 | 610 | +    allValue['camera_exposure'] = read_camera_wide_exposure()  | 
 | 611 | +    if (allValue['camera_exposure']):  | 
 | 612 | +        print("the wide exposition is: ", allValue['camera_exposure'])  | 
 | 613 | + | 
 | 614 | +    allValue['camera_gain'] = read_camera_wide_gain()  | 
 | 615 | +    if (allValue['camera_gain']):  | 
 | 616 | +        print("the wide gain is:", allValue['camera_gain'])  | 
 | 617 | + | 
 | 618 | +    perform_update_all_camera_setting("wide", allValue, config_to_dwarf_id_str(dwarf_id))  | 
550 | 619 | def option_C5():  | 
551 | 620 |     print("You selected Option C5. Start Imaging Session")  | 
552 | 621 |     print("")  | 
@@ -1416,6 +1485,12 @@ def choice_camera():  | 
1416 | 1485 |         elif user_choice == 'C4':  | 
1417 | 1486 |             option_C4()  | 
1418 | 1487 | 
 
  | 
 | 1488 | +        elif user_choice == 'CT4':  | 
 | 1489 | +            option_CT4()  | 
 | 1490 | + | 
 | 1491 | +        elif user_choice == 'CW4':  | 
 | 1492 | +            option_CW4()  | 
 | 1493 | + | 
1419 | 1494 |         elif user_choice == 'C5':  | 
1420 | 1495 |             option_C5()  | 
1421 | 1496 | 
 
  | 
 | 
0 commit comments