endladcp1
changeset 12 5e67754f6457
parent 11 c39e37d59638
equal deleted inserted replaced
11:c39e37d59638 12:5e67754f6457
     1 #!/usr/bin/expect -f
     1 #!/usr/bin/expect -f
     2 #======================================================================
     2 #======================================================================
     3 #                    / U S E R S / L A D C P / B I N / L A D C P _ A C Q U I R E / E N D L A D C P 1 
     3 #                    E N D L A D C P 1 
     4 #                    doc: Wed Mar 10 22:23:52 2004
     4 #                    doc: Wed Mar 10 22:23:52 2004
     5 #                    dlm: Sun Nov 10 04:15:47 2013
     5 #                    dlm: Fri Jul  3 10:15:18 2020
     6 #                    (c) 2004 A.M. Thurnherr
     6 #                    (c) 2004 A.M. Thurnherr
     7 #                    uE-Info: 58 0 NIL 0 0 72 2 2 8 NIL ofnI
     7 #                    uE-Info: 123 9 NIL 0 0 72 2 2 8 NIL ofnI
     8 #======================================================================
     8 #======================================================================
     9 
     9 
    10 # HISTORY:
    10 # HISTORY:
    11 #  Apr  4, 2004: - adapted from [endladcp2]
    11 #  Apr  4, 2004: - adapted from [endladcp2]
    12 #  Jun 18, 2004: - BUG: could not handle station 008 (illegal octal digit)
    12 #  Jun 18, 2004: - BUG: could not handle station 008 (illegal octal digit)
    18 #  Aug 25, 2010: - DEFAULTS.expect -> CRUISE_SETUP.expect
    18 #  Aug 25, 2010: - DEFAULTS.expect -> CRUISE_SETUP.expect
    19 #		 - libBB.expect -> libRDI.expect
    19 #		 - libBB.expect -> libRDI.expect
    20 #  Aug 26, 2010: - added support for ymodem_download_cmd
    20 #  Aug 26, 2010: - added support for ymodem_download_cmd
    21 #  Dec  1, 2010: - BUG: ymodem_receive_cmd instead of ymodem_download_cmd
    21 #  Dec  1, 2010: - BUG: ymodem_receive_cmd instead of ymodem_download_cmd
    22 #  Nov 10, 2013: - added dir listing before downlaod
    22 #  Nov 10, 2013: - added dir listing before downlaod
       
    23 #  Jul  3, 2020: - expunged master/slave terminology
    23 
    24 
    24 #----------------------------------------------------------------------
    25 #----------------------------------------------------------------------
    25 # Setup
    26 # Setup
    26 #----------------------------------------------------------------------
    27 #----------------------------------------------------------------------
    27 
    28 
    59 # Get Station Number & Carry Out Sanity Checks
    60 # Get Station Number & Carry Out Sanity Checks
    60 #----------------------------------------------------------------------
    61 #----------------------------------------------------------------------
    61 
    62 
    62 send_user "\nGetting station number...";
    63 send_user "\nGetting station number...";
    63 set deployment_name [get_deployment_name];
    64 set deployment_name [get_deployment_name];
    64 if {[scan $deployment_name $master_deployment_name_fmt stn] != 1} {
    65 if {[scan $deployment_name $DL_deployment_name_fmt stn] != 1} {
    65 	send_error "$deployment_name $master_deployment_name_fmt";
    66 	send_error "$deployment_name $DL_deployment_name_fmt";
    66 	error "Can't get station number";
    67 	error "Can't get station number";
    67 }
    68 }
    68 set stnstr [format $stn_format $stn];
    69 set stnstr [format $stn_format $stn];
    69 send_user "\[$stnstr\]";
    70 send_user "\[$stnstr\]";
    70 
    71 
   113 send_user "\nPutting instrument to sleep...";
   114 send_user "\nPutting instrument to sleep...";
   114 put_to_sleep;
   115 put_to_sleep;
   115 	
   116 	
   116 send_user "\nChecking data file...\n";
   117 send_user "\nChecking data file...\n";
   117 set_color 0;
   118 set_color 0;
   118 check_data [format %s000.000 [format $master_deployment_name_fmt $stn]];
   119 check_data [format %s000.000 [format $DL_deployment_name_fmt $stn]];
   119 set_color;
   120 set_color;
   120 
   121 
   121 send_user "Backing up data file...";
   122 send_user "Backing up data file...";
   122 backup_master_data $stn;
   123 backup_DL_data $stn;
   123 
   124 
   124 send_user "\nDone\n"
   125 send_user "\nDone\n"