update to servicepoint v0.14.1

This commit is contained in:
Vinzenz Schroeter 2025-05-04 14:35:41 +02:00
parent 63a2fd00b9
commit 57181b508f
6 changed files with 12 additions and 13 deletions

5
Cargo.lock generated
View file

@ -1569,8 +1569,9 @@ dependencies = [
[[package]]
name = "servicepoint"
version = "0.14.0"
source = "git+https://git.berlin.ccc.de/servicepoint/servicepoint/?branch=next#8ddbaeaaa64a4abb8ffb8b08a3a84cc1135e312f"
version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6bd5cfa49c73aeecb344680ffbf697abf73e0563a441b93b9723ae43867500f"
dependencies = [
"bitvec",
"log",

View file

@ -22,9 +22,7 @@ fast_image_resize = { version = "5.1.2", features = ["image"] }
[dependencies.servicepoint]
package = "servicepoint"
version = "0.14.0"
git = "https://git.berlin.ccc.de/servicepoint/servicepoint/"
branch = "next"
version = "0.14.1"
[profile.release]
lto = true # Enable link-time optimization

View file

@ -1,7 +1,7 @@
use std::net::UdpSocket;
use crate::cli::BrightnessCommand;
use log::info;
use servicepoint::{Brightness, GlobalBrightnessCommand, SendCommandExt};
use servicepoint::{Brightness, GlobalBrightnessCommand, UdpSocketExt};
pub(crate) fn brightness(connection: &UdpSocket, brightness_command: BrightnessCommand) {
match brightness_command {

View file

@ -1,7 +1,7 @@
//! Based on https://github.com/WarkerAnhaltRanger/CCCB_Ledwand
use image::GrayImage;
use servicepoint::{BitVecU8Msb0, Bitmap, PIXEL_HEIGHT};
use servicepoint::{DisplayBitVec, Bitmap, PIXEL_HEIGHT};
type GrayHistogram = [usize; 256];
@ -169,7 +169,7 @@ pub(crate) fn ostromoukhov_dither(source: GrayImage, bias: u8) -> Bitmap {
assert_eq!(width % 8, 0);
let mut source = source.into_raw();
let mut destination = BitVecU8Msb0::repeat(false, source.len());
let mut destination = DisplayBitVec::repeat(false, source.len());
for y in 0..height as usize {
let start = y * width as usize;
@ -206,7 +206,7 @@ pub(crate) fn ostromoukhov_dither(source: GrayImage, bias: u8) -> Bitmap {
#[inline]
fn ostromoukhov_dither_pixel(
source: &mut [u8],
destination: &mut BitVecU8Msb0,
destination: &mut DisplayBitVec,
position: usize,
width: usize,
last_row: bool,

View file

@ -5,7 +5,7 @@ use crate::{
stream_window::stream_window
};
use log::info;
use servicepoint::{BinaryOperation, BitVecCommand, BitVecU8Msb0, BitmapCommand, ClearCommand, CompressionCode, Origin, SendCommandExt, PIXEL_COUNT};
use servicepoint::{BinaryOperation, BitVecCommand, UdpSocketExt, BitmapCommand, ClearCommand, CompressionCode, DisplayBitVec, Origin, PIXEL_COUNT};
pub(crate) fn pixels(connection: &UdpSocket, pixel_command: PixelCommand) {
match pixel_command {
@ -24,7 +24,7 @@ pub(crate) fn pixels(connection: &UdpSocket, pixel_command: PixelCommand) {
}
fn pixels_on(connection: &UdpSocket) {
let mask = BitVecU8Msb0::repeat(true, PIXEL_COUNT);
let mask = DisplayBitVec::repeat(true, PIXEL_COUNT);
let command = BitVecCommand{offset: 0, bitvec: mask, compression: CompressionCode::Lzma, operation: BinaryOperation::Overwrite};
connection
.send_command(command)
@ -33,7 +33,7 @@ fn pixels_on(connection: &UdpSocket) {
}
fn pixels_invert(connection: &UdpSocket) {
let mask = BitVecU8Msb0::repeat(true, PIXEL_COUNT);
let mask = DisplayBitVec::repeat(true, PIXEL_COUNT);
let command = BitVecCommand{offset: 0, bitvec: mask, compression: CompressionCode::Lzma, operation: BinaryOperation::Xor};
connection
.send_command(command)

View file

@ -10,7 +10,7 @@ use scap::{
frame::convert_bgra_to_rgb,
frame::Frame,
};
use servicepoint::{BitmapCommand, CompressionCode, Origin, SendCommandExt, FRAME_PACING};
use servicepoint::{BitmapCommand, CompressionCode, Origin, UdpSocketExt, FRAME_PACING};
use std::time::{Duration, Instant};
pub fn stream_window(