15
15
config = configparser .ConfigParser ()
16
16
config .read ("config.ini" )
17
17
18
- conf = config ["DEFAULT " ]
18
+ conf = config ["CONNECTION " ]
19
19
20
20
GYRO_PORT = conf .get ("GYRO_PORT" , "COM5" )
21
21
GYRO_RATE = conf .get ("GYRO_RATE" , 57600 )
@@ -69,9 +69,9 @@ def animate(_):
69
69
axes [2 ,1 ].clear ()
70
70
71
71
if CONNECTION_STATUS [GYRO_PORT ] is False :
72
- axes [0 ,0 ].text (0.5 , 0.5 ,'Connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [0 ,0 ].transAxes )
73
- axes [0 ,1 ].text (0.5 , 0.5 ,'Connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [0 ,1 ].transAxes )
74
- axes [1 ,0 ].text (0.5 , 0.5 ,'Connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [1 ,0 ].transAxes )
72
+ axes [0 ,0 ].text (0.5 , 0.5 ,'Gyro connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [0 ,0 ].transAxes )
73
+ axes [0 ,1 ].text (0.5 , 0.5 ,'Gyro connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [0 ,1 ].transAxes )
74
+ axes [1 ,0 ].text (0.5 , 0.5 ,'Gyro connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [1 ,0 ].transAxes )
75
75
elif gyro_data .size != 0 :
76
76
gyro_data [:,0 ] = gyro_data [:,0 ] - time .time ()
77
77
gyro_data [:,1 ][gyro_data [:,1 ]> ECHO_THRESHOLD ] = ECHO_THRESHOLD
@@ -80,9 +80,9 @@ def animate(_):
80
80
axes [1 ,0 ].plot (gyro_data [:,0 ], gyro_data [:,3 ], marker = '' , linestyle = 'solid' , linewidth = 1 )
81
81
82
82
if CONNECTION_STATUS [MAST_PORT ] is False :
83
- axes [1 ,1 ].text (0.5 , 0.5 ,'Connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [1 ,1 ].transAxes )
84
- axes [2 ,0 ].text (0.5 , 0.5 ,'Connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [2 ,0 ].transAxes )
85
- axes [2 ,1 ].text (0.5 , 0.5 ,'Connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [2 ,1 ].transAxes )
83
+ axes [1 ,1 ].text (0.5 , 0.5 ,'Mast connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [1 ,1 ].transAxes )
84
+ axes [2 ,0 ].text (0.5 , 0.5 ,'Mast connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [2 ,0 ].transAxes )
85
+ axes [2 ,1 ].text (0.5 , 0.5 ,'Mast connection failed' , horizontalalignment = 'center' , verticalalignment = 'center' , transform = axes [2 ,1 ].transAxes )
86
86
elif mast_data .size != 0 :
87
87
mast_data [:,0 ] = mast_data [:,0 ] - time .time ()
88
88
mast_data [:,1 ] = - 0.23 * mast_data [:,1 ] + 140.6
0 commit comments