Skip to content

Commit

Permalink
fix: The same variable declared twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzyjamroz committed Mar 6, 2024
1 parent e209ce4 commit 963db85
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mrmShared/src/mrmSeq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ struct SoftSequence : public mrf::ObjectInst<SoftSequence>
void enable();
void disable();
void softTrig();

epicsUInt32 getSwMask() const;
void setSwMask(epicsUInt32 src);
epicsUInt32 getSwEna() const;
Expand Down Expand Up @@ -524,7 +524,7 @@ void SoftSequence::softTrig()

epicsUInt32 SoftSequence::getSwMask() const
{
epicsUInt32 val;
epicsUInt32 val = 0;

DEBUG(3, ("SW Mask getter\n"));
SCOPED_LOCK(mutex);
Expand All @@ -537,10 +537,12 @@ epicsUInt32 SoftSequence::getSwMask() const
else
{
DEBUG(5, ("Register sequencer : %u\n", nat_ioread32(hw->ctrlreg)));
epicsUInt32 val = (nat_ioread32(hw->ctrlreg) & EVG_SEQ_RAM_SWMASK) >> EVG_SEQ_RAM_SWMASK_shift;
val = (nat_ioread32(hw->ctrlreg) & EVG_SEQ_RAM_SWMASK) >> EVG_SEQ_RAM_SWMASK_shift;
DEBUG(5, ("Response sequencer : %u\n", val));
return val;
}

return 0;
}

void SoftSequence::setSwMask(epicsUInt32 src)
Expand Down Expand Up @@ -570,7 +572,7 @@ void SoftSequence::setSwMask(epicsUInt32 src)

epicsUInt32 SoftSequence::getSwEna() const
{
epicsUInt32 val;
epicsUInt32 val = 0;

DEBUG(3, ("SW Enable getter\n"));
SCOPED_LOCK(mutex);
Expand All @@ -583,10 +585,12 @@ epicsUInt32 SoftSequence::getSwEna() const
else
{
DEBUG(5, ("Register sequencer : %u\n", nat_ioread32(hw->ctrlreg)));
epicsUInt32 val = (nat_ioread32(hw->ctrlreg) & EVG_SEQ_RAM_SWENABLE) >> EVG_SEQ_RAM_SWENABLE_shift;
val = (nat_ioread32(hw->ctrlreg) & EVG_SEQ_RAM_SWENABLE) >> EVG_SEQ_RAM_SWENABLE_shift;
DEBUG(5, ("Response sequencer : %u\n", val));
return val;
}

return 0;
}

void SoftSequence::setSwEna(epicsUInt32 src)
Expand Down

0 comments on commit 963db85

Please sign in to comment.