mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
iec60870: fix compiler warning
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
This commit is contained in:
parent
a709a8a0fb
commit
ea1f8c3d51
1 changed files with 2 additions and 1 deletions
|
@ -260,7 +260,7 @@ bool ASDUData::addSampleToASDU(CS101_ASDU &asdu, ASDUData::Sample sample) const
|
|||
? std::optional { timespec_to_cp56time2a(sample.timestamp.value()) }
|
||||
: std::nullopt;
|
||||
|
||||
InformationObject io;
|
||||
InformationObject io = nullptr;
|
||||
switch (descriptor->type) {
|
||||
case ASDUData::SCALED_INT: {
|
||||
auto scaled_int_value = static_cast<int16_t>(sample.signal_data.i & 0xFFFF);
|
||||
|
@ -337,6 +337,7 @@ bool ASDUData::addSampleToASDU(CS101_ASDU &asdu, ASDUData::Sample sample) const
|
|||
}
|
||||
|
||||
bool successfully_added = CS101_ASDU_addInformationObject(asdu, io);
|
||||
|
||||
InformationObject_destroy(io);
|
||||
|
||||
return successfully_added;
|
||||
|
|
Loading…
Add table
Reference in a new issue