-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automatic provisioning of the frontboard, from mpy files in github
TODO: This currently still builds the files into the firmware, the github action needs changing to mpy-cross these independently
- Loading branch information
1 parent
9cde5dc
commit 9b39b25
Showing
12 changed files
with
371 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import app | ||
from app_components.tokens import clear_background | ||
|
||
from app_components.dialog import YesNoDialog | ||
|
||
|
||
class PowerOff(app.App): | ||
async def run(self, render_update): | ||
# Render initial state | ||
await render_update() | ||
|
||
# Create a yes/no dialogue, add it to the overlays | ||
dialog = YesNoDialog("Power off?", self) | ||
self.overlays = [dialog] | ||
|
||
# Wait for an answer from the dialogue, and if it was yes, randomise colour | ||
if await dialog.run(render_update): | ||
import machine | ||
import bq25895 | ||
|
||
bq25895.bq25895(machine.I2C(7)).disconnect_battery() | ||
|
||
# Remove the dialogue and re-render | ||
self.overlays = [] | ||
|
||
while True: | ||
await render_update() | ||
|
||
def draw(self, ctx): | ||
ctx.save() | ||
clear_background() | ||
ctx.restore() | ||
|
||
self.draw_overlays(ctx) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
FONTLOG for the Raleway fonts | ||
|
||
This file provides detailed information on the Raleway Font Software. | ||
|
||
This information should be distributed along with the Raleway fonts and any | ||
derivative works. | ||
|
||
Basic Font Information | ||
|
||
Raleway is an elegant sans-serif typeface family. Initially designed by | ||
Matt McInerney as a single thin weight, it was expanded into a 9 weight family | ||
by Pablo Impallari and Rodrigo Fuenzalida in 2012 and iKerned by Igino Marini. | ||
In 2013 the Italics where added. | ||
|
||
It is a display face and the download features both old style and lining | ||
numerals, standard and discretionary ligatures, a pretty complete set of | ||
diacritics, as well as a stylistic alternate inspired by more geometric | ||
sans-serif typefaces than its neo-grotesque inspired default character | ||
set. | ||
|
||
It also has a sister display family, Raleway Dots. | ||
|
||
Also, the characters set has been expanded to cover 104 Latin languages: | ||
Afar, Afrikaans, Albanian, Azerbaijani, Basque, Belarusian, Bislama, Bosnian, Breton, Catalan, Chamorro, Chichewa, Comorian, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Faroese, Fijian, Filipino/Tagalog, Finnish, Flemish, French, Gaelic (Irish / Manx / Scottish), Gagauz, German, Gikuyu, Gilbertese/Kiribati, Greenlandic, Guarani, Haitian_Creole, Hawaiian, Hungarian, Icelandic, Igo/Igbo, Indonesian, Irish, Italian, Javanese, Kashubian, Kinyarwanda, Kirundi, Latin, Latvian, Lithuanian, Luba/Ciluba/Kasai, Luxembourgish, Malagasy, Malay, Maltese, Maori, Marquesan, Marshallese, Moldovan/Moldovian/Romanian, Montenegrin, Nauruan, Ndebele, Norwegian, Oromo, Palauan/Belauan, Polish, Portuguese, Quechua, Romanian, Romansh, Sami, Samoan, Sango, Serbian, Sesotho, Setswana/Sitswana/Tswana, Seychellois_Creole, SiSwati/Swati/Swazi, Silesian, Slovak, Slovenian, Somali, Sorbian, Sotho, Spanish, Swahili, Swedish, Tahitian, Tetum, Tok_Pisin, Tongan, Tsonga, Tswana, Tuareg/Berber, Turkish, Turkmen, Tuvaluan, Uzbek/Usbek, Wallisian, Walloon, Welsh, Xhosa, Yoruba, Zulu. | ||
|
||
The Roman Styles also include support for the following 17 Cyrillic languages: | ||
Balkar, Belarusian, Bosnian, Chukchi, Crimean_Tartar, Erzya, Karachay, Kumyk, Lak, | ||
Macedonian, Moksha, Montenegrin, Nanai, Nogai, Rusyn, Serbian, Ukranian | ||
|
||
Documentation can be found at https://www.theleagueofmoveabletype.com | ||
|
||
To report issues or contribute to the project see the source repository: | ||
https://github.com/theleagueof/raleway | ||
|
||
ChangeLog | ||
|
||
6 May 2024 (Tildagon Authors) | ||
- Convert into ctx format for use in Tildagon badge | ||
- Rename to comply with license terms | ||
|
||
29 August 2020 (Caleb Maclennan) v4.101 | ||
- Repackage so license files get distributed properly | ||
|
||
27 August 2020 (Caleb Maclennan) v4.100 | ||
- Re-release of the entire font family in more output formats | ||
- Collect all the developments from various forks back to the original project repository | ||
- Build and release using Fontship | ||
|
||
10 Jul 2020 () v4.026 | ||
- Release on Google Fonts | ||
- Add VTT hints | ||
- Fixup Italic | ||
- Fixup compose/decompose for several glyphs | ||
- Fix diacritic placements | ||
|
||
17 December 2016 (Alexei Vanyashin, Cyreal) v4.020 | ||
— Expanded glyph set to GF Cyrillic Pro | ||
|
||
15 October 2016 (Alexei Vanyashin, Ivan Petrov, Cyreal) v.4.010 | ||
— Merged in Cyrillic in the GF Cyrillic Plus + localised variants range | ||
— minor fixed: adjusted win ascender | ||
— changed italic angle to 12 in Italic masters | ||
— added Cyrillic kerning | ||
|
||
24 Sept 2013 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family v3.0 | ||
- Added Cyrillic to the 9 Roman Weights | ||
|
||
26 Jun 2013 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family v2.5 | ||
- Charset Extension, now covering 104 Latin Languages. | ||
- Italics Added | ||
- Re-mastered | ||
|
||
27 May 2013 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family v2.4 (Beta) | ||
- Italic Masters, ready for iKern | ||
|
||
1 May 2013 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family v2.3 (Beta) | ||
- More diactritics added, now supporting all 104 Latin languages | ||
- Added /Delta /Omega /estimated /infinity /integral /lozenge /partialdiff /pi /product /radical /summation /uni0394 /uni03A9 /uni2113 | ||
- Lots of small bugs fixed | ||
|
||
11 Nov 2012 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family v2.2 | ||
- Fixed Font Info and other small bugs. | ||
- 'Heavy' style renamed as 'Black' | ||
- Hinted using the latest version of TTFAutohint, currently v0.9.3. | ||
- Removed the KERN table, now we are using GPOS based Kerning. | ||
- Smaller file size for faster loading on the web. | ||
- Al '-OT' sources files renamed as '-OTF' | ||
|
||
7 Sept 2012 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family v2.1 | ||
- Fixed vertical metrics bug | ||
|
||
11 May 2012 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family v2.0 | ||
- iKerned | ||
- Remastered | ||
|
||
30 March 2012 (Matt McInerney, Pablo Impallari, Rodrigo Fuenzalida) Raleway Family Beta v1.06 | ||
- Initial Beta release of the family expansion - Not yet spaced or Kerned. | ||
- 9 Weights: Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold and Heavy weights. | ||
- Characters set expanded to cover 95 languages | ||
- For detailed inspection, please refer to the the FL source files (The OTF files where quickly generated using Ben Kiel's Font Generator macro, for testing purposes only). | ||
|
||
20 Feb 2010 (Matt McInerney) Raleway Light v1.01 | ||
- Initial Release | ||
|
||
Acknowledgements | ||
|
||
If you make modifications be sure to add your name (N), | ||
email (E), web-address (if you have one) (W) and | ||
description (D). This list is in alphabetical order. | ||
|
||
N: Caleb Maclennan | ||
E: [email protected] | ||
W: https://alerque.com | ||
D: Fontship build system | ||
|
||
N: Cyreal | ||
E: [email protected] | ||
W: http://cyreal.org | ||
D: Cyrillic expansion | ||
|
||
N: Matt McInerney | ||
E: [email protected] | ||
W: http://pixelspread.com/ | ||
D: Designer | ||
|
||
N: Pablo Impallari | ||
E: [email protected] | ||
W: http://www.impallari.com | ||
D: Designer | ||
|
||
N: Rodrigo Fuenzalida | ||
E: [email protected] | ||
W: http://www.rfuenzalida.com | ||
D: Designer | ||
|
||
N: Tildagon Badge Authors | ||
E: [email protected] | ||
W: https://badge.emfcamp.org | ||
D: Embedders |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# From https://www.emfcamp.org/about/branding | ||
|
||
# Display | ||
display_x = 240 | ||
display_y = 240 | ||
display_height_inches = 1.28 | ||
ppi = display_x / display_height_inches | ||
|
||
# Font size | ||
one_pt = ppi / 72 | ||
ten_pt = 10 * one_pt | ||
twelve_pt = 12 * one_pt | ||
eighteen_pt = 18 * one_pt | ||
twentyfour_pt = 24 * one_pt | ||
label_font_size = ten_pt | ||
heading_font_size = eighteen_pt | ||
|
||
line_height = 1.5 | ||
|
||
# Colors | ||
colors = { | ||
"pale_green": (175, 201, 68), | ||
"mid_green": (82, 131, 41), | ||
"dark_green": (33, 48, 24), | ||
"yellow": (294, 226, 0), | ||
"orange": (246, 127, 2), | ||
"pink": (245, 80, 137), | ||
"blue": (46, 173, 217), | ||
"white": (232, 230, 227), | ||
} | ||
|
||
font_name = "Arimo Regular" | ||
|
||
colors = { | ||
name: (c[0] / 256.0, c[1] / 256.0, c[2] / 256.0) for (name, c) in colors.items() | ||
} | ||
|
||
ui_colors = {"background": colors["dark_green"], "label": colors["white"]} | ||
|
||
|
||
def clear_background(ctx): | ||
ctx.rgb(*colors["dark_green"]).rectangle(-120, -120, display_x, display_y).fill() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
from app import App | ||
from system.hexpansion.util import read_hexpansion_header, get_hexpansion_block_devices | ||
import vfs | ||
|
||
|
||
class FrontBoard(App): | ||
year: int | ||
|
||
|
||
def mount_frontboard(i2c, readonly=True): | ||
header = read_hexpansion_header(i2c, eeprom_addr=0x57) | ||
if header is None: | ||
return False | ||
|
||
try: | ||
eep, partition = get_hexpansion_block_devices(i2c, header, addr=0x57) | ||
except Exception: | ||
return False | ||
|
||
mountpoint = "/frontboard" | ||
|
||
try: | ||
vfs.mount(partition, mountpoint, readonly=readonly) | ||
except OSError: | ||
return False | ||
|
||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.