OSDN Git Service

dispose関数の追加
[mimic/MiMicSDK.git] / misc / mbedJS / mbddJS.API / mbedJS / mbed.PwmOut.js
index 6fe758d..053ec2c 100644 (file)
@@ -276,7 +276,7 @@ CLASS.prototype=
                        MI._assertYield.call(_t);\r
                        _t._lc=CLASS.period_ms;\r
                        MI.assertInt(i_value);\r
-                       return _t._mcu.rpc(_t.RPC_NS+":period_ms",_t._oid+","+Math.round(i_value),\r
+                       return _t._mcu.rpc(_t.RPC_NS+":period_ms",_t._oid+","+i_value,\r
                        function(j){\r
                                if(cb){cb();}\r
                                if(_t._gen){_t._gen.next();}\r
@@ -306,7 +306,7 @@ CLASS.prototype=
                        MI._assertYield.call(_t);\r
                        _t._lc=CLASS.period_us;\r
                        MI.assertInt(i_value);\r
-                       return _t._mcu.rpc(_t.RPC_NS+":period_us",_t._oid+","+Math.round(i_value),\r
+                       return _t._mcu.rpc(_t.RPC_NS+":period_us",_t._oid+","+i_value,\r
                        function(j){\r
                                if(cb){cb();}\r
                                if(_t._gen){_t._gen.next();}\r
@@ -365,7 +365,7 @@ CLASS.prototype=
                        MI._assertYield.call(_t);\r
                        _t._lc=CLASS.pulsewidth_ms;\r
                        MI.assertInt(i_value);\r
-                       return _t._mcu.rpc(_t.RPC_NS+":pulsewidth_ms",_t._oid+","+Math.round(i_value),\r
+                       return _t._mcu.rpc(_t.RPC_NS+":pulsewidth_ms",_t._oid+","+i_value,\r
                                function(j){\r
                                        if(cb){cb();}\r
                                        if(_t._gen){_t._gen.next();}\r
@@ -395,7 +395,7 @@ CLASS.prototype=
                        MI._assertYield.call(_t);\r
                        _t._lc=CLASS.pulsewidth_us;\r
                        MI.assertInt(i_value);\r
-                       return _t._mcu.rpc(_t.RPC_NS+":pulsewidth_us",_t._oid+","+Math.round(i_value),\r
+                       return _t._mcu.rpc(_t.RPC_NS+":pulsewidth_us",_t._oid+","+i_value,\r
                                function(j){\r
                                        if(cb){cb();}\r
                                        if(_t._gen){_t._gen.next();}\r
@@ -405,7 +405,16 @@ CLASS.prototype=
                }catch(e){\r
                        throw new MI.MiMicException(e);\r
                }\r
-       }       \r
+       },\r
+       /**\r
+        * MCUに生成されているオブジェクトを破棄します。\r
+        * @name mbedJS.PwmOut#dispose\r
+        * @function\r
+        */\r
+       dispose:function PwmOut_dispose()\r
+       {\r
+               return this._mcu._dispose.apply(this,arguments);\r
+       }\r
 }\r
 NS.PwmOut=CLASS;\r
 }());
\ No newline at end of file