Created
September 8, 2009 19:16
-
-
Save jdar/183153 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am mapping devices. Led is a light emitting diode. BluetoothDetector is a modular microcontroller that holds the logic and is | |
I have an ARobject BluetoothDetector which inherits (but is NOT STI) from ArduinoBt. | |
p = BluetoothDetector.first; p | |
=> #<BluetoothDetector id: 1, name: "the main controller device"> | |
>> p.children << BluetoothDetector.create(:name=>'slave device') | |
=> [#<BluetoothDetector id: 45, name: "slave device">] | |
>> DeviceConnection.first | |
=> #<DeviceConnection id: 5, child_id: 45, child_type: "ArduinoBt", parent_id: 1, parent_type: "ArduinoBt"> | |
# reload environment | |
p.children << Led.create | |
=> [ | |
#<ArduinoBt id: 45, name: "slave device"l>, | |
#<Led id: 225, brightness: nil, amperage: nil, wavelength: nil> | |
] | |
Hmmm. I can't seem to override the "child_type" class_name while saving. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment