Subversion Repositories HomeAutomation

Rev

Rev 1001 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1001 Rev 1002
Line 422... Line 422...
422
        if (iter->second.getType() == "uint")
422
        if (iter->second.getType() == "uint")
423
        {
423
        {
424
            if (iter->second.getStartBit() + iter->second.getBitLength() > highestBit)
424
            if (iter->second.getStartBit() + iter->second.getBitLength() > highestBit)
425
                highestBit = iter->second.getStartBit() + iter->second.getBitLength();
425
                highestBit = iter->second.getStartBit() + iter->second.getBitLength();
426
 
426
 
427
            unsigned int a = stoi(iter->second.getValue());
427
            unsigned int a = stou(iter->second.getValue());
428
 
428
 
429
            bin.replace(iter->second.getStartBit(), iter->second.getBitLength(), uint2bin(a, iter->second.getBitLength()));
429
            bin.replace(iter->second.getStartBit(), iter->second.getBitLength(), uint2bin(a, iter->second.getBitLength()));
430
        }
430
        }
431
        else if (iter->second.getType() == "float")
431
        else if (iter->second.getType() == "float")
432
        {
432
        {
Line 504... Line 504...
504
        variable.setStartBit(bitStart);
504
        variable.setStartBit(bitStart);
505
        variable.setBitLength(bitLength);
505
        variable.setBitLength(bitLength);
506
 
506
 
507
        if (attributes["type"] == "uint")
507
        if (attributes["type"] == "uint")
508
        {
508
        {
509
            variable.setValue(itos(bin2uint(bits)));
509
            variable.setValue(utos(bin2uint(bits)));
510
        }
510
        }
511
        else if (attributes["type"] == "float")
511
        else if (attributes["type"] == "float")
512
        {
512
        {
513
            variable.setValue(ftos(bin2float(bits)));
513
            variable.setValue(ftos(bin2float(bits)));
514
        }
514
        }