Changeset 1944
- Timestamp:
- 04/03/10 18:42:09 (22 months ago)
- Location:
- trunk
- Files:
-
- 20 edited
-
i18n/lome_de.qm (modified) (previous)
-
i18n/lome_de.ts (modified) (9 diffs)
-
i18n/lome_hr.qm (modified) (previous)
-
i18n/lome_hr.ts (modified) (14 diffs)
-
loplug/plugins/cockpit/cockpit_view.py (modified) (4 diffs)
-
loplug/plugins/cockpit/gauges/gaugemodel.py (modified) (2 diffs)
-
loplug/plugins/cockpit/gauges/views/light.py (modified) (1 diff)
-
loplug/plugins/common/pgpluginclient.py (modified) (18 diffs)
-
loplug/plugins/common/pgproxyclient.py (modified) (6 diffs)
-
loplug/plugins/common/pgservice.py (modified) (1 diff)
-
loplug/plugins/datalink/pgdatalink.py (modified) (6 diffs)
-
loplug/plugins/general/pggeneral.py (modified) (3 diffs)
-
loplug/plugins/input/pginput.py (modified) (1 diff)
-
loplug/plugins/lockon/alarm.py (modified) (7 diffs)
-
loplug/plugins/lockon/llf.py (modified) (9 diffs)
-
loplug/plugins/lockon/pglockon.py (modified) (1 diff)
-
loplug/plugins/lockon/screenshot.py (modified) (7 diffs)
-
loplug/plugins/teamspeak/pgteamspeak.py (modified) (4 diffs)
-
loplug/plugins/texttospeech/pgtexttospeech.py (modified) (1 diff)
-
loplug/plugins/x52pro/pgx52pro.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/i18n/lome_de.ts
r1940 r1944 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <!DOCTYPE TS><TS version="1.1" language="de"> 2 <!DOCTYPE TS> 3 <TS version="2.0" language="de"> 3 4 <context> 4 5 <name>AboutDlg</name> … … 31 32 <location filename="common/about.py" line="123"/> 32 33 <source>Close</source> 33 <translation type="unfinished"></translation>34 <translation>SchlieÃen</translation> 34 35 </message> 35 36 </context> … … 107 108 <location filename="loplug/plugins/lockon/alarm.py" line="213"/> 108 109 <source>Provides value for G min marker</source> 109 <translation type="unfinished"></translation>110 <translation>Stellt den Wert fÃŒr den G min Marker zur VerfÃŒgung</translation> 110 111 </message> 111 112 <message> 112 113 <location filename="loplug/plugins/lockon/alarm.py" line="221"/> 113 114 <source>Provides value for G max marker</source> 114 <translation type="unfinished"></translation>115 <translation>Stellt den Wert fÃŒr den G max Marker zur VerfÃŒgung</translation> 115 116 </message> 116 117 <message> 117 118 <location filename="loplug/plugins/lockon/alarm.py" line="229"/> 118 119 <source>Reset the G min & max markers</source> 119 <translation type="unfinished"></translation>120 <translation>Den G min & max Marker zurÃŒcksetzen</translation> 120 121 </message> 121 122 </context> … … 246 247 <location filename="loplug/plugins/cockpit/cockpit_view.py" line="59"/> 247 248 <source>LoPlug - Cockpit</source> 248 <translation type="unfinished"></translation>249 <translation>LoPlug - Cockpit</translation> 249 250 </message> 250 251 </context> … … 1553 1554 <location filename="lotatc_client/lotatc_actions.py" line="90"/> 1554 1555 <source>Imperial</source> 1555 <translation type="unfinished"></translation>1556 <translation>Imperial</translation> 1556 1557 </message> 1557 1558 </context> … … 3239 3240 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="474"/> 3240 3241 <source>Ts channel list</source> 3241 <translation type="unfinished"></translation>3242 <translation>TS Channel-Liste</translation> 3242 3243 </message> 3243 3244 </context> … … 3338 3339 <location filename="loplug/server/plugins_configuration.py" line="40"/> 3339 3340 <source>LoPlug - Configuration</source> 3340 <translation type="unfinished"></translation>3341 <translation>LoPlug - Konfiguration</translation> 3341 3342 </message> 3342 3343 </context> … … 3622 3623 <message> 3623 3624 <location filename="common/unitloader.py" line="208"/> 3624 <source> °</source>3625 <source>°</source> 3625 3626 <translation>°</translation> 3626 3627 </message> … … 4525 4526 <location filename="loplug/plugins/cockpit/gauges/views/browser.py" line="69"/> 4526 4527 <source>Go</source> 4527 <translation type="unfinished"></translation>4528 <translation>Los</translation> 4528 4529 </message> 4529 4530 </context> -
trunk/i18n/lome_hr.ts
r1940 r1944 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <!DOCTYPE TS><TS version="1.1" language="hr_HR"> 2 <!DOCTYPE TS> 3 <TS version="2.0" language="hr_HR"> 3 4 <context> 4 5 <name>AboutDlg</name> … … 31 32 <location filename="common/about.py" line="123"/> 32 33 <source>Close</source> 33 <translation type="unfinished"></translation>34 <translation>Zatvori</translation> 34 35 </message> 35 36 </context> … … 107 108 <location filename="loplug/plugins/lockon/alarm.py" line="213"/> 108 109 <source>Provides value for G min marker</source> 109 <translation type="unfinished"></translation>110 <translation>Daje vrijednost za oznaku najmanjeg G</translation> 110 111 </message> 111 112 <message> 112 113 <location filename="loplug/plugins/lockon/alarm.py" line="221"/> 113 114 <source>Provides value for G max marker</source> 114 <translation type="unfinished"></translation>115 <translation>Daje vrijednost za oznaku najveÄeg G</translation> 115 116 </message> 116 117 <message> 117 118 <location filename="loplug/plugins/lockon/alarm.py" line="229"/> 118 119 <source>Reset the G min & max markers</source> 119 <translation type="unfinished"></translation>120 <translation>PoniÅ¡ti oznake najveÄeg i najmanjeg G</translation> 120 121 </message> 121 122 </context> … … 246 247 <location filename="loplug/plugins/cockpit/cockpit_view.py" line="59"/> 247 248 <source>LoPlug - Cockpit</source> 248 <translation type="unfinished"></translation>249 <translation>LoPlug - Kabina</translation> 249 250 </message> 250 251 </context> … … 1557 1558 <location filename="lotatc_client/lotatc_actions.py" line="90"/> 1558 1559 <source>Imperial</source> 1559 <translation type="unfinished">AngloameriÄki</translation>1560 <translation>AngloameriÄki</translation> 1560 1561 </message> 1561 1562 </context> … … 2990 2991 <name>PGCockpit</name> 2991 2992 <message> 2992 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="6 9"/>2993 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="65"/> 2993 2994 <source>Toggle the cockpit light</source> 2994 2995 <translation>Prebaci svjetlo kabine</translation> 2995 2996 </message> 2996 2997 <message> 2997 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="7 7"/>2998 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="73"/> 2998 2999 <source>Toggle the flaps position</source> 2999 3000 <translation>Prebaci poloÅŸaj zakrilca</translation> 3000 3001 </message> 3001 3002 <message> 3002 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="8 5"/>3003 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="81"/> 3003 3004 <source>Set the flaps in</source> 3004 3005 <translation>Podigni zakrilca</translation> 3005 3006 </message> 3006 3007 <message> 3007 <location filename="loplug/plugins/cockpit/pgcockpit.py" line=" 93"/>3008 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="89"/> 3008 3009 <source>Set the flaps out</source> 3009 3010 <translation>Spusti zakrilca</translation> 3010 3011 </message> 3011 3012 <message> 3012 <location filename="loplug/plugins/cockpit/pgcockpit.py" line=" 101"/>3013 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="97"/> 3013 3014 <source>Toggle the AF position</source> 3014 3015 <translation>Prebaci poloÅŸaj zraÄne koÄnice</translation> 3015 3016 </message> 3016 3017 <message> 3017 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="10 9"/>3018 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="105"/> 3018 3019 <source>Set the AF in</source> 3019 3020 <translation>Zatvori zraÄnu koÄnicu</translation> 3020 3021 </message> 3021 3022 <message> 3022 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="11 7"/>3023 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="113"/> 3023 3024 <source>Set the AF out</source> 3024 3025 <translation>Otvori zraÄnu koÄnicu</translation> 3025 3026 </message> 3026 3027 <message> 3027 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="12 6"/>3028 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="122"/> 3028 3029 <source>Toggle the gear position</source> 3029 3030 <translation>Prebaci poloÅŸaj podvozja</translation> 3030 3031 </message> 3031 3032 <message> 3032 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="13 4"/>3033 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="130"/> 3033 3034 <source>Set the gear down</source> 3034 3035 <translation>Spusti podvozje</translation> 3035 3036 </message> 3036 3037 <message> 3037 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="1 42"/>3038 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="138"/> 3038 3039 <source>Set the gear up</source> 3039 3040 <translation>Podigni podvozje</translation> 3040 3041 </message> 3041 3042 <message> 3042 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="36 9"/>3043 <location filename="loplug/plugins/cockpit/pgcockpit.py" line="364"/> 3043 3044 <source>Display local cockpit</source> 3044 3045 <translation>PrikaÅŸi lokalnu kabinu</translation> … … 3177 3178 </message> 3178 3179 <message> 3179 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="44 1"/>3180 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="440"/> 3180 3181 <source>Select TS folder</source> 3181 3182 <translation>Odaberi TS mapu</translation> … … 3189 3190 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="77"/> 3190 3191 <source>List of player in the channel</source> 3191 <translation>Popis igraÄa u kanal au</translation>3192 <translation>Popis igraÄa u kanalu</translation> 3192 3193 </message> 3193 3194 <message> 3194 3195 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="91"/> 3195 3196 <source>Notify channel change</source> 3196 <translation>Obavijest kod promjene kanala</translation>3197 <translation>Obavijesti kod promjene kanala</translation> 3197 3198 </message> 3198 3199 <message> 3199 3200 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="98"/> 3200 3201 <source>Notify mute/unmute of micro</source> 3201 <translation>Obavijest kod utiÅ¡avanja/ukljuÄivanja mikrofona</translation>3202 <translation>Obavijesti kod utiÅ¡avanja/ukljuÄivanja mikrofona</translation> 3202 3203 </message> 3203 3204 <message> 3204 3205 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="105"/> 3205 3206 <source>Notify mute/unmute of headphone</source> 3206 <translation>Obavijest kod utiÅ¡avanja/ukljuÄivanja sluÅ¡alica</translation>3207 <translation>Obavijesti kod utiÅ¡avanja/ukljuÄivanja sluÅ¡alica</translation> 3207 3208 </message> 3208 3209 <message> … … 3222 3223 </message> 3223 3224 <message> 3224 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="48 7"/>3225 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="486"/> 3225 3226 <source>Ts player list</source> 3226 3227 <translation>Popis TS igraÄa</translation> 3227 3228 </message> 3228 3229 <message> 3229 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="47 4"/>3230 <location filename="loplug/plugins/teamspeak/pgteamspeak.py" line="473"/> 3230 3231 <source>Ts channel list</source> 3231 <translation type="unfinished"></translation>3232 <translation>Popis TS kanala</translation> 3232 3233 </message> 3233 3234 </context> … … 3328 3329 <location filename="loplug/server/plugins_configuration.py" line="40"/> 3329 3330 <source>LoPlug - Configuration</source> 3330 <translation type="unfinished"></translation>3331 <translation>LoPlug - Konfiguracija</translation> 3331 3332 </message> 3332 3333 </context> … … 3422 3423 </message> 3423 3424 <message> 3424 <location filename="loplug/plugins/lockon/screenshot.py" line="36 4"/>3425 <location filename="loplug/plugins/lockon/screenshot.py" line="360"/> 3425 3426 <source>Screen shot enable</source> 3426 3427 <translation>OmoguÄi slikanje</translation> 3427 3428 </message> 3428 3429 <message> 3429 <location filename="loplug/plugins/lockon/screenshot.py" line="36 6"/>3430 <location filename="loplug/plugins/lockon/screenshot.py" line="362"/> 3430 3431 <source>Screen shot disable</source> 3431 3432 <translation>OnemoguÄi slikanje</translation> … … 3612 3613 <message> 3613 3614 <location filename="common/unitloader.py" line="208"/> 3614 <source> °</source>3615 <source>°</source> 3615 3616 <translation>°</translation> 3616 3617 </message> … … 3671 3672 <location filename="common/about_lotatc.ui" line="47"/> 3672 3673 <source>Version here</source> 3673 <translation type="unfinished"></translation>3674 <translation></translation> 3674 3675 </message> 3675 3676 <message> … … 4515 4516 <name>self.mainW</name> 4516 4517 <message> 4517 <location filename="loplug/plugins/cockpit/gauges/views/browser.py" line="6 9"/>4518 <location filename="loplug/plugins/cockpit/gauges/views/browser.py" line="60"/> 4518 4519 <source>Go</source> 4519 <translation type="unfinished"></translation>4520 <translation>Kreni</translation> 4520 4521 </message> 4521 4522 </context> -
trunk/loplug/plugins/cockpit/cockpit_view.py
r1939 r1944 111 111 self.save() 112 112 self.remove_all_gauges() 113 del self.ui114 self.ui = None115 del self.actions116 self.actions = None113 # del self.ui 114 # self.ui = None 115 # del self.actions 116 # self.actions = None 117 117 event.accept() 118 118 #----------------------------------------------------------------------- … … 178 178 t_key = self.scene.add_gauge( key, gauge ) 179 179 self.ui.mainGV.ensureVisible( gauge.get_graphical_item() ) 180 #self.emit( SIGNAL("add_gauge"), t_key, gauge )180 self.emit( SIGNAL("add_gauge"), t_key, gauge ) 181 181 self.has_changed = True 182 182 #----------------------------------------------------------------------- … … 185 185 def on_remove_gauge( self ): 186 186 gauges = self.scene.remove_selected_gauges() 187 #self.emit( SIGNAL("remove_gauge"), gauges )187 self.emit( SIGNAL("remove_gauge"), gauges ) 188 188 self.has_changed = True 189 189 #----------------------------------------------------------------------- … … 192 192 def remove_all_gauges( self ): 193 193 gauges = self.scene.remove_all_gauges() 194 #self.emit( SIGNAL("remove_gauge"), gauges )194 self.emit( SIGNAL("remove_gauge"), gauges ) 195 195 #----------------------------------------------------------------------- 196 196 ## Return capture rect -
trunk/loplug/plugins/cockpit/gauges/gaugemodel.py
r1939 r1944 18 18 19 19 import sys 20 import os 20 import os, logging 21 21 from PyQt4.QtCore import * 22 22 … … 31 31 self.views_by_request = {} 32 32 self.database = database 33 self.logger = logging.getLogger( "[LoPlug") 33 34 #----------------------------------------------------------------------- 34 35 ## Data is coming -
trunk/loplug/plugins/cockpit/gauges/views/light.py
r1907 r1944 45 45 # @param self instance class 46 46 def _model_updated( self, model, name ): 47 self.debug_logger.error( "model update"+self.get_name() + ":" + name) 47 48 entry = model.database.get( name ) 48 49 status = entry.obj.to_boolean() -
trunk/loplug/plugins/common/pgpluginclient.py
r1939 r1944 57 57 self.options = options 58 58 59 loggerMessageHeader = "[ Plug-%s]" % self.get_name()59 loggerMessageHeader = "[LoPlug]" 60 60 self.logger = logging.getLogger( loggerMessageHeader) 61 61 … … 78 78 self.create_plug_context() 79 79 self.load_config() 80 80 #---------------------------------------------------------------- 81 ## Constructor 82 # @param self instance class 83 def debug( self, msg, level="debug"): 84 f = "[%s] %s" 85 if level == "warning": 86 self.logger.warning( f % (self.get_name(), msg)) 87 elif level == "info": 88 self.logger.info( f % (self.get_name(), msg)) 89 elif level == "error": 90 self.logger.error( f % (self.get_name(), msg)) 91 else: 92 self.logger.debug( f % (self.get_name(), msg)) 93 #---------------------------------------------------------------- 94 ## Constructor 95 # @param self instance class 96 def error( self, msg): 97 self.debug( msg, "error") 98 #---------------------------------------------------------------- 99 ## Constructor 100 # @param self instance class 101 def info( self, msg): 102 self.debug( msg, "info") 81 103 #---------------------------------------------------------------- 82 104 # Tells if this plug is a provider or not … … 304 326 self.cnxObj = CnxObj( sock) 305 327 except socket.error, msg: 306 self. logger.error( socket.error, msg )328 self.error( socket.error, msg ) 307 329 return 308 330 … … 430 452 # @param self instance class 431 453 def __rxThreadEntryPoint__( self): 432 self. logger.info( "Rx thread started")454 self.info( "Rx thread started") 433 455 while( self.goOn): 434 456 # Wait and get message from the server. … … 437 459 except: 438 460 # Connection probably reset by peer 439 self. logger.info( "An error occurs on recv()")461 self.info( "An error occurs on recv()") 440 462 return 441 463 442 464 if len( rxFrames[0]): 443 # self. logger.info( "Buffer received")465 # self.info( "Buffer received") 444 466 for rxFrame in rxFrames: 445 467 self.__parse__( rxFrame) 446 468 447 469 else: 448 self. logger.debug( "[%s] Socket closed" % self.get_name() )470 self.debug( "[%s] Socket closed" % self.get_name() ) 449 471 # End of: while( self.goOn) 450 self. logger.info( "[%s] Exit rx loop" % self.get_name() )472 self.info( "[%s] Exit rx loop" % self.get_name() ) 451 473 452 474 #---------------------------------------------------------------- … … 525 547 # @param self instance class 526 548 def _create_plug_context( self): 527 self. logger.info( "WARNING: Does not implement method %s()" % __name__)549 self.info( "WARNING: Does not implement method %s()" % __name__) 528 550 #---------------------------------------------------------------- 529 551 # To init the UI for configuration … … 531 553 # @param dico Options 532 554 def _init_ui( self, options=None ): 533 self. logger.info( "WARNING: Does not implement method %s()" % __name__)555 self.info( "WARNING: Does not implement method %s()" % __name__) 534 556 #---------------------------------------------------------------- 535 557 # To deinit the UI for configuration 536 558 # @param self instance class 537 559 def _deinit_ui( self ): 538 self. logger.info( "WARNING: Does not implement method %s()" % __name__)560 self.info( "WARNING: Does not implement method %s()" % __name__) 539 561 #---------------------------------------------------------------- 540 562 # Provider datas has been updated 541 563 # @param self instance class 542 564 def _update_provider_data( self, data ): 543 self. logger.info( "WARNING: Does not implement method %s()" % __name__)565 self.info( "WARNING: Does not implement method %s()" % __name__) 544 566 #---------------------------------------------------------------- 545 567 # To get configuration widget … … 548 570 # @return config widget 549 571 def _get_config_widget( self, data): 550 self. logger.info( "WARNING: Does not implement method %s()" % __name__)572 self.info( "WARNING: Does not implement method %s()" % __name__) 551 573 return QLabel("No config") 552 574 #---------------------------------------------------------------- … … 560 582 # @param self instance class 561 583 def _load_config( self ): 562 self. logger.info( "WARNING: Does not implement method %s()" % __name__)584 self.info( "WARNING: Does not implement method %s()" % __name__) 563 585 #---------------------------------------------------------------- 564 586 # To save the custom settings 565 587 # @param self instance class 566 588 def _save_config( self ): 567 self. logger.info( "WARNING: Does not implement method %s()" % __name__)589 self.info( "WARNING: Does not implement method %s()" % __name__) 568 590 #---------------------------------------------------------------- 569 591 # To start 570 592 # @param self instance class 571 593 def _start( self ): 572 self. logger.info( "WARNING: Does not implement method %s()" % __name__)594 self.info( "WARNING: Does not implement method %s()" % __name__) 573 595 #---------------------------------------------------------------- 574 596 # Config has been changed 575 597 # @param self instance class 576 598 def _config_has_changed( self): 577 self. logger.info( "WARNING: Does not implement method %s()" % __name__)599 self.info( "WARNING: Does not implement method %s()" % __name__) 578 600 #---------------------------------------------------------------- 579 601 # Units have been updated … … 581 603 # @param name Id of the data 582 604 def _units_updated( self ): 583 self. logger.info( "WARNING: Does not implement method %s()" % __name__)605 self.info( "WARNING: Does not implement method %s()" % __name__) 584 606 #---------------------------------------------------------------- 585 607 # To receive data issued from requests … … 589 611 # @param datas datas 590 612 def _data_received( self, destService, srcPlugId, datas): 591 self. logger.info( "WARNING: Does not implement method %s()" % __name__)613 self.info( "WARNING: Does not implement method %s()" % __name__) 592 614 #---------------------------------------------------------------- 593 615 # Database has been updated for a entry … … 595 617 # @param name Id of the data 596 618 def _database_updated( self, name): 597 self. logger.info( "WARNING: Does not implement method %s()" % __name__)619 self.info( "WARNING: Does not implement method %s()" % __name__) 598 620 #---------------------------------------------------------------- 599 621 # To be notified about a selection in a list … … 603 625 # @param datas datas 604 626 def _selection( self, srcPlugId, list_id, datas): 605 self. logger.info( "WARNING: Does not implement method %s()" % __name__)627 self.info( "WARNING: Does not implement method %s()" % __name__) 606 628 #---------------------------------------------------------------- 607 629 # To receive data request command … … 612 634 # @param supInfo suplementary info 613 635 def _data_requested( self, szDataRequest): 614 self. logger.info( "WARNING: Does not implement method %s()" % __name__)636 self.info( "WARNING: Does not implement method %s()" % __name__) 615 637 #---------------------------------------------------------------- 616 638 # To receive data discard commands … … 619 641 # @param dataId identifier of the requested data 620 642 def _data_discarded( self, szDataDiscard): 621 self. logger.info( "WARNING: Does not implement method %s()" % __name__)643 self.info( "WARNING: Does not implement method %s()" % __name__) 622 644 #---------------------------------------------------------------- 623 645 # To execute a command … … 626 648 # @param cmdData associated data 627 649 def _execute_command( self, cmdId, cmdData): 628 self. logger.info( "WARNING: Does not implement method %s()" % __name__)650 self.info( "WARNING: Does not implement method %s()" % __name__) 629 651 #---------------------------------------------------------------- 630 652 # To be notified about plug reset … … 632 654 # @param datas datas 633 655 def _plug_reset( self, datas): 634 self. logger.info( "WARNING: Does not implement method %s()" % __name__)656 self.info( "WARNING: Does not implement method %s()" % __name__) 635 657 #---------------------------------------------------------------- 636 658 # To implement a process thread … … 639 661 def _process_thread_entry_point( self): 640 662 self.processThreadFlag = False 641 self. logger.info( "WARNING: Does not implement method %s()" % __name__)663 self.info( "WARNING: Does not implement method %s()" % __name__) -
trunk/loplug/plugins/common/pgproxyclient.py
r1939 r1944 79 79 # @param self instance class 80 80 def _shutDown( self): 81 self. logger.debug( "[PGProxyClient.%s] _shutDown()" % self.get_name() )81 self.debug( "[PGProxyClient.%s] _shutDown()" % self.get_name() ) 82 82 # Close connection with server 83 83 if self.serverCnxObj: … … 88 88 # @param self instance class 89 89 def _waitForShutDownComplete(self): 90 self. logger.debug( "[PGProxyClient.%s] _waitForShutDownComplete()" % self.get_name() )90 self.debug( "[PGProxyClient.%s] _waitForShutDownComplete()" % self.get_name() ) 91 91 92 92 … … 179 179 if len( rxFrames[0]) == 0: 180 180 # Server Disconnect 181 self. logger.debug( "[PGProxyClient.%s] Deconnected()" % self.get_name() )181 self.debug( "[PGProxyClient.%s] Deconnected()" % self.get_name() ) 182 182 self.connected = False 183 183 self._disconnected() … … 209 209 sleep(1) 210 210 211 self. logger.debug( "[PGProxyClient.%s] Connect to server %s:%s requested" % ( self.get_name(), self.serverAddr, self.serverPort) )211 self.debug( "[PGProxyClient.%s] Connect to server %s:%s requested" % ( self.get_name(), self.serverAddr, self.serverPort) ) 212 212 213 213 # Create a socket and connect to the server … … 216 216 socketWithServer.connect( ( self.serverAddr, self.serverPort)) 217 217 self.serverCnxObj = CnxObj( socketWithServer) 218 self. logger.debug( "[PGProxyClient.%s] Connected()" % self.get_name() )218 self.debug( "[PGProxyClient.%s] Connected()" % self.get_name() ) 219 219 try: 220 220 self.widgets["lblCnxState"].setText( self.tr("Connected")) … … 224 224 self._connected() 225 225 except socket.error, msg: 226 self. logger.error( msg )226 self.error( msg ) 227 227 self.serverCnxObj = None 228 228 try: -
trunk/loplug/plugins/common/pgservice.py
r1939 r1944 32 32 self.parentPlug = parentPlug 33 33 self.name = self.__class__.__name__ 34 loggerMessageHeader = "[ Plug-%s]" % self.get_name()34 loggerMessageHeader = "[LoPlug]" 35 35 self.logger = logging.getLogger( loggerMessageHeader) 36 #---------------------------------------------------------------- 37 ## Constructor 38 # @param self instance class 39 def debug( self, msg, level="debug"): 40 f = "[%s] %s" 41 if level == "warning": 42 self.logger.warning( f % (self.get_name(), msg)) 43 elif level == "info": 44 self.logger.info( f % (self.get_name(), msg)) 45 elif level == "error": 46 self.logger.error( f % (self.get_name(), msg)) 47 else: 48 self.logger.debug( f % (self.get_name(), msg)) 49 #---------------------------------------------------------------- 50 ## Constructor 51 # @param self instance class 52 def error( self, msg): 53 self.debug( msg, "error") 54 #---------------------------------------------------------------- 55 ## Constructor 56 # @param self instance class 57 def info( self, msg): 58 self.debug( msg, "info") 36 59 #---------------------------------------------------------------- 37 60 # To get plugin/service name -
trunk/loplug/plugins/datalink/pgdatalink.py
r1939 r1944 80 80 # @param self instance class 81 81 def _shutDown( self): 82 self. logger.debug( "[%s] _shutDown()" % self.get_name() )82 self.debug( "[%s] _shutDown()" % self.get_name() ) 83 83 PGProxyClient._shutDown( self) 84 84 #---------------------------------------------------------------- … … 87 87 # @param self instance class 88 88 def _waitForShutDownComplete(self): 89 self. logger.debug( "[%s] _waitForShutDownComplete()" % self.get_name() )89 self.debug( "[%s] _waitForShutDownComplete()" % self.get_name() ) 90 90 PGProxyClient._waitForShutDownComplete( self) 91 91 #---------------------------------------------------------------- … … 93 93 # @param self instance class 94 94 def _connected( self): 95 self. logger.debug( "[%s] _connected()" % self.get_name() )95 self.debug( "[%s] _connected()" % self.get_name() ) 96 96 self.__sendLogin__() 97 97 #---------------------------------------------------------------- … … 99 99 # @param self instance class 100 100 def _disconnected( self): 101 self. logger.debug( "[%s] _disconnected()" % self.get_name() )101 self.debug( "[%s] _disconnected()" % self.get_name() ) 102 102 103 103 #---------------------------------------------------------------- … … 230 230 del self.plugItemRequests[dataId] 231 231 else: 232 self. logger.debug( "[%s] No such a requested for this plug ..." % self.get_name() )232 self.debug( "[%s] No such a requested for this plug ..." % self.get_name() ) 233 233 #---------------------------------------------------------------- 234 234 # To receive data issued from requests … … 303 303 self.send_object( self.plugItemRequests[dataId], PGPluginClient.OPCODE_DATA_VALUE, szObj) 304 304 else: 305 self. logger.debug( "no request for ", dataId )306 305 self.debug( "no request for ", dataId ) 306 -
trunk/loplug/plugins/general/pggeneral.py
r1791 r1944 126 126 # @param plugId the plug to notify. None => All the plugs registered for this event 127 127 def __SendData__( self, dataId, plugId=None): 128 self. logger.info( "sendData: ",dataId)128 self.info( "sendData: " + dataId) 129 129 if self.requests.has_key( dataId): 130 130 obj_to_send = None … … 148 148 # End of: if message 149 149 else: 150 self. logger.info( "No client for data %s -> event not sent\n" % dataId)150 self.info( "No client for data %s -> event not sent\n" % dataId) 151 151 #---------------------------------------------------------------- 152 152 # To init the UI for configuration … … 189 189 # @param datas datas 190 190 def _data_received( self, destService, srcPlugId, datas): 191 self. logger.info( "receive message %s from %s" % ( datas, srcPlugId))191 self.info( "receive message %s from %s" % ( datas, srcPlugId)) -
trunk/loplug/plugins/input/pginput.py
r1939 r1944 421 421 if dataId == PGInput.MOUSE_EVENT_ID: 422 422 # Enable hook mouse process 423 self. logger.debug( "Enable mouse hook -----------------------------------------------------------" )423 self.debug( "Enable mouse hook -----------------------------------------------------------" ) 424 424 self.emit( SIGNAL("EnableMouseHook")) 425 425 -
trunk/loplug/plugins/lockon/alarm.py
r1939 r1944 332 332 # @param supInfo suplementary info 333 333 def _data_requested( self, srcPlugId, itemId, period, supInfo): 334 self. logger.debug( "[Alarm] itemId %s requested from %s [period:%s, supInfo:%s]" % ( itemId, srcPlugId, period, supInfo) )334 self.debug( "[Alarm] itemId %s requested from %s [period:%s, supInfo:%s]" % ( itemId, srcPlugId, period, supInfo) ) 335 335 336 336 # Create entry for this itemId if it does not exist … … 381 381 # @param szobj object 382 382 def _data_received( self, destSvc, srcPlugId, szobj): 383 self. logger.debug( "[Alarm] data received, itemId: ", szobj.data_id)383 self.debug( "[Alarm] data received, itemId: "+str(szobj.data_id )) 384 384 # ----------------------------------------------------------- 385 385 # Message from Lockon.LuaServer … … 415 415 # NEXT_FUEL_THRESHOLD 416 416 elif szobj.data_id == self.build_full_itemId( Alarm.NEXT_FUEL_THRESHOLD): 417 self. logger.debug( self.FuelThresholdIndex )417 self.debug( self.FuelThresholdIndex ) 418 418 self.FuelThresholdIndex = ( self.FuelThresholdIndex + 1) % len( self.FuelAlarmInfoByIndex) 419 self. logger.debug( self.FuelThresholdIndex )419 self.debug( self.FuelThresholdIndex ) 420 420 self.__sendData__( Alarm.FUEL_THRESHOLD_NAME) 421 421 … … 452 452 # @param cmdData associated data 453 453 def _execute_command( self, cmdId, cmdData): 454 self. logger.debug( "[Alarm] Execute command %s with data %s" % ( cmdId, cmdData) )454 self.debug( "[Alarm] Execute command %s with data %s" % ( cmdId, cmdData) ) 455 455 #---------------------------------------------------------------- 456 456 # To shutdown the instance … … 488 488 489 489 if not self.luaParamsInfo[luaItemId]["itemIds"].has_key( itemId): 490 self. logger.debug( serviceInfo["Period"] )490 self.debug( serviceInfo["Period"] ) 491 491 self.luaParamsInfo[luaItemId]["itemIds"][itemId] = { "srcPlugIds":[], "Period":serviceInfo["Period"]} 492 492 … … 506 506 destPlug, dataId = cst_split_on_first_part_of_address( luaItemId) 507 507 szDataRequest = SzDataRequest( self.build_full_itemId(), dataId, period=pgcd) 508 self. logger.debug( self.get_name() )509 self. logger.debug( "Request itemId: %s with period: %s" % ( dataId, pgcd) )508 self.debug( self.get_name() ) 509 self.debug( "Request itemId: %s with period: %s" % ( dataId, pgcd) ) 510 510 self.parentPlug.send_object( [destPlug], PGPluginClient.OPCODE_DATA_REQUESTED, szDataRequest) 511 511 #---------------------------------------------------------------- … … 554 554 # @param options optional parameters which indicates if the options are to be sent 555 555 def __sendData__( self, itemId, plugId=None): 556 self. logger.debug( "[Alarm] __sendData__ for itemId ", itemId)556 self.debug( "[Alarm] __sendData__ for itemId "+ str(itemId ) ) 557 557 if self.plugItemRequests.has_key( itemId): 558 558 obj_to_send = None -
trunk/loplug/plugins/lockon/llf.py
r1939 r1944 262 262 def selection( self, srcPlugId, datas): 263 263 if self.featureEnable: 264 self. logger.debug( "[LLF] feature disable" )264 self.debug( "[LLF] feature disable" ) 265 265 self.featureEnable = False 266 266 … … 273 273 274 274 else: 275 self. logger.debug( "[LLF] feature enable" )275 self.debug( "[LLF] feature enable" ) 276 276 self.featureEnable = True 277 277 … … 326 326 # @param cmdData associated data 327 327 def _execute_command( self, cmdId, cmdData): 328 self. logger.debug( "[LLF] Execute command %s with data %s" % ( cmdId, cmdData) )328 self.debug( "[LLF] Execute command %s with data %s" % ( cmdId, cmdData) ) 329 329 #---------------------------------------------------------------- 330 330 # To shutdown the instance … … 402 402 # Get the next most constraining ground elevation and its arrival time 403 403 nextMapElevation, nextMapTime = self.__getNextMostConstraningGroundElevation__() 404 self. logger.debug( nextMapElevation, nextMapTime )404 self.debug( nextMapElevation, nextMapTime ) 405 405 if nextMapTime == 0: 406 406 # The current position is the most constraining one, there is is no montain to climb. … … 411 411 deltaHeightInPerCent = self.deltaHeight / self.targetedAltitudeASFC 412 412 413 self. logger.debug( "planeHeight: %s, deltaHeight: %s, deltaHeightInPerCent: %s" % ( self.altitudeASFC, self.deltaHeight, deltaHeightInPerCent) )413 self.debug( "planeHeight: %s, deltaHeight: %s, deltaHeightInPerCent: %s" % ( self.altitudeASFC, self.deltaHeight, deltaHeightInPerCent) ) 414 414 415 415 found = False … … 432 432 # Compute corresponding targetedAlitude 433 433 targetedAltitude = self.altitudeASFC - self.altitudeAMSL + nextMapElevation + self.targetedAltitudeASFC 434 self. logger.debug( "ASFC: ", self.altitudeASFC )435 self. logger.debug( "AMSL: ", self.altitudeAMSL )436 self. logger.debug( "tgt : ", targetedAltitude )434 self.debug( "ASFC: ", self.altitudeASFC ) 435 self.debug( "AMSL: ", self.altitudeAMSL ) 436 self.debug( "tgt : ", targetedAltitude ) 437 437 438 438 # Compute the delta (in per cent) between the target and plane altitudes. 439 439 self.deltaHeight = ( targetedAltitude - self.altitudeASFC) 440 self. logger.debug( "delta: ", self.deltaHeight )440 self.debug( "delta: ", self.deltaHeight ) 441 441 deltaHeightInPerCent = self.deltaHeight / self.targetedAltitudeASFC 442 442 … … 450 450 451 451 452 self. logger.debug( "verticalVelocity: %s, requestedVerticalVelocity: %s" % ( self.verticalSpeed, requestedVerticalVelocity) )452 self.debug( "verticalVelocity: %s, requestedVerticalVelocity: %s" % ( self.verticalSpeed, requestedVerticalVelocity) ) 453 453 454 454 # Compute error, integratedError and derivedError … … 457 457 derivedError = error - self.AltiPrevError 458 458 459 self. logger.debug( "error: %s, integratedError: %s" % ( error, self.AltIntragedError) )459 self.debug( "error: %s, integratedError: %s" % ( error, self.AltIntragedError) ) 460 460 461 461 # Compute PID components, and apply threshold on command … … 543 543 mapElevation, latitude, logitude = self.srtm.getElevationByMin( latitude*60, longitude*60) 544 544 self.nextMapElevations.append( mapElevation) 545 self. logger.debug( "idx: %3d -> %s" % ( index+1, mapElevation) )545 self.debug( "idx: %3d -> %s" % ( index+1, mapElevation) ) 546 546 547 547 # Retrieve the elevation with the most constraint -
trunk/loplug/plugins/lockon/pglockon.py
r1939 r1944 180 180 # @param datas datas 181 181 def _selection( self, srcPlugId, listId, datas): 182 self. logger.debug( "[PGLockon] Received selection: %s for listId: %s " % ( datas, listId) )182 self.debug( "[PGLockon] Received selection: %s for listId: %s " % ( datas, listId) ) 183 183 service, listId = cst_split_on_first_part_of_address( listId) 184 184 self.subModule[service]._selection( srcPlugId, listId, datas ) -
trunk/loplug/plugins/lockon/screenshot.py
r1939 r1944 217 217 # @param supInfo suplementary info 218 218 def _data_requested( self, srcPlugId, itemId, period, supInfo): 219 self. logger.debug( "[Screenshot] request ", srcPlugId, itemId)219 self.debug( "[Screenshot] request %s %s"% ( srcPlugId, itemId ) ) 220 220 # Create entry for this itemId if it does not exist 221 221 if not self.plugItemRequests.has_key( itemId): … … 246 246 def selection( self, srcPlugId, datas): 247 247 if self.is_enable: 248 self. logger.debug( "[Screenshot] feature disable" )248 self.debug( "[Screenshot] feature disable" ) 249 249 self.is_enable = False 250 250 … … 256 256 257 257 else: 258 self. logger.debug( "[Screenshot] feature enable" )258 self.debug( "[Screenshot] feature enable" ) 259 259 self.is_enable = True 260 260 … … 271 271 self.startTimer( self.SEND_PERIOD*1000 ) #- Every minutes 272 272 else: 273 self.directoryWatcher.running = False 274 self.directoryWatcher.wait() 275 self.killTimer() 273 if self.directoryWatcher.running: 274 self.directoryWatcher.running = False 275 self.directoryWatcher.wait() 276 self.killTimer() 276 277 self.__sendData__( None, Screenshot.SCREENSHOT_STATE) 277 278 self.__sendData__( None, Screenshot.SCREENSHOT_STATE_TTS) … … 308 309 309 310 elif szobj.data_id == "Lockon.Screenshot." + self.TOOGLE_SCREENSHOT_FEATURE: 310 self. logger.debug( "Toogle screenshot feature" )311 self.debug( "Toogle screenshot feature" ) 311 312 self.selection( None, None) 312 313 … … 318 319 # @param self instance class 319 320 def _shutDown( self): 320 self.directoryWatcher.running = False 321 self.directoryWatcher.wait() 322 self.directoryWatcher = None 321 if self.directoryWatcher.running: 322 self.directoryWatcher.running = False 323 self.directoryWatcher.wait() 324 self.directoryWatcher = None 323 325 pass 324 326 #---------------------------------------------------------------- … … 380 382 if not srcPlugId: 381 383 srcPlugId = self.plugItemRequests[itemId] 382 self. logger.debug( "[#################]SEND", srcPlugId, itemId)384 self.debug( "[#################]SEND %s %s"%( srcPlugId, itemId )) 383 385 self.parentPlug.send_object( srcPlugId, PGPluginClient.OPCODE_DATA_VALUE, objToSend ) 384 386 #---------------------------------------------------------------- -
trunk/loplug/plugins/teamspeak/pgteamspeak.py
r1939 r1944 371 371 self.selectedChannelName = self.channelInfo[channelId]["name"] 372 372 self.selectedChannelId = channelId 373 self. logger.info( "[Teamspeak] switching to channel ",self.selectedChannelName)373 self.info( "[Teamspeak] switching to channel " + self.selectedChannelName) 374 374 375 375 self.__sendData__( PGTeamspeak.CHANNEL_LIST) … … 391 391 # End of: while( self.goOn): 392 392 393 self. logger.debug( "[Teamspeak] Exits process" )393 self.debug( "[Teamspeak] Exits process" ) 394 394 395 395 #---------------------------------------------------------------- … … 464 464 # @param plugId the plug to notify. None => All the plugs registered for this event 465 465 def __sendData__( self, dataId, plugId=None, list=False): 466 self. logger.info( "sendData: ",dataId)466 self.info( "sendData: " + dataId) 467 467 if self.requests.has_key( dataId): 468 468 obj_to_send = None … … 536 536 # End of: if message 537 537 else: 538 self. logger.info( "No client for data %s -> event not sent\n" % dataId)538 self.info( "No client for data %s -> event not sent\n" % dataId) -
trunk/loplug/plugins/texttospeech/pgtexttospeech.py
r1939 r1944 250 250 self.voiceName = voiceItem.getName() 251 251 except: 252 self. logger.debug( "EXCEPTION IN TTS _deinit_ui" )252 self.debug( "EXCEPTION IN TTS _deinit_ui" ) 253 253 254 254 -
trunk/loplug/plugins/x52pro/pgx52pro.py
r1939 r1944 290 290 if self.x52pro: 291 291 self.x52pro.make_pages() 292 self. logger.info( "receive message %s" % ( name ) )292 self.info( "receive message %s" % ( name ) ) 293 293 #---------------------------------------------------------------- 294 294 # On select callack from X52
Note: See TracChangeset
for help on using the changeset viewer.
