mbeddr / mbeddr.core

The mbeddr core. An extensible C
Eclipse Public License 2.0
223 stars 77 forks source link

ignoreunit not working correctly for void functions with multiple arguments #775

Closed stephaneberle9 closed 9 years ago

stephaneberle9 commented 11 years ago

E.g.,

ingoreunit[accumulateInt32InInt48(pPhaseEnergyData->metrology.current.dot_prod.P_active, inPhaseVoltageSample * inPhaseCurrentSample)]

Expected: no type system errors Actual: type system error due to unit mismatch for first argument

See activePowerComputation_performInBackground() in com.itemis.embedded.platform.energy.implementation.impl.metrology.ActivePowerComputationImpl

markusvoelter commented 10 years ago

The code referred to above does not exist anymore.

stephaneberle9 commented 10 years ago

Sure, it does still exist. It has just been changed a little bit, because the

inPhaseVoltageSample * inPhaseCurrentSample

has been moved into a separate statement.

The exact code snippet now is:

accumulateInt32InInt48(stripunit[pPhaseEnergyData->metrology.current.dot_prod.accumulatedActivePower], stripunit[activePowerSample]);

And you can reproduce the problem by replacing the 2 stripunits by one surrounding ignoreunit.

bkolb commented 9 years ago

irrelevant meanwhile