[tuxdroid-svn] r602 - in software/gadgets/battery_monitor/trunk: . Battery_monitor_svn Battery_moni
Status: Beta
Brought to you by:
ks156
Author: Paul_R Date: 2007-10-11 17:13:12 +0200 (Thu, 11 Oct 2007) New Revision: 602 Modified: software/gadgets/battery_monitor/trunk/Battery_monitor.tgf software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/widget/other.pyp software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/init.pyp software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml Log: * Added event pattern in the graph. Modified: software/gadgets/battery_monitor/trunk/Battery_monitor.tgf =================================================================== (Binary files differ) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py 2007-10-11 15:13:12 UTC (rev 602) @@ -4,6 +4,7 @@ import os import threading import thread +import math sys.path.append('/opt/tuxdroid/api/python') from tux import * @@ -12,6 +13,9 @@ super(Graph, self).__init__() self.connect("expose_event", self.expose) self.context = None + self.battery = ' ' + self.plugged = ' ' + self.charging = ' ' def expose(self, widget, event): #when an event occur, update the context @@ -84,38 +88,87 @@ #replace the vector to draw text self.context.move_to(self.rect.width * temp_tab[i], self.rect.height - 5) #determine the time labels - self.context.show_text(str((self.measure_graph.rate * self.measure_graph.sample) - ((self.measure_graph.rate) * - self.measure_graph.sample * temp_tab[i])) + " sec.") + txt = ((self.measure_graph.rate * self.measure_graph.sample)/60 - (self.measure_graph.rate * self.measure_graph.sample * temp_tab[i])/60) + txt = str('%.2f' % txt) + self.context.show_text(str(txt) + " min.") self.context.stroke() def draw_label(self): #display sample and rate #move the vector in the bottom - self.context.move_to(5, self.rect.height - 10) - #display the rate - self.context.show_text("rate = "+str(self.measure_graph.rate)+" sec.") - self.context.move_to(5, self.rect.height - 20) - #and the samples - self.context.show_text("samples = "+str(self.measure_graph.sample)) + self.draw_circle(5, self.rect.height - 7, [0.2, 0.2, 0.7]) + self.context.set_source_rgb(0.2, 0.2, 0.2) + self.context.move_to(10, self.rect.height - 2) + self.context.show_text(self.battery) + + self.draw_square(5, self.rect.height - 20, [0.2, 0.2, 0.7]) + self.context.set_source_rgb(0.2, 0.2, 0.2) + self.context.move_to(10, self.rect.height - 15) + self.context.show_text(self.plugged) + + self.draw_triangle(5, self.rect.height - 33, [0.2, 0.2, 0.7]) + self.context.set_source_rgb(0.2, 0.2, 0.2) + self.context.move_to(10, self.rect.height - 28) + self.context.show_text(self.charging) + self.context.stroke() def draw_curve(self): - coeff_y = float(self.rect.height / 340.00) + coeff_y = float(self.rect.height / self.measure_graph.RANGE) coeff_x = float(self.rect.width / (self.measure_graph.sample - 1)) self.fill(coeff_x, coeff_y) #and trace the curce self.context.set_line_width(0.6) - self.context.set_source_rgb(1, 0, 0) + self.context.set_source_rgb(0, 0, 1) self.context.move_to(self.rect.x - 2, self.rect.height + 2) self.context.line_to(self.rect.x, self.rect.height - (self.measure_graph.val_table[0] * coeff_y)) + temp_event = 0 for i, val in enumerate(self.measure_graph.val_table): self.context.line_to(self.rect.x + ((i) * coeff_x), self.rect.height - (val * coeff_y)) + if self.measure_graph.val_table_event[i] == 0: + self.draw_circle(self.rect.x + ((i) * coeff_x), self.rect.height - (val * coeff_y), [0.2, 0.2, 0.7]) + if self.measure_graph.val_table_event[i] == 1: + self.draw_square(self.rect.x + ((i) * coeff_x), self.rect.height - (val * coeff_y), [0.2, 0.2, 0.7]) + if self.measure_graph.val_table_event[i] == 2: + self.draw_triangle(self.rect.x + ((i) * coeff_x), self.rect.height - (val * coeff_y), [0.2, 0.2, 0.7]) + self.context.line_to(self.rect.x + ((i) * coeff_x), self.rect.height + 5) self.context.stroke() + + def draw_square(self, x, y, color): + self.context.stroke() + self.context.set_source_rgb(color[0], color[1], color[2]) + self.context.move_to(x - 4, y - 4) + self.context.rectangle(x - 4, y - 4, 8, 8) + self.context.move_to(x, y) + self.context.fill() + self.context.set_source_rgb(0, 0, 1) - + def draw_triangle(self, x, y, color): + self.context.stroke() + self.context.set_source_rgb(color[0], color[1], color[2]) + self.context.move_to(x, y - 5) + self.context.line_to(x + 5, y + 5) + self.context.line_to(x - 5, y + 5) + self.context.line_to(x, y - 5) + self.context.close_path() + self.context.fill() + self.context.move_to(x, y) + self.context.set_source_rgb(0, 0, 1) + + + def draw_circle(self, x, y, color): + self.context.stroke() + self.context.set_source_rgb(color[0], color[1], color[2]) + self.context.arc(x, y, 4, 0, 2 * math.pi) + self.context.close_path() + self.context.fill() + self.context.move_to(x, y) + self.context.set_source_rgb(0, 0, 1) + + def fill(self, coeff_x, coeff_y): #determine the coefficients to adjust the curve in the window space #Fill... @@ -127,28 +180,31 @@ self.context.line_to(self.rect.x + ((i) * coeff_x), self.rect.height - (val * coeff_y)) self.context.line_to(self.rect.x + ((i) * coeff_x), self.rect.height + 5) self.context.close_path() - self.context.set_source_rgba(1.0, 0, 0, 0.2) + self.context.set_source_rgba(0, 0, 1, 0.2) self.context.fill() class Measure(): - def __init__(self): - #Initial value - self.sample = 500.0 + def __init__(self, sample, rate): + self.rate = rate + self.rate_backup = self.rate + self.sample = sample self.sample_backup = self.sample - self.val_table = [-2] * int(self.sample + 1) + self.val_table = [-2] * int(self.sample) + self.val_table_event = [-1] * int(self.sample) + self.charger_event_backup = 3 self.test_tab = [0] - self.rate = 1.0 - self.rate_backup = self.rate - self.tick = time.time() + self.rate + + + + self.tick = time.time() + 1 self.average = 0 self.count = 0 self.GUI_on = False self.start_flag = True self.wait = time.time() + 2.0 + self.RANGE = 340.0 - - self.__on_battery_mutex = threading.Lock() self.__timeout_mutex = threading.Lock() @@ -165,10 +221,11 @@ self.__tab = self.event_tab for i in range (len(self.__tab)): - self.Threshold_control(i) - self.Change_control(i) + val = self.convert_value(self.__tab[i]) + self.Threshold_control(i, val) + self.Change_control(i, val) - if self.GUI_on: + if self.GUI_on: self.test_tab = self.__tab else: self.event_tab = self.__tab @@ -187,45 +244,58 @@ for i in range (len(self.event_tab)): self.event_tab[i][7] = False + def convert_value(self, table): + if table[1] == 1: + #threshold event + value = table[3] + #100% in the graph = 2.5V + value = (100 * (value - 4)) / 2.5 + return value + else: + value = table[3] + #100% in the graph = 2.5V + value = (100 * (value)) / 2.5 + return value + + - ########################################################### # # Threshold control # ########################################################### - def Threshold_control(self, index): + def Threshold_control(self, index, val): if self.__tab[index][1] == 1: if self.__tab[index][7] != True: if self.__tab[index][2] == 0: #Increasing threshold control - if self.Increase_control(self.__tab[index][3]) == True: + if self.Increase_control(val) == True: self.__tab[index][7] = True elif self.__tab[index][2] == 1: #Decreasing threshold control - if self.Decrease_control(self.__tab[index][3]) == True: + if self.Decrease_control(val) == True: self.__tab[index][7] = True elif self.__tab[index][2] == 2: #Both direction theshold control - if self.Both_control(self.__tab[index][3]) == True: + if self.Both_control(val) == True: self.__tab[index][7] = True def Increase_control(self, value): - val_act = (self.val_table[len(self.val_table)-1]*100) / 1124.0 - val_prev = (self.val_table[len(self.val_table)-2]*100) / 1124.0 + val_act = (self.val_table[len(self.val_table)-1]*100) / self.RANGE + val_prev = (self.val_table[len(self.val_table)-2]*100) / self.RANGE if val_prev <= value and val_act > value: return True def Decrease_control(self, val): - val_act = (self.val_table[len(self.val_table)-1]*100) / 1124.0 - val_prev = (self.val_table[len(self.val_table)-2]*100) / 1124.0 + val_act = (self.val_table[len(self.val_table)-1]*100) / self.RANGE + val_prev = (self.val_table[len(self.val_table)-2]*100) / self.RANGE if val_prev >= val and val_act < val: return True def Both_control(self, val): - val_act = (self.val_table[int(len(self.val_table)-1)]*100) / 1124.0 - val_prev = (self.val_table[int(len(self.val_table)-2)]*100) / 1124.0 + val_act = (self.val_table[int(len(self.val_table)-1)]*100) / self.RANGE + val_prev = (self.val_table[int(len(self.val_table)-2)]*100) / self.RANGE if val_prev <= val and val_act > val or val_prev >= val and val_act < val: return True @@ -235,7 +305,7 @@ # Changes control # ########################################################### - def Change_control(self, i): + def Change_control(self, i, val): #Changements control if self.__tab[i][1] == 0: pts_per_sec = self.sample / (self.rate * self.sample) @@ -243,30 +313,30 @@ if self.__tab[i][7] != True: # Drop change part : if self.__tab[i][2] == 0: - if self.Drop_control(time, self.__tab[i][3], self.__tab[i][8], i) == True: + if self.Drop_control(time, val, self.__tab[i][8], i) == True: self.__tab[i][7] = True # Raise change part if self.__tab[i][2] == 1: - if self.Raise_control(time, self.__tab[i][3], self.__tab[i][8], i) == True: + if self.Raise_control(time, val, self.__tab[i][8], i) == True: self.__tab[i][7] = True # Drop and Raise change if self.__tab[i][2] == 2: - if self.ChangeD_control(time, self.__tab[i][3], self.__tab[i][8], i) == True: + if self.ChangeD_control(time, val, self.__tab[i][8], i) == True: self.__tab[i][7] = True # Raise and Drop change if self.__tab[i][2] == 3: - if self.ChangeU_control(time, self.__tab[i][3], self.__tab[i][8], i) == True: + if self.ChangeU_control(time, val, self.__tab[i][8], i) == True: self.__tab[i][7] = True def Drop_control(self, time, val, timeout, index): #timeout control : to prevent multiple notifications with the same event if timeout != 0: - timeout -= 1 + timeout -= 1 init_val = len(self.val_table) - 1 - int(time) + timeout maximum = max(self.val_table[init_val:len(self.val_table)-1]) - - if maximum >= self.val_table[len(self.val_table)-1] + ((val/100)*1124): + + if maximum >= self.val_table[len(self.val_table)-1] + ((val/100)*self.RANGE): self.__tab[index][8] = int(time) return True else: @@ -277,7 +347,7 @@ timeout -= 1 init_val = len(self.val_table) - 1 - int(time) + timeout minimum = min(self.val_table[init_val:(len(self.val_table)-1)]) - if minimum <= self.val_table[len(self.val_table)-1] - ((val/100)*1124): + if minimum <= self.val_table[len(self.val_table)-1] - ((val/100)*self.RANGE): self.__tab[index][8] = int(time) return True else: @@ -289,7 +359,7 @@ init_val = len(self.val_table) - 1 - int(time) + timeout maximum = max(self.val_table[init_val:len(self.val_table)-1]) for i in range(int(time - timeout)): - if self.val_table[int(len(self.val_table)-1-i)] <= self.val_table[len(self.val_table) - 1] - ((val/100)*1124): + if self.val_table[int(len(self.val_table)-1-i)] <= self.val_table[len(self.val_table) - 1] - ((val/100)*self.RANGE): maximum = max(self.val_table[init_val:len(self.val_table) - i]) if maximum >= self.val_table[len(self.val_table) - 1 - i] + val: self.__tab[index][8] = int(time) @@ -304,7 +374,7 @@ init_val = len(self.val_table) - 1 - int(time) + timeout maximum = max(self.val_table[init_val:len(self.val_table)-1]) for i in range(int(time - timeout)): - if self.val_table[int(len(self.val_table)-1-i)] >= self.val_table[len(self.val_table) - 1] + ((val/100)*1124): + if self.val_table[int(len(self.val_table)-1-i)] >= self.val_table[len(self.val_table) - 1] + ((val/100)*self.RANGE): minimum = min(self.val_table[init_val:len(self.val_table)-i]) if minimum <= self.val_table[len(self.val_table) - 1 - i] - val: self.__tab[index][8] = int(time) @@ -344,27 +414,46 @@ # ########################################################### def on_battery_level(self, args): - self.__on_battery_mutex.acquire() - self.average += (args[0] * 256) + args[1] - self.count += 1 - if self.sample_backup != self.sample: - self.sample = self.sample_backup - self.val_table = [-2] * int(self.sample) - if self.rate_backup != self.rate: - self.rate_has_changed() - - if self.tick <= time.time(): - self.tick = time.time() + self.rate - val = self.average / self.count - val = val - 530 - self.val_table.append(val) - self.val_table.pop(0) - self.average = 0 - self.count = 0 - if self.GUI_on: - self.graph_measure.refresh() - self.event_control() - self.__on_battery_mutex.release() + try: + self.__on_battery_mutex.acquire() + self.average += (args[0] * 256) + args[1] + self.count += 1 + if self.sample_backup != self.sample: + self.sample = self.sample_backup + self.val_table = [-2] * int(self.sample) + self.val_table_event[-1] * int(self.sample) + if self.rate_backup != self.rate: + self.rate_has_changed() + + if self.tick <= time.time(): + self.tick = time.time() + self.rate + val = self.average / self.count + val = val - 530 + charger_event = -1 + #Event control + if tux.status.power_plug(): + charger_event = 1 + if tux.status.charger_state(): + charger_event = 2 + elif self.charger_event_backup > 0: + charger_event = 0 + + if self.charger_event_backup != charger_event: + self.charger_event_backup = charger_event + else: + charger_event = -1 + self.val_table.append(val) + self.val_table.pop(0) + self.val_table_event.append(charger_event) + self.val_table_event.pop(0) + self.average = 0 + self.count = 0 + if self.GUI_on: + self.graph_measure.refresh() + self.event_control() + self.__on_battery_mutex.release() + except: + print sys.exc_info() Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp 2007-10-11 15:13:12 UTC (rev 602) @@ -253,7 +253,7 @@ self.__iter = 0 self.value_list.clear() for i in range(len(self.measure.event_tab)): - self.add_row(i) + self.add_row(i) ########################################################### # @@ -408,6 +408,12 @@ # ########################################################### def verify_value(self): + if self.get_widget('cbb_conf_event').get_active() == 0: + maximum = 2.5 + minimum = 0.025 + else: + maximum = 6.5 + minimum = 4.0 try: float(self.get_widget('txt_conf_time').get_text()) except: @@ -421,10 +427,10 @@ try: float(self.get_widget('txt_conf_value').get_text()) except: - self.get_widget('txt_conf_value').set_text('1') + self.get_widget('txt_conf_value').set_text(str(minimum)) - if float(self.get_widget('txt_conf_value').get_text()) < 1: - self.get_widget('txt_conf_value').set_text('1') - if float(self.get_widget('txt_conf_value').get_text()) > 100: - self.get_widget('txt_conf_value').set_text('100') + if float(self.get_widget('txt_conf_value').get_text()) < minimum: + self.get_widget('txt_conf_value').set_text(str(minimum)) + if float(self.get_widget('txt_conf_value').get_text()) > maximum: + self.get_widget('txt_conf_value').set_text(str(maximum)) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/widget/other.pyp 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/widget/other.pyp 2007-10-11 15:13:12 UTC (rev 602) @@ -45,7 +45,9 @@ self.get_widget('txtTime').set_text(str(tab[0][4])) self.get_widget('chkNotify').set_active(tab[0][5]) self.get_widget('Behavior').set_filename(tab[0][6]) + + thread.start_new_thread(self.update, ()) ########################################################### @@ -57,6 +59,12 @@ self.measure.changetext = _me.string('conf_lblChange') self.measure.thresholdtext = _me.string('conf_lblThreshold') + try: + self.graph.battery = _me.string('battery') + self.graph.plugged = _me.string('plugged') + self.graph.charging = _me.string('charging') + except: + print sys.exc_info() ########################################################### # @@ -169,24 +177,31 @@ def verify_value(self): + if self.get_widget('cbbEvent').get_active() == 0: + maximum = 2.5 + minimum = 0.025 + else: + maximum = 6.5 + minimum = 4.0 + try: float(self.get_widget('txtTime').get_text()) except: self.get_widget('txtTime').set_text('1.0') - if float(self.get_widget('txtTime').get_text()) < 1.0: - self.get_widget('txtTime').set_text('1.0') + if float(self.get_widget('txtTime').get_text()) < self.measure.rate: + self.get_widget('txtTime').set_text(str(self.measure.rate)) if float(self.get_widget('txtTime').get_text()) > self.measure.rate * self.measure.sample: self.get_widget('txtTime').set_text(str(self.measure.rate * self.measure.sample)) try: float(self.get_widget('txtValue').get_text()) except: - self.get_widget('txtValue').set_text('1') + self.get_widget('txtValue').set_text(str(minimum)) - if float(self.get_widget('txtValue').get_text()) < 1: - self.get_widget('txtValue').set_text('1') - if float(self.get_widget('txtValue').get_text()) > 100: - self.get_widget('txtValue').set_text('100') + if float(self.get_widget('txtValue').get_text()) < minimum: + self.get_widget('txtValue').set_text(str(minimum)) + if float(self.get_widget('txtValue').get_text()) > maximum: + self.get_widget('txtValue').set_text(str(maximum)) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/init.pyp =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/init.pyp 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/init.pyp 2007-10-11 15:13:12 UTC (rev 602) @@ -1,47 +1,20 @@ sys.path.append(_me.get_path('root') + '/Scripts/Python') from Battery_class import Measure -measure = Measure() +measure = Measure(float(_me.get_param('Sample')), float(_me.get_param('Rate'))) _me.set_param('measure', measure) - -#update the values -measure.val_drop = float(_me.get_param('drop')) -measure.val_raise = float(_me.get_param('raise')) -measure.val_changeD = float(_me.get_param('changeD')) -measure.val_changeU = float(_me.get_param('changeU')) -measure.val_drop_time = float(_me.get_param('drop_time')) -measure.val_raise_time = float(_me.get_param('raise_time')) -measure.val_changeD_time = float(_me.get_param('changeD_time')) -measure.val_changeU_time = float(_me.get_param('changeU_time')) -measure.val_threshold = float(_me.get_param('threshold')) -measure.test_tab = _me.get_param('test_tab') - - -#update the radio button status -measure.drop = _me.get_param('drop_rad') -measure.raising = _me.get_param('raise_rad') -measure.changeD = _me.get_param('changeD_rad') -measure.changeU = _me.get_param('changeU_rad') -measure.increase = _me.get_param('increase_rad') -measure.decrease = _me.get_param('decrease_rad') -measure.both = _me.get_param('both_rad') - -# '' the check boxes -measure.threshold_chk = _me.get_param('threshold_chk') -#measure.change_control() - +print 'test' # update the sample and rate values +''' if _me.get_param('Rate') != (0 or None or '') and float(_me.get_param('Rate')) != measure.rate: - measure.tick = 1 measure.rate = float(_me.get_param('Rate')) + measure.rate_backup = measure.rate if _me.get_param('Sample') != (0 or None or '' or '1') and float(_me.get_param('Sample')) != measure.sample: - measure.val_table = [0] * int(_me.get_param('Sample')) - measure.sample = float(_me.get_param('Sample')) - -measure.threshold_behavior = _me.get_param('behavior_file_threshold') -measure.change_behavior = _me.get_param('behavior_file_change') + measure.sample = float(_me.get_param('Sample')) + measure.sample_backup = measure.sample +''' measure.event_tab = _me.get_param('config') - +measure.test_tab = _me.get_param('test_tab') monitor_id = tux.monitoring.insert(0x25, measure.on_battery_level) _me.set_param('monitor_id', monitor_id) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml 2007-10-11 15:13:12 UTC (rev 602) @@ -3,6 +3,7 @@ <conf_lblIncrease type='str'>Augmente</conf_lblIncrease> <conf_lblThreshold type='str'>Seuil</conf_lblThreshold> <gui_conf_remote_title type='str'>Contrôle</gui_conf_remote_title> + <battery type='str'>Sur batteries</battery> <conf_lblRaise type='str'>Accroissement</conf_lblRaise> <widget_lblTest type='str'>Notifications</widget_lblTest> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> @@ -21,16 +22,18 @@ <conf_lblChangeU type='str'>Augmente et chute</conf_lblChangeU> <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> <gui_conf_rate_lb type='str'>Taux de rafraichissement :</gui_conf_rate_lb> + <conf_lblType type='str'>Type</conf_lblType> <mainscript type='str'>J'ai trouvé la lumière !</mainscript> <conf_btnRemove type='str'>Enlever</conf_btnRemove> <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> + <plugged type='str'>Connecté</plugged> <conf_btnBehavior type='str'>Supprimer</conf_btnBehavior> <gui_conf_about_title type='str'>A propos</gui_conf_about_title> <conf_lblChangeD type='str'>Chute et augmente</conf_lblChangeD> - <widget_lblValue type='str'>Valeur (%)</widget_lblValue> + <widget_lblValue type='str'>Valeur (V)</widget_lblValue> <speaker_name type='str'>Bruno8k</speaker_name> <conf_lblSample type='str'>Points</conf_lblSample> - <conf_lblType type='str'>Type</conf_lblType> + <charging type='str'>En charge</charging> <widget_lblDisplayThreshold type='str'>Afficher le seuil sur le graph.</widget_lblDisplayThreshold> <conf_btnModify type='str'>Modifier</conf_btnModify> <widget_lblEvent type='str'>Evènement</widget_lblEvent> @@ -57,7 +60,7 @@ <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> <conf_lblNotified type='str'>Notifié ?</conf_lblNotified> <widget_lblSet type='str'>Ajouter a la config.</widget_lblSet> - <conf_lblValue type='str'>Valeur (%)</conf_lblValue> + <conf_lblValue type='str'>Valeur (V)</conf_lblValue> <conf_lblRate type='str'>Taux de rafraichissement</conf_lblRate> <widget_lblBehavior type='str'>Activer le script</widget_lblBehavior> <widget_lblChangeD type='str'>Changement inf.</widget_lblChangeD> Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml 2007-10-11 15:13:12 UTC (rev 602) @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <about> + <gadget_description type='str'>Light monitor for tux droid</gadget_description> <gadget_author type='str'>Paul Rathgeb</gadget_author> + <gadget_name type='str'>light_monitor</gadget_name> <gadget_version type='str'>0.0.1</gadget_version> - <gadget_description type='str'>Light monitor for tux droid</gadget_description> - <gadget_name type='str'>light_monitor</gadget_name> </about> Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml 2007-10-11 15:13:12 UTC (rev 602) @@ -1,35 +1,12 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> - <change_notified type='bool'>False</change_notified> - <chk_ThresholdBehavior type='bool'>False</chk_ThresholdBehavior> - <increase_rad type='bool'>True</increase_rad> - <chk_ChangeBehavior type='bool'>False</chk_ChangeBehavior> - <changeU_time type='float'>1.0</changeU_time> - <test_tab type='list'>[[1, 0, 0, 10.0, 2.0, True, 'None', False, 0]]</test_tab> - <changeD_rad type='bool'>False</changeD_rad> - <threshold type='float'>50.0</threshold> - <decrease_rad type='bool'>False</decrease_rad> - <Sample type='float'>500.0</Sample> - <raise type='float'>10.0</raise> - <changeU_rad type='bool'>False</changeU_rad> - <threshold_notified type='bool'>False</threshold_notified> + <test_tab type='list'>[[1, 0, 0, 0.10000000000000001, 20.0, True, 'None', False, 0]]</test_tab> <config type='list'>[]</config> - <behavior_file_change type='NoneType'>None</behavior_file_change> - <drop_rad type='bool'>True</drop_rad> - <raise_rad type='bool'>False</raise_rad> - <changeD type='float'>10.0</changeD> - <drop_time type='float'>1.0</drop_time> - <changeU type='float'>10.0</changeU> - <raise_time type='float'>1.0</raise_time> - <drop type='float'>10.0</drop> + <Rate type='float'>10.0</Rate> <MainScript type='str'> </MainScript> - <behavior_file_threshold type='NoneType'>None</behavior_file_threshold> - <threshold_chk type='bool'>False</threshold_chk> - <Rate type='float'>1.0</Rate> - <changeD_time type='float'>1.0</changeD_time> - <both_rad type='bool'>False</both_rad> + <Sample type='float'>600.0</Sample> </parameters> <general> <gui_state> Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml 2007-10-11 07:44:02 UTC (rev 601) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml 2007-10-11 15:13:12 UTC (rev 602) @@ -3,13 +3,16 @@ <conf_lblIncrease type='str'>Increase</conf_lblIncrease> <conf_lblThreshold type='str'>Threshold</conf_lblThreshold> <gui_conf_remote_title type='str'>Control</gui_conf_remote_title> + <battery type='str'>On battery</battery> <conf_lblRaise type='str'>Raise</conf_lblRaise> + <widget_lblTest type='str'>Notifications</widget_lblTest> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <conf_lblEvent type='str'>Event</conf_lblEvent> <widget_lblControl type='str'>Control</widget_lblControl> <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <help_text type='str'> </help_text> + <conf_lblBehavior type='str'>Behavior script</conf_lblBehavior> <conf_lblChange type='str'>Change</conf_lblChange> <conf_lblBoth type='str'>Both</conf_lblBoth> <widget_lblBtnApply type='str'>Apply changes</widget_lblBtnApply> @@ -17,19 +20,19 @@ <conf_lblDecrease type='str'>Decrease</conf_lblDecrease> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_update_title type='str'>Update</gui_conf_update_title> - <widget_lblValue type='str'>Value (%)</widget_lblValue> + <widget_lblValue type='str'>Value (V)</widget_lblValue> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> - <gui_conf_rate_lb type='str'>Refresh rate :</gui_conf_rate_lb> + <widget_lblBoth type='str'>Both direction</widget_lblBoth> <mainscript type='str'>I've found the light !</mainscript> - <conf_btnRemove type='str'>Remove</conf_btnRemove> <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> + <plugged type='str'>Plugged</plugged> <conf_btnBehavior type='str'>Clear path</conf_btnBehavior> <gui_conf_about_title type='str'>About</gui_conf_about_title> <conf_lblChangeD type='str'>Drop and raise</conf_lblChangeD> - <conf_lblChangeU type='str'>Raise and drop</conf_lblChangeU> + <widget_lblChangeD type='str'>Drop and raise</widget_lblChangeD> <speaker_name type='str'>Ryan8k</speaker_name> <conf_lblSample type='str'>Samples</conf_lblSample> - <conf_lblType type='str'>Type</conf_lblType> + <charging type='str'>Charging</charging> <widget_lblDisplayThreshold type='str'>Display threshold on graph</widget_lblDisplayThreshold> <widget_lblDark type='str'>Search darkness</widget_lblDark> <conf_btnModify type='str'>Modify</conf_btnModify> @@ -44,10 +47,10 @@ <conf_lblNotifiedBehavior type='str'>Notified</conf_lblNotifiedBehavior> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> <widget_lblDrop type='str'>Drop</widget_lblDrop> - <MainBehavior type='str'>Main behavior</MainBehavior> - <widget_lblBoth type='str'>Both direction</widget_lblBoth> + <conf_lblNotified type='str'>Notified ?</conf_lblNotified> + <gui_conf_rate_lb type='str'>Refresh rate :</gui_conf_rate_lb> <conf_lblDefaultBehavior type='str'>Default behavior</conf_lblDefaultBehavior> - <conf_lblBehavior type='str'>Behavior script</conf_lblBehavior> + <conf_lblChangeU type='str'>Raise and drop</conf_lblChangeU> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <widget_lblChange type='str'>Change</widget_lblChange> <widget_lblLight type='str'>Search light</widget_lblLight> @@ -55,14 +58,14 @@ <conf_lblNotNotified type='str'>Not notified</conf_lblNotNotified> <conf_lblDrop type='str'>Drop</conf_lblDrop> <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> - <conf_lblNotified type='str'>Notified ?</conf_lblNotified> + <conf_lblType type='str'>Type</conf_lblType> <widget_lblSet type='str'>Add to config</widget_lblSet> - <conf_lblValue type='str'>Value (%)</conf_lblValue> + <conf_lblValue type='str'>Value (V)</conf_lblValue> <conf_lblRate type='str'>Refresh rate</conf_lblRate> <widget_lblBehavior type='str'>Enable behavior script</widget_lblBehavior> - <widget_lblChangeD type='str'>Drop and raise</widget_lblChangeD> + <MainBehavior type='str'>Main behavior</MainBehavior> <conf_lblTime type='str'>Time (sec.)</conf_lblTime> <conf_lblControl type='str'>Control</conf_lblControl> - <widget_lblTest type='str'>Notifications</widget_lblTest> + <conf_btnRemove type='str'>Remove</conf_btnRemove> <widget_lblThreshold type='str'>Threshold</widget_lblThreshold> </strings> |