summaryrefslogtreecommitdiff
path: root/js/IntegerOp/EXTRACTBITS.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/IntegerOp/EXTRACTBITS.js')
-rw-r--r--js/IntegerOp/EXTRACTBITS.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/js/IntegerOp/EXTRACTBITS.js b/js/IntegerOp/EXTRACTBITS.js
index 20f3fd8a..0cf1fcea 100644
--- a/js/IntegerOp/EXTRACTBITS.js
+++ b/js/IntegerOp/EXTRACTBITS.js
@@ -4,7 +4,7 @@ function EXTRACTBITS() {
var numb = [];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["extract_bit_32_UH0"]), new ScilabDouble([4]));
- this.model.in1 = new ScilabDouble([1]);
+ this.model.in = new ScilabDouble([1]);
this.model.in2 = new ScilabDouble([1]);
this.model.out = new ScilabDouble([1]);
this.model.out2 = new ScilabDouble([1]);
@@ -36,10 +36,7 @@ function EXTRACTBITS() {
this.bit = parseFloat(arguments[0]["bit"])
this.scal = arguments[0]["scal"]
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
while (true) {
[ok,this.Datatype,this.rule,this.bit,this.scal,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","EXTRACTBITS")],[" "],["Bits Extraction"],[" "],[" - Bits to Extract:"],["    1 Upper Half"],["    2 Lower Half"],["    3 Range from MSB"],["    4 Range to LSB"],["    5 Range of Bits"],[" - Number of Bits or Index of bit : Index 0 is LSB"],["    If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Bits to extract","Number of Bits or Index of Bit","Treat Bit Field as an Integer (0:No, 1:Yes)"],list("vec",1,"vec",1,"vec",-1,"vec",1),this.exprs);
if (!ok) {
@@ -53,7 +50,7 @@ function EXTRACTBITS() {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Treat Bit Field as an Integer",this.scal),msprintf("Must be in the interval %s.","[0, 1]"));
var ok = false;
} else {
- var in1 = [this.model.in1,this.model.in2];
+ var in1 = [this.model.in,this.model.in2];
this.bit = int(this.bit);
this.rule = int(this.rule);
if ((this.rule==3)||(this.rule==4)) {