update to released version of servicepoint
All checks were successful
Rust / build (pull_request) Successful in 6m7s

This commit is contained in:
Vinzenz Schroeter 2025-05-01 19:48:13 +02:00
parent 2c40ec0ab1
commit 319ba7c311
6 changed files with 242 additions and 166 deletions

View file

@ -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

View file

@ -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];

View file

@ -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);