From 9c1dd542daf654761652dadc84c36ecfdfae6830 Mon Sep 17 00:00:00 2001 From: David Weis Date: Thu, 29 Feb 2024 22:56:30 +0000 Subject: [PATCH] Add white color to face --- src/face/driver.rs | 11 ++++++++--- src/openai/functions.rs | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/face/driver.rs b/src/face/driver.rs index de28a05..5aa0694 100644 --- a/src/face/driver.rs +++ b/src/face/driver.rs @@ -35,37 +35,42 @@ pub const GREEN: RGB = RGB::new(0, 10, 0); pub const YELLOW: RGB = RGB::new(10, 10, 0); pub const PURPLE: RGB = RGB::new(10, 0, 10); pub const CYAN: RGB = RGB::new(0, 10, 10); +pub const WHITE: RGB = RGB::new(10, 10, 10); pub const BRIGHT_RED: RGB = RGB::new(180, 0, 0); pub const BRIGHT_BLUE: RGB = RGB::new(0, 0, 180); pub const BRIGHT_GREEN: RGB = RGB::new(0, 180, 0); pub const BRIGHT_YELLOW: RGB = RGB::new(100, 100, 0); pub const BRIGHT_PURPLE: RGB = RGB::new(100, 0, 100); pub const BRIGHT_CYAN: RGB = RGB::new(0, 100, 100); +pub const BRIGHT_WHITE: RGB = RGB::new(100, 100, 100); -pub const ALL_COLORS: [RGB; 12] = [ +pub const ALL_COLORS: [RGB; 14] = [ RED, BLUE, GREEN, YELLOW, PURPLE, CYAN, + WHITE, BRIGHT_RED, BRIGHT_BLUE, BRIGHT_GREEN, BRIGHT_YELLOW, BRIGHT_PURPLE, BRIGHT_CYAN, + BRIGHT_WHITE, ]; -pub const NORMAL_COLORS: [RGB; 6] = [RED, BLUE, GREEN, YELLOW, PURPLE, CYAN]; +pub const NORMAL_COLORS: [RGB; 7] = [RED, BLUE, GREEN, YELLOW, PURPLE, CYAN, WHITE]; -pub const BRIGHT_COLORS: [RGB; 6] = [ +pub const BRIGHT_COLORS: [RGB; 7] = [ BRIGHT_RED, BRIGHT_BLUE, BRIGHT_GREEN, BRIGHT_YELLOW, BRIGHT_PURPLE, BRIGHT_CYAN, + BRIGHT_WHITE, ]; fn corrected_pixel_index(index: i32) -> usize { diff --git a/src/openai/functions.rs b/src/openai/functions.rs index 08add68..570350a 100644 --- a/src/openai/functions.rs +++ b/src/openai/functions.rs @@ -157,6 +157,7 @@ pub enum FaceColor { Yellow, Purple, Cyan, + White, } #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)] @@ -203,6 +204,7 @@ impl ChatGptFunction for FaceDisplayFuncCallback { FaceColor::Yellow => crate::face::driver::YELLOW, FaceColor::Purple => crate::face::driver::PURPLE, FaceColor::Cyan => crate::face::driver::CYAN, + FaceColor::White => crate::face::driver::WHITE, }, None => crate::face::driver::PURPLE, };