mappings: split out ponderjar/panel layouts into separate new functions
This commit is contained in:
parent
54e7506865
commit
2c7d1d2888
@ -130,27 +130,36 @@ pub struct StrideMapping<const STRIDE_NUM: usize = 24> {
|
|||||||
|
|
||||||
impl<const STRIDE_NUM: usize> StrideMapping<STRIDE_NUM> {
|
impl<const STRIDE_NUM: usize> StrideMapping<STRIDE_NUM> {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
/*let stride_json = vec!(
|
Self::from_json(vec!(
|
||||||
(0, 0, 17),
|
(0, 0, 255, false)
|
||||||
(1, 0, 17),
|
))
|
||||||
(2, 0, 17),
|
}
|
||||||
(3, 0, 17),
|
|
||||||
(4, 0, 16),
|
pub fn new_jar() -> Self {
|
||||||
(5, 0, 17),
|
Self::from_json(vec!(
|
||||||
(6, 0, 17),
|
(0, 0, 17, false),
|
||||||
(7, 0, 17),
|
(1, 0, 17, false),
|
||||||
(8, 0, 17),
|
(2, 0, 17, false),
|
||||||
(9, 0, 17),
|
(3, 0, 17, false),
|
||||||
(10, 0, 17),
|
(4, 0, 16, false),
|
||||||
(11, 0, 17),
|
(5, 0, 17, false),
|
||||||
(12, 0, 18),
|
(6, 0, 17, false),
|
||||||
(13, 0, 17),
|
(7, 0, 17, false),
|
||||||
(14, 0, 18),
|
(8, 0, 17, false),
|
||||||
(15, 0, 17),
|
(9, 0, 17, false),
|
||||||
(16, 0, 17),
|
(10, 0, 17, false),
|
||||||
(17, 0, 17)
|
(11, 0, 17, false),
|
||||||
);*/
|
(12, 0, 18, false),
|
||||||
let stride_json = vec!(
|
(13, 0, 17, false),
|
||||||
|
(14, 0, 18, false),
|
||||||
|
(15, 0, 17, false),
|
||||||
|
(16, 0, 17, false),
|
||||||
|
(17, 0, 17, false)
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new_panel() -> Self {
|
||||||
|
Self::from_json(vec!(
|
||||||
(0, 0, 16, false),
|
(0, 0, 16, false),
|
||||||
(1, 0, 16, true),
|
(1, 0, 16, true),
|
||||||
(2, 0, 16, false),
|
(2, 0, 16, false),
|
||||||
@ -167,7 +176,10 @@ impl<const STRIDE_NUM: usize> StrideMapping<STRIDE_NUM> {
|
|||||||
(13, 0, 16, true),
|
(13, 0, 16, true),
|
||||||
(14, 0, 16, false),
|
(14, 0, 16, false),
|
||||||
(15, 0, 16, true),
|
(15, 0, 16, true),
|
||||||
);
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn from_json(stride_json: Vec<(u8, u8, u8, bool)>) -> Self {
|
||||||
let mut strides = [Stride::default(); STRIDE_NUM];
|
let mut strides = [Stride::default(); STRIDE_NUM];
|
||||||
let stride_count = stride_json.len();
|
let stride_count = stride_json.len();
|
||||||
let mut physical_idx = 0;
|
let mut physical_idx = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user