Changeset 2271
- Timestamp:
- 11/09/10 19:45:14 (19 months ago)
- Location:
- trunk/loplug/plugins
- Files:
-
- 3 edited
-
lockon/llf_fc2.py (modified) (12 diffs)
-
lockon/rtb.py (modified) (1 diff)
-
teamspeak/pgteamspeak.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/loplug/plugins/lockon/llf_fc2.py
r2270 r2271 29 29 class Llf( PGService): 30 30 31 TO OGLE_LLF_FEATURE = CST_LOPLUG_COMMAND + "TOOGLE_LLF_FEATURE"31 TOGGLE_LLF_FEATURE = CST_LOPLUG_COMMAND + "LlfToggleFeature" 32 32 33 33 REQUESTED_DATAS = [ "Lockon.LuaServer." + CST_LOPLUG_REQUEST + "Latitude" … … 91 91 # @param serviceInstanceByItemId service dictionnary to be filled 92 92 def fillProviderInfo( self, providerCapabilities): 93 providerCapabilities.append( ProviderInfo( name = self.tr("TOOGLE_LLF_FEATURE")94 , id = self.build_full_itemId( Llf.TO OGLE_LLF_FEATURE)95 , description = self.tr("To ogle the feature: Low Level Flight")93 providerCapabilities.append( ProviderInfo( name = Llf.TOGGLE_LLF_FEATURE 94 , id = self.build_full_itemId( Llf.TOGGLE_LLF_FEATURE) 95 , description = self.tr("Toggle the feature: Low Level Flight") 96 96 , category = CST_LOPLUG_CAPA_CMD 97 97 , type = CST_LOPLUG_TYPE_STRING … … 114 114 if value: 115 115 self.targetedAltitudeASFC = int( value) 116 self.__computeVerticalVelocityInfo__()117 116 118 117 # Get meshServer (Used to get target altitude) according to the FC version used 119 118 fcVersion = self.parentPlug.getFcVersion() 120 self.mesh = getMeshServer( )119 self.mesh = getMeshServer( fcVersion) 121 120 122 121 … … 181 180 self.samplingPeriod = self.widgets["spx_LlfSamplingPeriod"].value() 182 181 self.targetedAltitudeASFC = self.widgets["spx_LlftargetedAltitude"].value() 183 self.__computeVerticalVelocityInfo__()184 182 #---------------------------------------------------------------- 185 183 # Method invoked by the PGPluginClient parent on restart() … … 202 200 # @param supInfo suplementary info 203 201 def _data_requested( self, srcPlugId, itemId, period, supInfo): 202 print "[LLF] _data_requested() ->", srcPlugId, itemId, period, supInfo 204 203 # Create entry for this itemId if it does not exist 205 204 if not self.plugItemRequests.has_key( itemId): … … 224 223 del self.plugItemRequests[itemId] 225 224 #---------------------------------------------------------------- 226 # A to ogle occurs on the LLF feature225 # A toggle occurs on the LLF feature 227 226 # @param self instance class 228 227 # @param srcPlugId Id of the plug sending the data 229 228 # @param datas datas 230 229 def selection( self, srcPlugId, datas): 230 print "As there is no list -> there is no selection !!! PROBLEM IN RECEIVING THAT ..." 231 pass 231 232 if self.featureEnable: 232 233 self.debug( "[LLF] feature disable" ) … … 256 257 # @param szobj object 257 258 def _data_received( self, destSvc, srcPlugId, szobj): 258 #print "[LLF] data received, itemId: %s, value: %s" % ( szobj.data_id, szobj.text)259 print "[LLF] data received, itemId: %s, value: %s" % ( szobj.data_id, szobj.text) 259 260 260 261 if szobj.data_id == "Lockon.LuaServer.AltitudeAmsl": … … 283 284 self.__monitAltitude__( timeNow) 284 285 self.timeNow = timeNow 286 287 elif szobj.data_id == self.build_full_itemId( Llf.TOGGLE_LLF_FEATURE): 288 if self.featureEnable: 289 print "[LLF] feature disable" 290 self.featureEnable = False 291 else: 292 print "[LLF] feature enable" 293 self.featureEnable = True 294 self.__sendData__( None, Llf.TOGGLE_LLF_FEATURE) 295 285 296 else: 286 297 raise ValueError("Unknown itemId %s" % szobj.data_id) … … 316 327 def __sendData__( self, srcPlugId, itemId): 317 328 objToSend = None 318 if itemId == Llf.TO OGLE_LLF_FEATURE:329 if itemId == Llf.TOGGLE_LLF_FEATURE: 319 330 if self.featureEnable: 320 331 objToSend = SzText( from_id = self.parentPlug.get_name() 321 , data_id = self.build_full_itemId( Llf.TO OGLE_LLF_FEATURE)322 , text = str( " Switch LLFOn")332 , data_id = self.build_full_itemId( Llf.TOGGLE_LLF_FEATURE) 333 , text = str( "LLF is On") 323 334 ) 324 335 else: 325 336 objToSend = SzText( from_id = self.parentPlug.get_name() 326 , data_id = self.build_full_itemId( Llf.TO OGLE_LLF_FEATURE)327 , text = str( " Switch LLFOff")337 , data_id = self.build_full_itemId( Llf.TOGGLE_LLF_FEATURE) 338 , text = str( "LLF is Off") 328 339 ) 329 340 330 341 if objToSend: 331 if notsrcPlugId:332 s rcPlugId = self.plugItemRequests[itemId]333 self.parentPlug.send_object( srcPlugId, PGPluginClient.OPCODE_DATA_VALUE, objToSend )334 335 342 if srcPlugId: 343 self.parentPlug.send_object( [srcPlugId], PGPluginClient.OPCODE_DATA_VALUE, objToSend ) 344 else: 345 self.parentPlug.send_object( self.plugItemRequests[itemId], PGPluginClient.OPCODE_DATA_VALUE, objToSend ) 346 336 347 #---------------------------------------------------------------- 337 348 # Performe the altitude control for the feature … … 414 425 for index in range( 0, nbrOfCheckPoint): 415 426 radius = index * unitaryRadius 416 self.checkPointList.append( CheckPoint( index, radius, self.luaPointList[index]) 427 self.checkPointList.append( CheckPoint( index, radius, self.luaPointList[index])) 417 428 418 429 # Set target elevation for each point according the ground slop at this point … … 551 562 else: 552 563 sign = -1 553 554 return radius = math.sqrt( (radius_C**2) + (elevation_C**2)), sign564 radius = math.sqrt( (radius_C**2) + (elevation_C**2)) 565 return radius, sign 555 566 556 567 # ======================================================================================================== … … 653 664 # Set the a coef for speed vector 654 665 # @param self Instance class 655 def setSpeedVectorCoef( self, aCoefSpeed) 666 def setSpeedVectorCoef( self, aCoefSpeed): 656 667 self.aCoefSpeed = aCoefSpeed 657 668 #---------------------------------------------------------------- 658 669 # Returns the speed vector coef at this point 659 670 # @param self Instance class 660 def getSpeedVectorCoef( self) 671 def getSpeedVectorCoef( self): 661 672 return self.aCoefSpeed 662 673 -
trunk/loplug/plugins/lockon/rtb.py
r2097 r2271 179 179 airportClsId = airportInfo["clsId"].lower() 180 180 self.widgets[airportClsId] = QCheckBox( QString( airportName)) 181 print airportInfo["side"]181 # print airportInfo["side"] 182 182 if airportInfo["side"] == "Blue": 183 183 blueAirports_vBox.addWidget( self.widgets[airportClsId]) -
trunk/loplug/plugins/teamspeak/pgteamspeak.py
r2043 r2271 284 284 # So, here execute restart specific part. 285 285 # @param self instance class 286 # @param srcPlugId Id of the requester plug (renderer) 287 # @param dataId identifier of the requested data 288 # @param period not used 289 # @param supInfo not used 286 # @param szDataRequest serialized request 290 287 def _data_requested( self, szDataRequest): 291 288 # Create entry for this data if not yet done
Note: See TracChangeset
for help on using the changeset viewer.
