Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d57bbe

Browse files
committed
Do not make signal conversation inside unpack function.
1 parentb8ad3cb commit3d57bbe

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-
elseif (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)

[8]ページ先頭

©2009-2025 Movatter.jp