equal
deleted
inserted
replaced
1 #!/usr/bin/expect -f |
1 #!/usr/bin/expect -f |
2 #====================================================================== |
2 #====================================================================== |
3 # L A D C P 1 |
3 # 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: Fri Dec 10 14:32:12 2010 |
5 # dlm: Fri Jul 3 10:16:21 2020 |
6 # (c) 2004 A.M. Thurnherr |
6 # (c) 2004 A.M. Thurnherr |
7 # uE-Info: 20 59 NIL 0 0 72 2 2 8 NIL ofnI |
7 # uE-Info: 21 40 NIL 0 0 72 2 2 8 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # HISTORY: |
10 # HISTORY: |
11 # Apr 4, 2004: - adapted from [ladcp2] |
11 # Apr 4, 2004: - adapted from [ladcp2] |
12 # Jun 17, 2004: - BUG: bombed on station #008 (octal digit) |
12 # Jun 17, 2004: - BUG: bombed on station #008 (octal digit) |
16 # Nov 19, 2008: - adapted to new firmware behavior (load_factory_defaults) |
16 # Nov 19, 2008: - adapted to new firmware behavior (load_factory_defaults) |
17 # Nov 19, 2008: - added version |
17 # Nov 19, 2008: - added version |
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 # Dec 10, 2010: - allow restarting a cast with same number |
20 # Dec 10, 2010: - allow restarting a cast with same number |
|
21 # Jul 3, 2020: - expunged master/slave terminology |
21 |
22 |
22 #---------------------------------------------------------------------- |
23 #---------------------------------------------------------------------- |
23 # Setup |
24 # Setup |
24 #---------------------------------------------------------------------- |
25 #---------------------------------------------------------------------- |
25 |
26 |
93 } else { |
94 } else { |
94 send_user "\n"; |
95 send_user "\n"; |
95 } |
96 } |
96 |
97 |
97 exec mkdir $cast_dir; |
98 exec mkdir $cast_dir; |
98 exec cp $master_cmd_file $cast_dir; |
99 exec cp $DL_cmd_file $cast_dir; |
99 exec echo $stn > .last_stn; |
100 exec echo $stn > .last_stn; |
100 cd $cast_dir; |
101 cd $cast_dir; |
101 |
102 |
102 if {![file isfile $master_cmd_file]} { |
103 if {![file isfile $DL_cmd_file]} { |
103 error "Failed to copy $master_cmd_file to [pwd]"; |
104 error "Failed to copy $DL_cmd_file to [pwd]"; |
104 } |
105 } |
105 |
106 |
106 |
107 |
107 regsub {.*/} $argv0 {} basename; |
108 regsub {.*/} $argv0 {} basename; |
108 start_logging [format %s_%s.log $basename $stnstr]; |
109 start_logging [format %s_%s.log $basename $stnstr]; |
113 send_user "\nSetting instrument clock..."; |
114 send_user "\nSetting instrument clock..."; |
114 set_computer_time; |
115 set_computer_time; |
115 set_instrument_clock; |
116 set_instrument_clock; |
116 |
117 |
117 send_user "\nSetting deployment name..."; |
118 send_user "\nSetting deployment name..."; |
118 set_deployment_name [format $master_deployment_name_fmt $stn]; |
119 set_deployment_name [format $DL_deployment_name_fmt $stn]; |
119 |
120 |
120 send_user "\nUploading command file"; |
121 send_user "\nUploading command file"; |
121 upload_file $master_cmd_file [format %s_log $master_cmd_file] "[format $master_deployment_name_fmt $stn].hwconfig"; |
122 upload_file $DL_cmd_file [format %s_log $DL_cmd_file] "[format $DL_deployment_name_fmt $stn].hwconfig"; |
122 |
123 |
123 send_user "\nDone\n"; |
124 send_user "\nDone\n"; |