Skip to content

Commit 2c15192

Browse files
committed
upd
1 parent 1aa3e26 commit 2c15192

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=GyverSegment
2-
version=1.4.5
2+
version=1.4.6
33
author=AlexGyver <[email protected]>
44
maintainer=AlexGyver <[email protected]>
55
sentence=Powerful library for controlling 7-segment indicators

src/core/utils/SegAnimationExt.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class SegAnimationExt : public SegBuffer {
112112
if (!_maskall) {
113113
_mask = 0;
114114
for (uint8_t i = 0; i < min(_size, (uint8_t)32); i++) {
115-
if (_disp->buffer[_from + i] != buffer[i]) _mask |= (1ul << i);
115+
if ((_disp->buffer[_from + i] & 0x7F) != (buffer[i] & 0x7F)) _mask |= (1ul << i);
116116
}
117117
}
118118
}
@@ -136,7 +136,11 @@ class SegAnimationExt : public SegBuffer {
136136
bool _state = 0;
137137

138138
bool _differ() {
139-
return memcmp(_disp->buffer + _from, buffer, _size);
139+
for (uint8_t i = 0; i < _size; i++) {
140+
if ((_disp->buffer[_from + i] & 0x7F) != (buffer[i] & 0x7F)) return 1;
141+
}
142+
return 0;
143+
// return memcmp(_disp->buffer + _from, buffer, _size);
140144
}
141145

142146
void _apply(uint8_t i) {

0 commit comments

Comments
 (0)