Skip to content

Commit

Permalink
ledmatrix: Reduce maximum brightness to a more reasonable level
Browse files Browse the repository at this point in the history
Even though we can, we don't need to go as high as possible and blind the user.

Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Dec 6, 2023
1 parent 01fe62f commit 90ef1d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ledmatrix/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ const MAX_CURRENT: usize = 500;
///
/// BizLink HW Rev 2 has a larger current limiting resistor.
/// 100/255 results in 250mA current draw which is plenty bright.
/// 50/255 results in 160mA current draw which is plenty bright.
#[cfg(feature = "10k")]
const MAX_BRIGHTNESS: u8 = 94;
#[cfg(not(feature = "10k"))]
const MAX_BRIGHTNESS: u8 = 100;
const MAX_BRIGHTNESS: u8 = 50;

// TODO: Doesn't work yet, unless I panic right at the beginning of main
//#[cfg(not(debug_assertions))]
Expand Down Expand Up @@ -233,7 +234,7 @@ fn main() -> ! {
grid: percentage(0),
col_buffer: Grid::default(),
animate: false,
brightness: 26, // Default to 26/255 = 10% brightness
brightness: 51, // Default to 51/255 = 20% brightness
sleeping: SleepState::Awake,
game: None,
animation_period: 31_250, // 31,250 us = 32 FPS
Expand Down

0 comments on commit 90ef1d9

Please sign in to comment.