[tuxdroid-svn] r5292 - in software_suite_v3/smart-core/smart-api: . ruby/trunk
Status: Beta
Brought to you by:
ks156
|
From: cyrill62 <c2m...@c2...> - 2009-08-07 12:28:32
|
Author: cyrill62
Date: 2009-08-07 14:28:01 +0200 (Fri, 07 Aug 2009)
New Revision: 5292
Added:
software_suite_v3/smart-core/smart-api/ruby/
Modified:
software_suite_v3/smart-core/smart-api/ruby/trunk/TuxApi.rb
Log:
- add ruby API from sofware_suite_v2
Copied: software_suite_v3/smart-core/smart-api/ruby (from rev 5291, software_suite_v2/tuxware/ruby-api)
Modified: software_suite_v3/smart-core/smart-api/ruby/trunk/TuxApi.rb
===================================================================
--- software_suite_v2/tuxware/ruby-api/trunk/TuxApi.rb 2009-08-07 10:39:29 UTC (rev 5291)
+++ software_suite_v3/smart-core/smart-api/ruby/trunk/TuxApi.rb 2009-08-07 12:28:01 UTC (rev 5292)
@@ -23,10 +23,10 @@
require 'rexml/document'
class Tux
- attr_accessor :eyes,:leds,:wings,:mouth,:voice,:sound,:legs,:sensors
+ attr_accessor :core,:eyes,:leds,:wings,:mouth,:voice,:sound,:legs,:sensors
- def initialize
- core = Core.new
+ def initialize(host = 'localhost', port = 270, user = '0' )
+ core = Core.new(host,port,user)
self.eyes = Eyes.new(core)
self.leds = Leds.new(core)
self.wings = Flippers.new(core)
|