This commit is contained in:
parent
335127b219
commit
dcf8d12a8a
|
@ -5,9 +5,6 @@ Display" or "Airport Display".
|
||||||
|
|
||||||
This crate contains C# bindings for the [servicepoint](https://git.berlin.ccc.de/servicepoint/servicepoint) library based on [servicepoint-binding-uniffi](https://git.berlin.ccc.de/servicepoint/servicepoint-binding-uniffi).
|
This crate contains C# bindings for the [servicepoint](https://git.berlin.ccc.de/servicepoint/servicepoint) library based on [servicepoint-binding-uniffi](https://git.berlin.ccc.de/servicepoint/servicepoint-binding-uniffi).
|
||||||
|
|
||||||
Also take a look at the main project [README](https://git.berlin.ccc.de/servicepoint/servicepoint/src/branch/main/README.md) for more
|
|
||||||
information.
|
|
||||||
|
|
||||||
F# is not tested. If there are usability or functionality problems, please open an issue.
|
F# is not tested. If there are usability or functionality problems, please open an issue.
|
||||||
|
|
||||||
## Note on stability
|
## Note on stability
|
||||||
|
@ -82,3 +79,9 @@ Because of that, there is no NuGet package you can use directly.
|
||||||
Run `./generate-binding.sh` to regenerate the base library.
|
Run `./generate-binding.sh` to regenerate the base library.
|
||||||
The generated source file is checked in.
|
The generated source file is checked in.
|
||||||
The CI enforces that generated bindings do not change.
|
The CI enforces that generated bindings do not change.
|
||||||
|
|
||||||
|
## Everything else
|
||||||
|
|
||||||
|
Look at the main project [README](https://git.berlin.ccc.de/servicepoint/servicepoint/src/branch/main/README.md) for
|
||||||
|
further information.
|
||||||
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
# About the display
|
|
||||||
|
|
||||||
- Resolution: 352x160=56,320 pixels
|
|
||||||
- Pixels are grouped into 44x20=880 tiles (8x8=64 pixels each)
|
|
||||||
- Smallest addressable unit: row of pixels inside of a tile (8 pixels = 1 byte)
|
|
||||||
- The brightness can only be set per tile
|
|
||||||
- Screen content can be changed using a simple UDP protocol
|
|
||||||
- Between each row of tiles, there is a gap of around 4 pixels size. This gap changes the aspect ratio of the display.
|
|
||||||
|
|
||||||
### Binary format
|
|
||||||
|
|
||||||
A UDP package sent to the display has a header size of 10 bytes.
|
|
||||||
Each header value has a size of two bytes (unsigned 16 bit integer).
|
|
||||||
Depending on the command, there can be a payload following the header.
|
|
||||||
|
|
||||||
To change screen contents, these commands are the most relevant:
|
|
||||||
|
|
||||||
1. Clear screen
|
|
||||||
- command: `0x0002`
|
|
||||||
- (rest does not matter)
|
|
||||||
2. Send CP437 data: render specified text into rectangular region
|
|
||||||
- command: `0x0003`
|
|
||||||
- top left tile x
|
|
||||||
- top left tile y
|
|
||||||
- width in tiles
|
|
||||||
- height in tiles
|
|
||||||
- payload: (width in tiles * height in tiles) bytes
|
|
||||||
- 1 byte = 1 character
|
|
||||||
- each character is rendered into one tile (mono-spaced)
|
|
||||||
- characters are encoded using code page 437
|
|
||||||
3. Send bitmap window: set pixel states for a rectangular region
|
|
||||||
- command: `0x0013`
|
|
||||||
- top left tile x
|
|
||||||
- top left _pixel_ y
|
|
||||||
- width in tiles
|
|
||||||
- height in _pixels_
|
|
||||||
- payload: (width in tiles * height in pixels) bytes
|
|
||||||
- network byte order
|
|
||||||
- 1 bit = 1 pixel
|
|
||||||
|
|
||||||
There are other commands implemented as well, e.g. for changing the brightness.
|
|
|
@ -1 +0,0 @@
|
||||||
max_width = 80
|
|
|
@ -1,11 +1,8 @@
|
||||||
[package]
|
[package]
|
||||||
name = "uniffi-bindgen-cs"
|
name = "uniffi-bindgen-cs"
|
||||||
version = "0.13.1"
|
|
||||||
publish = false
|
publish = false
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
#readme = "README.md"
|
|
||||||
keywords = ["cccb", "cccb-servicepoint", "uniffi"]
|
|
||||||
|
|
||||||
[dependencies.uniffi-bindgen-cs]
|
[dependencies.uniffi-bindgen-cs]
|
||||||
git = "https://github.com/NordSecurity/uniffi-bindgen-cs"
|
git = "https://github.com/NordSecurity/uniffi-bindgen-cs"
|
||||||
|
|
Loading…
Reference in a new issue