feat: 添加 README,更新 .gitignore,移除 JE-Skin/eskin-finger-sdk
- 添加 README.md 项目文档 - 更新 .gitignore 排除 JE-Skin/、eskin-finger-sdk/ 及构建产物 - 从 git 跟踪中移除 JE-Skin 和 eskin-finger-sdk Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -4,4 +4,4 @@ use std::time::Instant;
|
||||
pub trait Codec<F> {
|
||||
fn decode(&mut self, input: &[u8], session_started_at: Instant) -> Result<Vec<F>, CodecError>;
|
||||
fn encode(&self, frame: &F) -> Result<Vec<u8>, CodecError>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
pub mod tactile_a;
|
||||
pub mod tactile_a;
|
||||
|
||||
@@ -30,11 +30,7 @@ impl TactileACodec {
|
||||
.chunks_exact(2)
|
||||
.map(|chunk| {
|
||||
let raw = u16::from_le_bytes([chunk[0], chunk[1]]) as i32;
|
||||
if raw < 15 {
|
||||
0
|
||||
} else {
|
||||
raw
|
||||
}
|
||||
if raw < 15 { 0 } else { raw }
|
||||
})
|
||||
.collect::<Vec<i32>>();
|
||||
|
||||
@@ -185,4 +181,4 @@ impl Codec<TactileAFrame> for TactileACodec {
|
||||
_ => Err(CodecError::InvalidFrameType),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,4 +48,4 @@ impl fmt::Display for CodecError {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for CodecError {}
|
||||
impl std::error::Error for CodecError {}
|
||||
|
||||
@@ -33,4 +33,4 @@ pub enum TactileAFrameStatusCode {
|
||||
pub enum TactileAFrame {
|
||||
Req(TactileAReqFrame),
|
||||
Rep(TactileARepFrame),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@ pub mod codecs;
|
||||
pub mod error;
|
||||
pub mod frame;
|
||||
pub mod serial;
|
||||
pub mod utils;
|
||||
pub mod utils;
|
||||
|
||||
@@ -93,4 +93,4 @@ impl ReadWrite for SerialPortReadWrite {
|
||||
fn write_all(&mut self, buf: &[u8]) -> std::io::Result<()> {
|
||||
self.inner.write_all(buf)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ pub fn calc_crc8_itu(c: &[u8]) -> u8 {
|
||||
|
||||
pub fn elapsed_millis(start_at: Instant) -> u64 {
|
||||
start_at.elapsed().as_millis() as u64
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user