update to released version of servicepoint
All checks were successful
Rust / build (pull_request) Successful in 6m7s
All checks were successful
Rust / build (pull_request) Successful in 6m7s
This commit is contained in:
parent
2c40ec0ab1
commit
319ba7c311
6 changed files with 242 additions and 166 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue