Add British flags to the Flag effect (#1264)

* add britisch flags to flag.py

adding the flags of England, Scotland and the United Kingdom to flag.py

* adding British flags to flag.schema.json

adding the flag of Great Britain (gb), England (gb-eng) and Scotland (gb-sct) to the GUI

* added flag updates to CHANGELOG.md

mentioning the Britisch flags as well as Cameroon and Russia
This commit is contained in:
Jumper78 2021-07-13 21:07:30 +02:00 committed by GitHub
parent 6d004240de
commit a777620d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View File

@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- WLED: Support storing/restoring state, fixes #1101
- LED-Devices: Allow to get properties for Atmo and Karatedevices to limit LED numbers configurable
- LED-Devices: Add timeouts for REST-API calls
- new Flags: Russia, Cameroon, Great Britain, England, Scotland
### Changed
- Updated dependency rpi_ws281x to latest upstream

View File

@ -184,6 +184,32 @@ def printFlag(country):
hyperion.imageSolidFill(0, int(iH*0.33), iW, int(iH*0.33), 0, 57, 166)
hyperion.imageSolidFill(0, int(iH*0.66), iW, iH, 213, 43, 30)
# gb-eng flag (England)
if country == "gb-eng":
hyperion.imageSolidFill(255, 255, 255)
hyperion.imageDrawLine(0, int(iH*0.50), iW, int(iH*0.50), int(iW*0.10), 255, 0, 0)
hyperion.imageDrawLine(int(iW*0.50), 0, int(iW*0.50), iH, int(iW*0.10), 255, 0, 0)
# gb-sct flag (Scotland)
if country == "gb-sct":
hyperion.imageSolidFill(0, 0, 255)
hyperion.imageDrawLine(0, 0, iW, iH, int(iW*0.15), 255, 255, 255)
hyperion.imageDrawLine(0, iH, iW, 0, int(iW*0.15), 255, 255, 255)
# gb flag (United Kingdom)
if country == "gb":
hyperion.imageSolidFill(0, 0, 255)
hyperion.imageDrawLine(0, int(iH*0.50), iW, int(iH*0.50), int(iW*0.25), 255, 255, 255)
hyperion.imageDrawLine(int(iW*0.50), 0, int(iW*0.50), iH, int(iW*0.25), 255, 255, 255)
hyperion.imageDrawLine(0, 0, iW, iH, int(iH*0.25), 255, 255, 255)
hyperion.imageDrawLine(0, iH, iW, 0, int(iH*0.25), 255, 255, 255)
hyperion.imageDrawLine(0, int(iH*0.50), iW, int(iH*0.50), int(iW*0.15), 255, 0, 0)
hyperion.imageDrawLine(int(iW*0.50), 0, int(iW*0.50), iH, int(iW*0.15), 255, 0, 0)
hyperion.imageDrawLine(int(iW*0.95), 0, int(iW*0.475), int(iH*0.50), int(iH*0.10), 255, 0, 0)
hyperion.imageDrawLine(int(iW*0.05), iH, int(iW*0.525), int(iH*0.50), int(iH*0.10), 255, 0, 0)
hyperion.imageDrawLine(int(-iW*0.05), 0, int(iW*0.475), int(iH*0.50), int(iH*0.10), 255, 0, 0)
hyperion.imageDrawLine(int(iW*1.05), iH, int(iW*0.475), int(iH*0.50), int(iH*0.10), 255, 0, 0)
#prepare wanted flags
for cf in countries:
printFlag(cf)

View File

@ -10,7 +10,7 @@
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["at","be","bg","ch","cmr","cz","de","dk","ee","es","fi","fr","gr","hu","ie","it","lt","lu","lv","mt","nl","pl","pt","ro","ru","se","sl"]
"enum": ["at","be","bg","ch","cmr","cz","de","dk","ee","es","fi","fr","gb","gb-eng","gb-sct","gr","hu","ie","it","lt","lu","lv","mt","nl","pl","pt","ro","ru","se","sl"]
},
"propertyOrder" : 1
},