[tuxdroid-svn] r744 - in software/gadgets/settings/trunk: . settings settings/Scripts/Python setti
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2007-11-29 11:21:55
|
Author: Paul_R Date: 2007-11-29 12:21:53 +0100 (Thu, 29 Nov 2007) New Revision: 744 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Improved the self test program. Now, it is compatible with the tuxsetup1.2 beta, and with the factory firmwares. * Added a routine to refresh the installed version in the treeview. * Added the compatibility with the tuxsetup1.2 beta. /!\ The sound is not compatible with it ! Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp 2007-11-29 10:50:21 UTC (rev 743) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp 2007-11-29 11:21:53 UTC (rev 744) @@ -14,6 +14,7 @@ SimpleGladeApp.__init__(self, path, root, domain, **kwargs) self.ok_flag = False self.cancel_flag = False + self.error = [] def new(self): self.get_widget("window1").set_title(_me.string('name_to_read')) @@ -38,9 +39,9 @@ self.view.append_column( self.column ) self.get_widget("scrolledwindow2T").add(self.view) self.get_widget("scrolledwindow2T").show_all() - self.testmode() + def testmode(self): ## Test init self.path = commands.getoutput('echo $USER') @@ -49,7 +50,7 @@ self.tree_store.append(None, [_me.string('Selftest')+'/home/%s/TuxSelftest_%s.txt' %(self.path, self.date)]) self.get_widget('progressbar2T').set_fraction(0) - STEPS = 28.0 + STEPS = 30.0 self.fraction = float(1.0 / STEPS) self.actual_fraction = 0 @@ -72,28 +73,39 @@ self.f.write('%s : ============================================================= \n'%time.asctime()) self.f.write('%s : First step - Reset tux \n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Reset Tux ...']) tux.cmd.raw(0x31, 0, 0, 0) tux.cmd.mouth_close() tux.sys.wait(1) + tux.cmd.eyes_close() + tux.sys.wait(1) tux.cmd.eyes_open() self.f.write('%s :\n'%time.asctime()) - - if tux.status.power_plug() == 0: - self.warning(_me.string('Connect')) + try: + if tux.status.charger_state() == 0: + self.warning(_me.string('Connect')) + except: if tux.status.power_plug() == 0: - self.f.write('%s : The power plug is not detected\n'%time.asctime()) - else: - self.f.write('%s : Power plug detected\n'%time.asctime()) - else: - self.f.write('%s : Power plug detected\n'%time.asctime()) + self.warning(_me.string('Connect')) self.progress_bar() - tux.sys.wait(2) - if tux.status.charger_state() == 1: - self.f.write('%s : Battery charger active\n'%time.asctime()) - else: - self.f.write('%s : Battery charger not active ...\n'%time.asctime()) + tux.sys.wait(1) + try: + if tux.status.charger_state() == 1: + self.f.write('%s : Battery charger active\n'%time.asctime()) + elif tux.status.charger_state() == 0: + self.f.write('%s : Power plug not detected\n'%time.asctime()) + elif tux.status.charger_state() == 2: + self.f.write('%s : Trickle mode\n'%time.asctime()) + elif tux.status.charger_state() == 3: + self.f.write('%s : Power plug detected, no charge\n'%time.asctime()) + except: + if tux.status.power_plug() == 0: + self.f.write('%s : Power plug not detected\n'%time.asctime()) + else: + self.f.write('%s : Power plug detected\n'%time.asctime()) self.progress_bar() @@ -101,39 +113,57 @@ self.f.write('%s :\n'%time.asctime()) self.f.write('%s : Second step : Measures\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + self.tree_store.clear() level1 = tux.status.light_level() + self.tree_store.append(None, ['Light level with the eyes open : %d'%level1]) self.f.write('%s : Light level with the eyes open : %s\n'%(time.asctime(), level1)) - tux.cmd.eyes_close() - tux.sys.wait(0.5) - level2 = tux.status.light_level() + for i in range(2): + tux.cmd.eyes_close() + tux.sys.wait(0.5) + if tux.status.eyes_closed() == 0: + level2 = tux.status.light_level() + break + + + level2 = tux.status.light_level() + self.tree_store.append(None, ['Light level with the eyes closed : %d'%level2]) self.f.write('%s : Light level with the eyes closed : %s\n'%(time.asctime(), level2)) + if level2 + 10 >= level1: + self.error.append('The light level seems bad') + self.progress_bar() - - level = tux.status.battery_level() - self.f.write('%s : Battery level : %s'%(time.asctime(), level[0])) - if level[1] == True: + tux.sys.wait(1) + level1 = tux.status.battery_level() + self.tree_store.clear() + self.tree_store.append(None, ['Battery level with all motors off : %d'%level1[0]]) + self.f.write('%s : Battery level : %s'%(time.asctime(), level1[0])) + if level1[1] == True: self.f.write(' with all motors off\n') else: self.f.write(' with one or more motor(s) running\n') - + self.progress_bar() tux.cmd.eyes_on(0) - tux.sys.wait(0.5) - level = tux.status.battery_level() + tux.sys.wait(1) + level2 = tux.status.battery_level() + self.tree_store.append(None, ['Battery level with one or more motor(s) on : %d'%level2[0]]) tux.cmd.eyes_off() tux.sys.wait(0.5) - self.f.write('%s : Battery level : %s'%(time.asctime(), level[0])) - if level[1] == True: + self.f.write('%s : Battery level : %s'%(time.asctime(), level2[0])) + if level2[1] == True: self.f.write(' with all motors off\n') else: self.f.write(' with one or more motor(s) running\n') + + if level2[0] <= level1[0] - 30: + self.error.append('The batteries seems bad') self.progress_bar() - tux.cmd.eyes_close() + tux.sys.wait(1) tux.cmd.eyes_open() def buttons_tests(self): @@ -148,7 +178,7 @@ self.progress_bar() self.warning(_me.string('Switch')) - + self.f.write('%s : Test the switches with the wings low\n'%time.asctime()) tux.event.on_head_bt_pushed = self.on_head_bt_pushed tux.event.on_lwing_bt_pushed = self.on_lwing_bt_pushed tux.event.on_rwing_bt_pushed = self.on_rwing_bt_pushed @@ -170,7 +200,47 @@ self.f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) self.f.write('%s : Right wing released : %s\n'%(time.asctime(), str(self.rwing[1]))) + if self.head[0] == False or self.head[1] == False: + self.error.append('The head button seems bad') + if self.lwing[0] == False or self.lwing[1] == False: + self.error.append('The left wing button seems bad (low position)') + if self.rwing[0] == False or self.rwing[1] == False: + self.error.append('The right wing button seems bad (low position)') + self.progress_bar() + + try: + tux.cmd.wings_up() + except: + tux.cmd.wings_on(1) + + self.warning(_me.string('Switch')) + self.f.write('%s : Test the switches with the wings up\n'%time.asctime()) + self.head = [False, False] + self.lwing = [False, False] + self.rwing = [False, False] + + timer = time.time() + while time.time() <= timer + 15: + if self.rwing[0] and self.rwing[1] and self.lwing[0] and self.lwing[1] and self.head[0] and self.head[1]: + break + tux.sys.wait(0.5) + + self.progress_bar() + + self.f.write('%s : Head button pressed : %s\n'%(time.asctime(), str(self.head[0]))) + self.f.write('%s : Head button released : %s\n'%(time.asctime(), str(self.head[1]))) + self.f.write('%s : Left wing pressed : %s\n'%(time.asctime(), str(self.lwing[0]))) + self.f.write('%s : Left wing released : %s\n'%(time.asctime(), str(self.lwing[1]))) + self.f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) + self.f.write('%s : Right wing released : %s\n'%(time.asctime(), str(self.rwing[1]))) + + if self.head[0] == False or self.head[1] == False: + self.error.append('The head button seems bad') + if self.lwing[0] == False or self.lwing[1] == False: + self.error.append('The left wing button seems bad (high position)') + if self.rwing[0] == False or self.rwing[1] == False: + self.error.append('The right wing button seems bad (high position)') def leds_tests(self): self.f.write('%s :\n'%time.asctime()) @@ -221,8 +291,10 @@ self.f.write('%s : Tux received correctly the remote control signal\n'%time.asctime()) break tux.sys.wait(0.5) + if time.time() >= timer + 15: self.f.write('%s : Tux not received correctly the remote control signal\n'%time.asctime()) + self.error.append('The IR captor seems bad') self.progress_bar() @@ -230,33 +302,63 @@ self.f.write('%s :\n'%time.asctime()) self.f.write('%s : Fifth step : Sound\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + if tux.status.sounds_count() == 0: - f.write('%s : The sound flash is empty\n'%time.asctime()) + self.f.write('%s : The sound flash is empty\n'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Sound flash empty ...']) + self.error.append('The flash memory is empty') else: + self.tree_store.clear() + self.tree_store.append(None, ['Playing a sound from the flash memory']) tux.cmd.sound_play(1) - while tux.status.sound_play()[0] != 0: - tux.sys.wait(0.5) + try: + while tux.status.sound_play()[0] != 0: + tux.sys.wait(0.5) + except: + while tux.status.flash_status()[0] != 0: + tux.sys.wait(0.5) self.question(_me.string('Sound')) if self.ok_flag != True: self.warning(_me.string('Sound1')) + + self.tree_store.clear() + self.tree_store.append(None, ['Playing a sound from the flash memory']) tux.cmd.sound_play(1) - while tux.status.sound_play()[0] != 0: - tux.sys.wait(0.5) - + try: + while tux.status.sound_play()[0] != 0: + tux.sys.wait(0.5) + except: + while tux.status.flash_status()[0] != 0: + tux.sys.wait(0.5) + self.question(_me.string('Sound')) if self.ok_flag != True: - self.f.write('%s : No sound heard\n'%time.asctime()) + self.f.write('%s : No flash sound heard\n'%time.asctime()) + self.error.append('No flash sound heard') else: - self.f.write('%s : Sound OK at the second time\n'%time.asctime()) + self.f.write('%s : Flash sound OK at the second time\n'%time.asctime()) else: - self.f.write('%s : Sound OK\n'%time.asctime()) + self.f.write('%s : Flash sound OK\n'%time.asctime()) self.progress_bar() + self.tree_store.clear() + self.tree_store.append(None, ['Playing a wav file from the computer']) + tux.wav.play(_me.get_path('sounds')+'/test.wav') + self.question(_me.string('Sound')) + if self.ok_flag != True: + self.f.write('%s : No streaming heard\n'%time.asctime()) + self.error.append('No streaming heard') + else: + self.f.write('%s : Streaming OK\n'%time.asctime()) + self.warning(_me.string('Mic')) + self.tree_store.clear() + self.tree_store.append(None, ['Recording the microphone']) tux.micro.on() tux.cmd.mouth_open() tux.micro.capture_start('/tmp/capture.wav', 3) @@ -264,7 +366,7 @@ tux.micro.off() self.progress_bar() - + self.tree_store.append(None, ['Playing the recorded sound']) tux.wav.play('/tmp/capture.wav') self.question(_me.string('Sound')) @@ -272,12 +374,14 @@ self.f.write('%s : Microphone OK\n'%time.asctime()) else: self.f.write('%s : No micro signal\n'%time.asctime()) + self.error.append('The micro seems bad') self.progress_bar() self.question(_me.string('Out')) tux.sys.wait(0.1) if self.ok_flag == True: + tux.cmd.sound_play(1) self.question(_me.string('Sound')) @@ -285,6 +389,7 @@ self.f.write('%s : Sound output OK\n'%time.asctime()) else: self.f.write('%s : No sound output\n'%time.asctime()) + self.error.append('No sound output ...') else: self.f.write('%s : The sound output has not been tested\n'%time.asctime()) @@ -298,6 +403,7 @@ self.f.write('%s : Sound input OK\n'%time.asctime()) else: self.f.write('%s : No sound input\n'%time.asctime()) + self.error.append('No sound input ...') else: self.f.write('%s : The sound input has not been tested\n'%time.asctime()) @@ -307,8 +413,6 @@ self.f.write('%s :\n'%time.asctime()) self.f.write('%s : Sixth step : Motors\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) - - self.warning(_me.string('Disconnect')) self.head = [False, False] self.lwing = [False, False] @@ -323,59 +427,120 @@ self.progress_bar() self.f.write('%s : Send a command to raise the wings'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to raise the wings']) self.send_command(tux.cmd.raw(0x39, 0, 0, 0), 0, 0) self.progress_bar() self.f.write('%s : Send a command to lower the wings'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to lower the wings']) self.send_command(tux.cmd.raw(0x3A, 0, 0, 0), 0, 0) self.progress_bar() self.f.write('%s : Move the wings 8 time'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Move the wings 8 time']) self.send_command(tux.cmd.wings_on(8), tux.status.wings_counter, 0) self.progress_bar() self.f.write('%s : Left wing pressed : %s\n'%(time.asctime(), str(self.lwing[0]))) self.f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) + if self.lwing[0] == True: + self.error.append('Left wing switch pressed while moving') + if self.rwing[0] == True: + self.error.append('Right wing switch pressed while moving') + self.f.write('%s : Send a command to close the eyes'%time.asctime()) tux.cmd.eyes_open() + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to close the eyes']) self.send_command(tux.cmd.eyes_close(), tux.status.eyes_closed, 0) self.progress_bar() + self.question(_me.string('Eyes')) + if self.ok_flag == True: + self.f.write('%s : The eyes are correctly closed\n'%time.asctime()) + else: + self.f.write('%s : The eyes are not correctly closed\n'%time.asctime()) + self.error.append('The eyes are not correctly closed') + + self.progress_bar() + self.f.write('%s : Send a command to open the eyes'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to open the eyes']) self.send_command(tux.cmd.eyes_open(), tux.status.eyes_closed, 1) self.progress_bar() self.f.write('%s : Send a command to open the mouth'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to open the mouth']) self.send_command(tux.cmd.mouth_open(), tux.status.mouth_closed, 1) self.progress_bar() self.f.write('%s : Send a command to close the mouth'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to close the mouth']) self.send_command(tux.cmd.mouth_close(), tux.status.mouth_closed, 0) self.progress_bar() + self.warning(_me.string('Disconnect')) + self.f.write('%s : Send a command to spin right'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to spin right']) self.send_command(tux.cmd.spinr_on(4), tux.status.spin_counter, 0) + self.progress_bar() self.f.write('%s : Send a command to spin left'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to spin left']) self.send_command(tux.cmd.spinl_on(4), tux.status.spin_counter, 0) self.progress_bar() + self.f.write('%s : Send a command to shake Tux'%time.asctime()) + self.tree_store.clear() + self.tree_store.append(None, ['Send a command to shake Tux']) + + tux.sys.wait(1) + + for i in range(4): + tux.cmd.spinl_on_free(0) + tux.sys.wait(0.8) + tux.cmd.spinr_on_free(0) + tux.sys.wait(0.8) + + tux.cmd.spinr_off() + tux.cmd.spinl_off() + self.f.write('%s\n'%time.asctime()) tux.sys.wait(2) - if tux.status.charger_state() == 1: - self.f.write('%s : Battery charger active\n'%time.asctime()) - else: - self.f.write('%s : Battery charger not active\n'%time.asctime()) + + try: + if tux.status.charger_state() == 1: + self.f.write('%s : Battery charger active\n'%time.asctime()) + elif tux.status.charger_state() == 0: + self.f.write('%s : Power plug not detected\n'%time.asctime()) + elif tux.status.charger_state() == 2: + self.f.write('%s : Trickle mode\n'%time.asctime()) + elif tux.status.charger_state() == 3: + self.f.write('%s : Power plug detected, no charge\n'%time.asctime()) + except: + if tux.status.power_plug() == 0: + self.f.write('%s : Power plug not detected\n'%time.asctime()) + else: + self.f.write('%s : Power plug detected\n'%time.asctime()) self.progress_bar() @@ -386,11 +551,26 @@ tux.event.on_lwing_bt_released = None tux.event.on_rwing_bt_released = None + self.f.write('%s : =======================================\n'%time.asctime()) + self.f.write('%s : ERRORS\n'%time.asctime()) + self.f.write('%s : =======================================\n'%time.asctime()) + + self.tree_store.clear() + if len(self.error) == 0: + self.tree_store.append(None, ['No error detected']) + self.f.write('%s :No error detected\n'%time.asctime()) + else: + self.tree_store.append(None, ['--- Errors ---']) + for i in range (len(self.error)): + self.f.write(str(time.asctime())+' : '+self.error[i]+'\n') + self.tree_store.append(None, [self.error[i]]) + + self.f.write("%s : Don't forget to see the motors section\n"%time.asctime()) + self.f.close() self.get_widget('progressbar2T').hide() - self.get_widget('window1').destroy() + self.get_widget('btnStopT').set_label(_me.string('Close')) - def on_btnOKT_clicked(self, widget, *args): self.ok_flag = True @@ -398,8 +578,6 @@ self.cancel_flag = True def on_btnStopT_clicked(self, widget, *args): - #self.f.write('%s : Test aborted by user\n'%time.asctime()) - #self.f.close() self.get_widget('window1').destroy() #----------------------------- @@ -407,27 +585,24 @@ #----------------------------- def on_head_bt_pushed(self): self.head[0] = True - self.tree_store.append(None, ['head pushed']) def on_lwing_bt_pushed(self): self.lwing[0] = True - self.tree_store.append(None, ['left wing pushed']) def on_rwing_bt_pushed(self): self.rwing[0] = True - self.tree_store.append(None, ['right wing pushed']) def on_head_bt_released(self): self.head[1] = True - self.tree_store.append(None, ['head released']) + self.tree_store.append(None, ['Head clicked']) def on_lwing_bt_released(self): self.lwing[1] = True - self.tree_store.append(None, ['left wing released']) + self.tree_store.append(None, ['left wing clicked']) def on_rwing_bt_released(self): self.rwing[1] = True - self.tree_store.append(None, ['right wing released']) + self.tree_store.append(None, ['right wing clicked']) def on_remote(self, key): if key == 1: @@ -447,7 +622,6 @@ def send_command(self, command, status, stat_val): for i in range(2): - timer = time.time() act_time = timer command @@ -456,7 +630,11 @@ act_time = time.time() if timer + 4 >= time.time(): - self.result_control(i) + tux.sys.wait(1) + if status() == stat_val: + self.result_control(i) + else: + self.result_control(2) return self.result_control(-1) @@ -488,10 +666,16 @@ def result_control(self, val): if val == -1: self.f.write(' : fail...\n') + self.tree_store.append(None, ['fail...']) elif val == 0: self.f.write(' : done\n') + self.tree_store.append(None, ['done']) elif val == 1: self.f.write(' : done after the second command\n') + self.tree_store.append(None, ['done after the second command']) + elif val == 2: + self.f.write(' : final position detected, but not maintained...\n') + self.tree_store.append(None, ['final position detected, but not maintained...']) tux.sys.wait(1) def waiting(self, signal, value): Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-29 10:50:21 UTC (rev 743) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-29 11:21:53 UTC (rev 744) @@ -22,6 +22,7 @@ self.my_dict = {} _me.insert_funct('avoidchannel', self.avoidchannel) _me.insert_funct('searchWifiChannel', self.searchWifiChannel) + _me.insert_funct('refresh_version', self.refresh_version) def new(self): self.widget_window = True @@ -302,7 +303,6 @@ error = '' try: ID = int(self.get_widget('txtIDNum').get_text()) - print ID if ID == 0 or ID >= 65535: thread.start_new_thread(self.popup, (_me.string('Warning'), _me.string('IDErrorOverflow'), False)) else: @@ -431,62 +431,83 @@ self.cpu_tree_store.append( None,(name, version)) name = 'Firmware' - version = tux.hw.firmware_release_get_version() - if version == (0, 0, 0, 0): - version = _me.string('unreleased') - version_table.append([name,version]) - else: - version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) - version_table.append([name,version]) - tmp = self.cpu_tree_store.append( None,(name, version)) + try: + version = tux.hw.firmware_release_get_version() + if version == (0, 0, 0, 0): + version = _me.string('unreleased') + version_table.append([name,version]) + else: + version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) + version_table.append([name,version]) + except: + version = _me.string('FVersion') + tmp = self.cpu_tree_store.append( None,(name, version)) + name = 'Tuxcore' - ver = tux.hw.behavior_get_version() - version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) - if ver[5]: - version = version + ' : ' + _me.string('official') - else: - version = version + ' : SVN Rev %d'%ver[3] + try: + ver = tux.hw.behavior_get_version() + version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) + if ver[5]: + version = version + ' : ' + _me.string('official') + else: + version = version + ' : SVN Rev %d'%ver[3] + except: + version = _me.string('FVersion') version_table.append([name,version]) self.cpu_tree_store.append( tmp,(name, version)) name = 'Tuxaudio' - ver = tux.hw.audio_get_version() - version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) - if ver[5]: - version = version + ' : ' + _me.string('official') - else: - version = version + ' : SVN Rev %d'%ver[3] + try: + ver = tux.hw.audio_get_version() + version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) + if ver[5]: + version = version + ' : ' + _me.string('official') + else: + version = version + ' : SVN Rev %d'%ver[3] + except: + version = _me.string('FVersion') + version_table.append([name,version]) self.cpu_tree_store.append( tmp,(name, version)) name = 'Tux RF' - ver = tux.hw.tuxrf_get_version() - version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) - if ver[5]: - version = version + ' : ' + _me.string('official') - else: - version = version + ' : SVN Rev %d'%ver[3] + try: + ver = tux.hw.tuxrf_get_version() + version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) + if ver[5]: + version = version + ' : ' + _me.string('official') + else: + version = version + ' : SVN Rev %d'%ver[3] + except: + version = _me.string('FVersion') version_table.append([name,version]) self.cpu_tree_store.append( tmp,(name, version)) name = 'Fux RF' - ver = tux.hw.fuxrf_get_version() - version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) - if ver[5]: - version = version + ' : ' + _me.string('official') - else: - version = version + ' : SVN Rev %d'%ver[3] + try: + ver = tux.hw.fuxrf_get_version() + version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) + if ver[5]: + version = version + ' : ' + _me.string('official') + else: + version = version + ' : SVN Rev %d'%ver[3] + except: + version = _me.string('FVersion') + version_table.append([name,version]) self.cpu_tree_store.append( tmp,(name, version)) name = 'Fux USB' - ver = tux.hw.fuxusb_get_version() - version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) - if ver[5]: - version = version + ' : ' + _me.string('official') - else: - version = version + ' : SVN Rev %d'%ver[3] + try: + ver = tux.hw.fuxusb_get_version() + version = str(ver[0])+'.'+str(ver[1])+'.'+str(ver[2]) + if ver[5]: + version = version + ' : ' + _me.string('official') + else: + version = version + ' : SVN Rev %d'%ver[3] + except: + version = _me.string('FVersion') version_table.append([name,version]) self.cpu_tree_store.append( tmp,(name, version)) @@ -650,9 +671,6 @@ for i in range (len(new_wav_order)): wavs.add_wav_path(new_wav_order[i]) - print wavs.wav_paths - print len(wavs.wav_paths) - self.refresh_flag = True self.refresh_wav_list() self.refresh_flag = False @@ -790,7 +808,6 @@ tux.cmd.sound_erase() tux.sys.wait(0.1) while tux.status.sound_record()[0] != 0: - print 'waiting' tux.sys.wait(0.1) Modified: software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp 2007-11-29 10:50:21 UTC (rev 743) +++ software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp 2007-11-29 11:21:53 UTC (rev 744) @@ -8,12 +8,10 @@ ## Refresh the channels - print 'test window' if _me.get_funct('avoidchannel') != None and _me.get_param('widget_window') == True: - print 'avoid channel' _me.get_funct('avoidchannel')() _me.get_funct('searchWifiChannel')() - print 'end' + _me.get_funct('refresh_version')() # Control the sleep @@ -21,7 +19,7 @@ if _me.get_param('EnableSleep') == True and _me.get_param('timeToSleep') != None: if time.time() >= _me.get_param('timeToSleep'): #Send the sleep command - print 'go to sleep now' + pass return False Modified: software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml =================================================================== --- software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-29 10:50:21 UTC (rev 743) +++ software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-29 11:21:53 UTC (rev 744) @@ -28,7 +28,7 @@ <SVN type='str'>SVN</SVN> <lblSleepDelay type='str'>Activer la veille après une période d'inactivité de </lblSleepDelay> <itemDescription type='str'>Voir la description</itemDescription> - <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> + <lblConfigTest type='str'>Auto tests</lblConfigTest> <treeVersionVer type='str'>Version</treeVersionVer> <lblConfigWifi type='str'>Configuration wifi</lblConfigWifi> <Settingsgadget type='str'>Gadget de configuration</Settingsgadget> @@ -38,14 +38,13 @@ <soundProg type='str'>Ecriture du son n° : </soundProg> <soundTOC type='str'>Ecriture des indexes</soundTOC> <Warning type='str'>Attention</Warning> - <chkSleepEnable type='str'>Permettre la mise en veille</chkSleepEnable> + <btnID type='str'>Changer l'ID</btnID> <official type='str'>Version officielle</official> <Disconnect type='str'>Déconnectez l'alimentation de tux puis appuyez sur 'oui'.</Disconnect> <btnSoundAdd type='str'>Ajouter</btnSoundAdd> <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> <lblCurrentIDNum type='str'>L'ID actuel est : </lblCurrentIDNum> - <btnID type='str'>Changer l'ID</btnID> <lblIDName type='str'>Nom du Tux : </lblIDName> <lblSoundExternal type='str'>Lire un wave externe</lblSoundExternal> <lblSoundStore type='str'>Enregistrer des fichiers wave</lblSoundStore> @@ -58,7 +57,7 @@ <unreleased type='str'>Version non officielle</unreleased> <btnSoundRemove type='str'>Enlever</btnSoundRemove> <lblSoundExternalFile type='str'>Fichier :</lblSoundExternalFile> - <lblConfigTest type='str'>Auto tests</lblConfigTest> + <chkSleepEnable type='str'>Permettre la mise en veille</chkSleepEnable> <Start type='str'>Début</Start> <treeFile type='str'>Fichier</treeFile> <lblSoundLocal type='str'>Lire un wave local</lblSoundLocal> @@ -66,6 +65,7 @@ <gui_conf_update_title type='str'>Mise à jour</gui_conf_update_title> <lblTabConfig type='str'>Configuration</lblTabConfig> <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> + <FVersion type='str'>Pas de version trouvée</FVersion> <btnSleepWakeup type='str'>Reveiller</btnSleepWakeup> <btnCancelT type='str'>Non</btnCancelT> <itemChangeLog type='str'>Voir les changements</itemChangeLog> @@ -84,6 +84,7 @@ <Connect type='str'>Connectez l'alimentation de tux puis appuyez sur 'oui'.</Connect> <lblCurrentIDName type='str'>Le nom acteul est : </lblCurrentIDName> + <Close type='str'>Fermer</Close> <Out type='str'>Voulez-vous tester la sortie son de Tux? Vous devez connecter des haut-parleurs dans la prise verte.</Out> @@ -93,7 +94,7 @@ quelque chose à Tux.</Mic> <btnStopT type='str'>Stop</btnStopT> <soundErase type='str'>Effacement de la mémoire ...</soundErase> - <IDErrorOverflow type='str'>L'ID doit être compris entre 1 et 65534</IDErrorOverflow> + <Eyes type='str'>Est-ce que les yeux sont correctement fermés ?</Eyes> <lblSoundExternalPlay type='str'>Lecture</lblSoundExternalPlay> <lblNoChannel type='str'>Pas de connexion wifi trouvée</lblNoChannel> <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> @@ -106,6 +107,7 @@ <btnSelfTest type='str'>Démarrer les tests</btnSelfTest> <lblSleepStateWork type='str'>Tux n'est pas en veille pour le moment</lblSleepStateWork> <treeVersionProg type='str'>Composant</treeVersionProg> + <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> <speaker_name type='str'>Bruno8k</speaker_name> <btnSoundModify type='str'>Modifier</btnSoundModify> <Iwlist type='str'>iwlist n'a pas été trouvée. @@ -115,4 +117,5 @@ <In type='str'>Voulez-vous tester l'entrée son de Tux? Vous devez connecter un périphérique d'entrée dans le connecteur bleu.</In> + <IDErrorOverflow type='str'>L'ID doit être compris entre 1 et 65534</IDErrorOverflow> </strings> Modified: software/gadgets/settings/trunk/settings/about.xml =================================================================== (Binary files differ) Modified: software/gadgets/settings/trunk/settings/settings.xml =================================================================== --- software/gadgets/settings/trunk/settings/settings.xml 2007-11-29 10:50:21 UTC (rev 743) +++ software/gadgets/settings/trunk/settings/settings.xml 2007-11-29 11:21:53 UTC (rev 744) @@ -14,14 +14,14 @@ <visible type='bool'>True</visible> <x type='int'>0</x> </widget> - <conf> - <visible type='bool'>False</visible> - </conf> <selftest> <y type='int'>25</y> <visible type='bool'>True</visible> <x type='int'>0</x> </selftest> + <conf> + <visible type='bool'>False</visible> + </conf> </gui_state> <language type='str'>en_US</language> <notified type='bool'>True</notified> Modified: software/gadgets/settings/trunk/settings/strings.xml =================================================================== --- software/gadgets/settings/trunk/settings/strings.xml 2007-11-29 10:50:21 UTC (rev 743) +++ software/gadgets/settings/trunk/settings/strings.xml 2007-11-29 11:21:53 UTC (rev 744) @@ -3,12 +3,12 @@ <lblLocal type='str'>Available versions</lblLocal> <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> <Firmware type='str'>Be sure that the firmware updater gadget is correctly installed.</Firmware> - <Selftest type='str'>Ceci est un programme de test pour votre Tux. -Veuillez suivre les étapes en effectuant les -tâches qui vous serons demandée. + <Selftest type='str'>This is a self test program for Tux Droid. -A la fin de ce test, vous trouverez un fichier -de log à l'emplacement suivant : +Please follow the instructions and execute the +requested tasks. + +At the end, a log file can be found here : </Selftest> <help_text type='str'> </help_text> @@ -23,7 +23,7 @@ <Sound1 type='str'>Be sure that the sound volume control is at the maximum.</Sound1> <lblIDNum type='str'>Tux's ID : </lblIDNum> - <SVN type='str'>SVN</SVN> + <Sound type='str'>Have you heard the sound ?</Sound> <lblSleepDelay type='str'>Active the sleep mode after a inactivity period of</lblSleepDelay> <itemDescription type='str'>Show the description</itemDescription> <lblConfigTest type='str'>Self tests</lblConfigTest> @@ -46,7 +46,7 @@ <Connect type='str'>Please connect the power plug and press the 'Yes' button</Connect> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> - <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> + <lblSoundStore type='str'>Store wave files locally</lblSoundStore> <btnSleepSleep type='str'>Sleep</btnSleepSleep> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <lblUsedChannel type='str'>Your wifi use the channel :</lblUsedChannel> @@ -60,10 +60,11 @@ <Start type='str'>Start</Start> <treeFile type='str'>Fichier</treeFile> <lblSoundLocal type='str'>Play local wave files</lblSoundLocal> - <lblSoundStore type='str'>Store wave files locally</lblSoundStore> + <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_update_title type='str'>Update</gui_conf_update_title> <lblTabConfig type='str'>Configuration</lblTabConfig> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> + <FVersion type='str'>Version can't be read</FVersion> <btnSleepWakeup type='str'>Wakeup</btnSleepWakeup> <btnCancelT type='str'>No</btnCancelT> <itemChangeLog type='str'>Show ChangeLog</itemChangeLog> @@ -78,15 +79,17 @@ <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <lblIDName type='str'>Tux's name : </lblIDName> <lblCurrentIDName type='str'>The current name is : </lblCurrentIDName> + <Close type='str'>Close</Close> <Out type='str'>Would you like to test the sound output interface? + To do this, you need to connect loudspeakers in the green connector, and press the 'Yes' button.</Out> - <Sound type='str'>Have you heard the sound ?</Sound> + <SVN type='str'>SVN</SVN> <btnOKT type='str'>Yes</btnOKT> <Mic type='str'>After closing this window, say anything to Tux.</Mic> <btnStopT type='str'>Stop</btnStopT> <soundErase type='str'>Erasing flash ...</soundErase> - <IDErrorOverflow type='str'>The ID must be included between 1 and 65534.</IDErrorOverflow> + <Eyes type='str'>Are the eyes correctly closed ?</Eyes> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> <lblNoChannel type='str'>No wifi connection found</lblNoChannel> <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> @@ -110,4 +113,5 @@ To do this, you need to connect an input device in the blue connector and then click 'Yes'.</In> + <IDErrorOverflow type='str'>The ID must be included between 1 and 65534.</IDErrorOverflow> </strings> Modified: software/gadgets/settings/trunk/settings.tgf =================================================================== (Binary files differ) |