Skip to content

Commit 3d57bbe

Browse files
committed
Do not make signal conversation inside unpack function.
1 parent b8ad3cb commit 3d57bbe

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/codegen/c-sigprinter.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -195,41 +195,6 @@ std::string CSigPrinter::PrintSignalExpr(const SignalDescriptor_t* sig,
195195
}
196196
}
197197

198-
if (!sig->IsDoubleSig)
199-
{
200-
int32_t i_fact = (int32_t)sig->Factor;
201-
int32_t i_offset = (int32_t)sig->Offset;
202-
203-
// For signals which have both: factor and offset integer type
204-
// the physical value can be calculated inside unpack expression
205-
if (sig->Offset < 0)
206-
{
207-
if (i_fact != 1)
208-
{
209-
snprintf(workbuff, WBUFF_LEN, "((%s) * %d) - %d", tosigexpr.c_str(), i_fact, abs(i_offset));
210-
}
211-
else
212-
{
213-
snprintf(workbuff, WBUFF_LEN, "(%s) - %d", tosigexpr.c_str(), abs(i_offset));
214-
}
215-
216-
tosigexpr = workbuff;
217-
}
218-
else if (sig->Offset > 0)
219-
{
220-
if (i_fact != 1)
221-
{
222-
snprintf(workbuff, WBUFF_LEN, "((%s) * %d) + %d", tosigexpr.c_str(), i_fact, abs(i_offset));
223-
}
224-
else
225-
{
226-
snprintf(workbuff, WBUFF_LEN, "(%s) + %d", tosigexpr.c_str(), abs(i_offset));
227-
}
228-
229-
tosigexpr = workbuff;
230-
}
231-
}
232-
233198
return tosigexpr;
234199
}
235200

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy