Changeset 414 in flair-src
- Timestamp:
- Mar 26, 2021, 11:31:57 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ReleaseNotes
r413 r414 1 1 * Actual Version: 2 3 - added possibility to autodetect gcs ip when using autodetect as address parameter, see demos. This only works when ssh connected to a target (not in simulation) 2 4 3 5 ----------------------------------------------------------- -
trunk/demos/CircleFollower/uav/resources/armv7a-neon/CircleFollower_ardrone2.sh
r301 r414 1 ./CircleFollower_nrt -a 192.168.147.193-p 9000 -l /tmp -x CircleFollower_ardrone2.xml -n Drone_0 -t ardrone21 ./CircleFollower_nrt -a autodetect -p 9000 -l /tmp -x CircleFollower_ardrone2.xml -n Drone_0 -t ardrone2 -
trunk/demos/CircleFollower/uav/resources/armv7a-neon/CircleFollower_bebop.sh
r301 r414 1 ./CircleFollower_nrt -a 192.168.42.24-p 9000 -l /tmp -x CircleFollower_bebop.xml -n Drone_0 -t bebop1 ./CircleFollower_nrt -a autodetect -p 9000 -l /tmp -x CircleFollower_bebop.xml -n Drone_0 -t bebop -
trunk/demos/CircleFollower/uav/resources/armv7a-neon/CircleFollower_hdsx8.sh
r301 r414 1 ./CircleFollower_rt -a 192.168.147.217-p 9000 -l /tmp -x CircleFollower_hdsx8.xml -n x8_0 -t hds_x81 ./CircleFollower_rt -a autodetect -p 9000 -l /tmp -x CircleFollower_hdsx8.xml -n x8_0 -t hds_x8 -
trunk/demos/DemoGps/uav/resources/armv7a-neon/Gps_bebop.sh
r405 r414 1 ./DemoGps_nrt -a 192.168.42.24-p 9000 -l /tmp -x Gps_bebop.xml -n Drone_0 -t bebop1 ./DemoGps_nrt -a autodetect -p 9000 -l /tmp -x Gps_bebop.xml -n Drone_0 -t bebop -
trunk/demos/DemoOpticalFlow/uav/resources/armv7a-neon/OpticalFlow_ardrone2.sh
r405 r414 1 ./DemoOpticalFlow_nrt -a 192.168.147.217-p 9000 -l /tmp -x OpticalFlow_ardrone2.xml -n Drone_0 -t ardrone2 -v ./dspcv_dsp.out1 ./DemoOpticalFlow_nrt -a autodetect -p 9000 -l /tmp -x OpticalFlow_ardrone2.xml -n Drone_0 -t ardrone2 -v ./dspcv_dsp.out -
trunk/demos/MixedReality/real/uav/resources/armv7a-neon/MixedReality_ardrone2.sh
r301 r414 1 ./MixedReality_uav_real_nrt -a 192.168.147.193-p 9000 -l /tmp -x MixedReality_ardrone2.xml -n Drone_0 -t ardrone21 ./MixedReality_uav_real_nrt -a autodetect -p 9000 -l /tmp -x MixedReality_ardrone2.xml -n Drone_0 -t ardrone2 -
trunk/demos/MixedReality/real/uav/resources/armv7a-neon/MixedReality_bebop.sh
r301 r414 1 ./MixedReality_uav_real_nrt -a 192.168.42.24-p 9000 -l /tmp -x MixedReality_bebop.xml -n Drone_0 -t bebop1 ./MixedReality_uav_real_nrt -a autodetect -p 9000 -l /tmp -x MixedReality_bebop.xml -n Drone_0 -t bebop -
trunk/demos/MixedReality/real/uav/resources/armv7a-neon/MixedReality_hdsx8.sh
r301 r414 1 ./MixedReality_uav_real_rt -a 192.168.147.217-p 9000 -l /tmp -x MixedReality_hdsx8.xml -n x8_0 -t hds_x81 ./MixedReality_uav_real_rt -a autodetect -p 9000 -l /tmp -x MixedReality_hdsx8.xml -n x8_0 -t hds_x8 -
trunk/demos/PidStandalone/uav/resources/armv7a-neon/demo_pid_ardrone2.sh
r301 r414 1 ./PidStandalone_nrt -a 192.168.147.192-p 9000 -l /tmp -x reglages_ardrone2.xml -n Drone_0 -t ardrone21 ./PidStandalone_nrt -a autodetect -p 9000 -l /tmp -x reglages_ardrone2.xml -n Drone_0 -t ardrone2 -
trunk/demos/SimpleFleet/uav/resources/armv7a-neon/SimpleFleet.sh
r386 r414 1 ./SimpleFleet_nrt -a 192.168.147.193-p 9000 -l /tmp -x SimpleFleet_ardrone2.xml -n Drone_0 -t ardrone2 -b 172.26.223.255:200101 ./SimpleFleet_nrt -a autodetect -p 9000 -l /tmp -x SimpleFleet_ardrone2.xml -n Drone_0 -t ardrone2 -b 172.26.223.255:20010 -
trunk/lib/FlairCore/src/FrameworkManager_impl.cpp
r313 r414 221 221 return; 222 222 } 223 if(address=="autodetect") { 224 Printf("autodetecting gcs ip address based on ssh connection\n"); 225 address=AutoDetectGCS(); 226 } 223 227 this->address=address; 224 228 this->port=port; … … 246 250 gcs_watchdog = new Watchdog(this, std::bind(&FrameworkManager_impl::SetConnectionLost, this),watchdogTimeout); 247 251 gcs_watchdog->Start(); 252 } 253 254 string FrameworkManager_impl::AutoDetectGCS(void) { 255 FILE *fp; 256 char result[15]; 257 258 //get only first result and remove line feed 259 fp = popen("who | awk '{ print $7; }' | head -n 1 | tr -d '\n'", "r"); 260 if (fp == NULL) { 261 Err("Failed to run autodetect command\n" ); 262 } 263 264 fgets(result, sizeof(result), fp); 265 pclose(fp); 266 267 return result; 248 268 } 249 269 … … 295 315 // it switches back to RT in ProcessXML when mutex are locked 296 316 void FrameworkManager_impl::Run(void) { 317 318 if (self->ErrorOccured() == true) { 319 return ; 320 } 321 322 297 323 while (!ToBeStopped()) { 298 324 ssize_t bytesRead; -
trunk/lib/FlairCore/src/unexported/FrameworkManager_impl.h
r254 r414 90 90 void SaveXmlChange(char *buf); 91 91 void SaveXml(void); 92 std::string AutoDetectGCS(void); 92 93 size_t rcv_buf_size; 93 94 char *rcv_buf;
Note:
See TracChangeset
for help on using the changeset viewer.