update servicepoint
This commit is contained in:
parent
abb0b64b7c
commit
dbae1c6a38
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1440,7 +1440,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servicepoint"
|
||||
version = "0.13.2"
|
||||
source = "git+https://git.berlin.ccc.de/servicepoint/servicepoint/?branch=next#300bb5d6474f0f6152ab04feed4478995fcb3ec8"
|
||||
source = "git+https://git.berlin.ccc.de/servicepoint/servicepoint/?branch=next#114385868af03f8cba7c87a630b501bb0106d140"
|
||||
dependencies = [
|
||||
"bitvec",
|
||||
"bzip2",
|
||||
|
|
|
@ -31,3 +31,8 @@ pathfinder_geometry = "0.5.1"
|
|||
winit = "0.30"
|
||||
# for drawing pixels onto the surface of the window
|
||||
softbuffer = "0.4.6"
|
||||
|
||||
[profile.release]
|
||||
lto = true # Enable link-time optimization
|
||||
codegen-units = 1 # Reduce number of codegen units to increase optimizations
|
||||
strip = true # Strip symbols from binary
|
||||
|
|
|
@ -5,7 +5,7 @@ use crate::{
|
|||
};
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use servicepoint::{
|
||||
BinaryOperation, BitVecCommand, Bitmap, BitmapCommand, BrightnessCommand,
|
||||
BinaryOperation, BitVecCommand, Bitmap, BitmapCommand, GlobalBrightnessCommand,
|
||||
BrightnessGrid, BrightnessGridCommand, CharGridCommand, ClearCommand,
|
||||
CompressionCode, Cp437GridCommand, FadeOutCommand, Grid, HardResetCommand,
|
||||
Origin, TypedCommand, PIXEL_COUNT, PIXEL_WIDTH, TILE_SIZE,
|
||||
|
@ -214,7 +214,7 @@ impl CommandExecute for CharGridCommand {
|
|||
}
|
||||
}
|
||||
|
||||
impl CommandExecute for BrightnessCommand {
|
||||
impl CommandExecute for GlobalBrightnessCommand {
|
||||
fn execute(&self, context: &CommandExecutionContext) -> ExecutionResult {
|
||||
context.luma.write().unwrap().fill(self.brightness);
|
||||
Success
|
||||
|
|
|
@ -16,8 +16,9 @@ impl Cp437Font {
|
|||
|
||||
impl Default for Cp437Font {
|
||||
fn default() -> Self {
|
||||
let mut bitmaps =
|
||||
core::array::from_fn(|_| Bitmap::new(TILE_SIZE, TILE_SIZE).unwrap());
|
||||
let mut bitmaps = core::array::from_fn(|_| {
|
||||
Bitmap::new(TILE_SIZE, TILE_SIZE).unwrap()
|
||||
});
|
||||
|
||||
for (char_code, bitmap) in bitmaps.iter_mut().enumerate() {
|
||||
let bits = CP437_FONT_LINEAR[char_code];
|
||||
|
|
|
@ -39,11 +39,11 @@ fn main() {
|
|||
.font
|
||||
.map(FontRenderer8x8::from_name)
|
||||
.unwrap_or_else(FontRenderer8x8::default);
|
||||
let command_executor = CommandExecutionContext::new(&display, &luma, font_renderer);
|
||||
let context = CommandExecutionContext::new(&display, &luma, font_renderer);
|
||||
let mut udp_server = UdpServer::new(
|
||||
cli.bind,
|
||||
stop_udp_rx,
|
||||
command_executor,
|
||||
context,
|
||||
event_loop.create_proxy(),
|
||||
);
|
||||
let mut gui = Gui::new(&display, &luma, stop_udp_tx, cli.gui);
|
||||
|
|
Loading…
Reference in a new issue