Commit f95cf79c authored by Bruno Coudoin's avatar Bruno Coudoin

Bulb is smaller now

parent c0ed4463
2006-01-13 Bruno coudoin <bruno.coudoin@free.fr>
Bulb is smaller now
* boards/electric/bulb1.png:
* boards/electric/bulb10.png:
* boards/electric/bulb11.png:
* boards/electric/bulb12.png:
* boards/electric/bulb2.png:
* boards/electric/bulb3.png:
* boards/electric/bulb4.png:
* boards/electric/bulb5.png:
* boards/electric/bulb6.png:
* boards/electric/bulb7.png:
* boards/electric/bulb8.png:
* boards/electric/bulb9.png:
* src/boards/python/electric.py:
2006-01-12 Bruno coudoin <bruno.coudoin@free.fr>
Many component are smaller now.
......
boards/electric/bulb1.png

13.2 KB | W: | H:

boards/electric/bulb1.png

10.3 KB | W: | H:

boards/electric/bulb1.png
boards/electric/bulb1.png
boards/electric/bulb1.png
boards/electric/bulb1.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb10.png

15.9 KB | W: | H:

boards/electric/bulb10.png

8.75 KB | W: | H:

boards/electric/bulb10.png
boards/electric/bulb10.png
boards/electric/bulb10.png
boards/electric/bulb10.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb11.png

9.11 KB | W: | H:

boards/electric/bulb11.png

10.3 KB | W: | H:

boards/electric/bulb11.png
boards/electric/bulb11.png
boards/electric/bulb11.png
boards/electric/bulb11.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb2.png

18.7 KB | W: | H:

boards/electric/bulb2.png

11.4 KB | W: | H:

boards/electric/bulb2.png
boards/electric/bulb2.png
boards/electric/bulb2.png
boards/electric/bulb2.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb3.png

19.1 KB | W: | H:

boards/electric/bulb3.png

12.7 KB | W: | H:

boards/electric/bulb3.png
boards/electric/bulb3.png
boards/electric/bulb3.png
boards/electric/bulb3.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb4.png

19.2 KB | W: | H:

boards/electric/bulb4.png

13.4 KB | W: | H:

boards/electric/bulb4.png
boards/electric/bulb4.png
boards/electric/bulb4.png
boards/electric/bulb4.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb5.png

19.1 KB | W: | H:

boards/electric/bulb5.png

14.2 KB | W: | H:

boards/electric/bulb5.png
boards/electric/bulb5.png
boards/electric/bulb5.png
boards/electric/bulb5.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb6.png

18.8 KB | W: | H:

boards/electric/bulb6.png

14.1 KB | W: | H:

boards/electric/bulb6.png
boards/electric/bulb6.png
boards/electric/bulb6.png
boards/electric/bulb6.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb7.png

18.6 KB | W: | H:

boards/electric/bulb7.png

13.9 KB | W: | H:

boards/electric/bulb7.png
boards/electric/bulb7.png
boards/electric/bulb7.png
boards/electric/bulb7.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb8.png

18.1 KB | W: | H:

boards/electric/bulb8.png

13.7 KB | W: | H:

boards/electric/bulb8.png
boards/electric/bulb8.png
boards/electric/bulb8.png
boards/electric/bulb8.png
  • 2-up
  • Swipe
  • Onion skin
boards/electric/bulb9.png

17.3 KB | W: | H:

boards/electric/bulb9.png

12.7 KB | W: | H:

boards/electric/bulb9.png
boards/electric/bulb9.png
boards/electric/bulb9.png
boards/electric/bulb9.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -989,9 +989,10 @@ class Rheostat(Component):
Node("electric/connect.png", "C", 0, 125)])
# Overide some values
self.item_values_x = 25
self.item_values_x = 20
self.item_values_y = 70
self.item_values.set(fill_color="blue")
self.move(x, y)
# The wiper wire
......@@ -1144,11 +1145,11 @@ class Bulb(Component):
"R",
self.internal_resistor,
self.image,
[Node("electric/connect.png", "A", -15, 215),
Node("electric/connect.png", "B", 85, 215)])
[Node("electric/connect.png", "A", 0, 170),
Node("electric/connect.png", "B", 85, 170)])
# Overide some values
self.item_values_x = 90
self.item_values_y = 115
self.item_values_x = 55
self.item_values_y = 80
self.item_values.set(fill_color="red")
# Specific Bulb values
......@@ -1169,14 +1170,14 @@ class Bulb(Component):
super(Bulb, self).set_voltage_intensity(valid_value, voltage, intensity)
power = abs(voltage * intensity)
image_index = min((power * 11) / self.power_max + 1, 12)
image_index = min((power * 10) / self.power_max + 1, 11)
pixmap = gcompris.utils.load_pixmap("electric/bulb%d.png" %(image_index,))
print "Power = %f (Max=%f) Image index = %d" %(power, self.power_max, image_index)
self.component_item.set(pixbuf = pixmap)
# If the Bulb is blown, we have to change it's internal
# Resistor value to infinite and ask for a circuit recalc
if image_index == 12:
if image_index == 11:
self.gnucap_value = 100000000
self.electric.run_simulation()
self.is_blown = True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment