mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fix/no signal detection (#1087)
This commit is contained in:
parent
a0311bd8b5
commit
c4e15dba00
@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- AVAHI included in Webserver (#996)
|
- AVAHI included in Webserver (#996)
|
||||||
- Fix add libcec to deb/rpm dependency list
|
- Fix add libcec to deb/rpm dependency list
|
||||||
- Fix Hyperion configuration is corrected during start-up, if required
|
- Fix Hyperion configuration is corrected during start-up, if required
|
||||||
|
- Fix color comparison / Signal detection (#1087)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Replace Multi-Lightpack by multi-instance Lightpack configuration (#1049)
|
- Replace Multi-Lightpack by multi-instance Lightpack configuration (#1049)
|
||||||
|
@ -97,17 +97,23 @@ inline bool operator!=(const ColorRgb & lhs, const ColorRgb & rhs)
|
|||||||
/// Compare operator to check if a color is 'smaller' than or 'equal' to another color
|
/// Compare operator to check if a color is 'smaller' than or 'equal' to another color
|
||||||
inline bool operator<=(const ColorRgb & lhs, const ColorRgb & rhs)
|
inline bool operator<=(const ColorRgb & lhs, const ColorRgb & rhs)
|
||||||
{
|
{
|
||||||
return lhs < rhs || lhs == rhs;
|
return lhs.red <= rhs.red &&
|
||||||
|
lhs.green <= rhs.green &&
|
||||||
|
lhs.blue <= rhs.blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compare operator to check if a color is 'greater' to another color
|
/// Compare operator to check if a color is 'greater' to another color
|
||||||
inline bool operator>(const ColorRgb & lhs, const ColorRgb & rhs)
|
inline bool operator>(const ColorRgb & lhs, const ColorRgb & rhs)
|
||||||
{
|
{
|
||||||
return !(lhs < rhs) && lhs != rhs;
|
return lhs.red > rhs.red &&
|
||||||
|
lhs.green > rhs.green &&
|
||||||
|
lhs.blue > rhs.blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compare operator to check if a color is 'greater' than or 'equal' to another color
|
/// Compare operator to check if a color is 'greater' than or 'equal' to another color
|
||||||
inline bool operator>=(const ColorRgb & lhs, const ColorRgb & rhs)
|
inline bool operator>=(const ColorRgb & lhs, const ColorRgb & rhs)
|
||||||
{
|
{
|
||||||
return lhs > rhs || lhs == rhs;
|
return lhs.red >= rhs.red &&
|
||||||
|
lhs.green >= rhs.green &&
|
||||||
|
lhs.blue >= rhs.blue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user