Stefan Schuermans commited on 2011-11-14 21:47:56
Showing 3 changed files, with 6 additions and 2 deletions.
... | ... |
@@ -774,7 +774,7 @@ int BlinkenFrameToNetwork(stBlinkenFrame *pFrame, etBlinkenProto proto, |
774 | 774 |
for (c = 0; c < pFrame->channels; c++, j++) |
775 | 775 |
val += pFrame->ppData[y][j]; |
776 | 776 |
pData[i] = |
777 |
- (val >= pFrame->channels * pFrame->maxval / 2 ? 0x01 : 0x00); |
|
777 |
+ (val >= pFrame->channels * (pFrame->maxval + 1) / 2 ? 0x01 : 0x00); |
|
778 | 778 |
} |
779 | 779 |
} |
780 | 780 |
return i; // return length |