warnings--
This commit is contained in:
parent
b1b088eab6
commit
5488f85792
@ -1,7 +1,7 @@
|
|||||||
use crate::geometry::*;
|
use crate::geometry::*;
|
||||||
use crate::render::{Surface, Shader, Surfaces};
|
use crate::render::{Surface, Shader, Surfaces};
|
||||||
|
|
||||||
use std::fmt::{Debug, Formatter};
|
use std::fmt::Debug;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use num::PrimInt;
|
use num::PrimInt;
|
||||||
|
|
||||||
const b_m16_interleave: [u8; 8] = [0, 49, 49, 41, 90, 27, 117, 10];
|
const B_M16_INTERLEAVE: [u8; 8] = [0, 49, 49, 41, 90, 27, 117, 10];
|
||||||
|
|
||||||
pub trait Trig8 {
|
pub trait Trig8 {
|
||||||
fn sin8(self) -> u8;
|
fn sin8(self) -> u8;
|
||||||
@ -22,8 +22,8 @@ impl Trig8 for u8 {
|
|||||||
|
|
||||||
let section: u8 = offset.unsigned_shr(4);
|
let section: u8 = offset.unsigned_shr(4);
|
||||||
let s2: u8 = section * 2;
|
let s2: u8 = section * 2;
|
||||||
let b: u8 = b_m16_interleave[s2 as usize];
|
let b: u8 = B_M16_INTERLEAVE[s2 as usize];
|
||||||
let m16: u8 = b_m16_interleave[s2 as usize + 1];
|
let m16: u8 = B_M16_INTERLEAVE[s2 as usize + 1];
|
||||||
let mx: u8 = m16.wrapping_mul(secoffset).unsigned_shr(4);
|
let mx: u8 = m16.wrapping_mul(secoffset).unsigned_shr(4);
|
||||||
let mut y: i8 = mx as i8 + b as i8;
|
let mut y: i8 = mx as i8 + b as i8;
|
||||||
if self & 0x80 != 0 {
|
if self & 0x80 != 0 {
|
||||||
|
@ -162,11 +162,11 @@ pub mod rmt {
|
|||||||
pub type FastWs2812Esp32Rmt<'a> = LedPixelEsp32Rmt<'a, Rgb<u8>, LedPixelColorGrb24>;
|
pub type FastWs2812Esp32Rmt<'a> = LedPixelEsp32Rmt<'a, Rgb<u8>, LedPixelColorGrb24>;
|
||||||
|
|
||||||
impl Fract8Ops for LedPixelColorGrb24 {
|
impl Fract8Ops for LedPixelColorGrb24 {
|
||||||
fn blend8(self, other: Self, scale: Fract8) -> Self {
|
fn blend8(self, _other: Self, _scale: Fract8) -> Self {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scale8(self, scale: Fract8) -> Self {
|
fn scale8(self, _scale: Fract8) -> Self {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user