Rev 227 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 227 | Rev 307 | ||
---|---|---|---|
Line 135... | Line 135... | ||
135 | TX_Buff[pt] = 0; |
135 | TX_Buff[pt] = 0; |
Line 136... | Line 136... | ||
136 | 136 | ||
137 | return QString(TX_Buff); |
137 | return QString(TX_Buff); |
Line -... | Line 138... | ||
- | 138 | } |
|
- | 139 | ||
- | 140 | // Datensatz nach 8bit Integer |
|
- | 141 | int ToolBox::Data2Char(int *Data , int Start, bool is_signed) |
|
- | 142 | { |
|
- | 143 | int Out = (Data[Start]); |
|
- | 144 | ||
- | 145 | if ((Out > 128) && (is_signed)) |
|
- | 146 | Out = Out - 256; |
|
- | 147 | ||
- | 148 | return Out; |
|
- | 149 | ||
- | 150 | } |
|
- | 151 | ||
- | 152 | // Datensatz nach 8bit Integer |
|
- | 153 | int ToolBox::Char2Data(int Data) |
|
- | 154 | { |
|
- | 155 | if (Data < 0) |
|
- | 156 | { |
|
- | 157 | return Data + 256; |
|
- | 158 | } |
|
- | 159 | return Data; |
|
- | 160 | } |
|
138 | } |
161 | |
139 | 162 | ||
140 | // Datensatz nach 16bit Integer |
163 | // Datensatz nach 16bit Integer |
141 | int ToolBox::Data2Int(int *Data , int Start, bool is_signed) |
164 | int ToolBox::Data2Int(int *Data , int Start, bool is_signed) |