detector builds but does not work

This commit is contained in:
Henry Schimke
2023-03-20 12:12:25 -05:00
parent 3d75de7183
commit 0df86d4fd4
8 changed files with 233 additions and 122 deletions

View File

@@ -68,8 +68,21 @@ const FORMAT_INFO_DECODE_LOOKUP: [[u32; 2]; 32] = [
*/
#[derive(Hash, Eq, PartialEq, Debug)]
pub struct FormatInformation {
error_correction_level: ErrorCorrectionLevel,
data_mask: u8,
pub hammingDistance: u32,
pub error_correction_level: ErrorCorrectionLevel,
pub data_mask: u8,
pub microVersion: u32,
}
impl Default for FormatInformation {
fn default() -> Self {
Self {
hammingDistance: 255,
error_correction_level: ErrorCorrectionLevel::Invalid,
data_mask: Default::default(),
microVersion: 0,
}
}
}
impl FormatInformation {
@@ -79,6 +92,8 @@ impl FormatInformation {
// Bottom 3 bits
let dataMask = format_info & 0x07;
Ok(Self {
hammingDistance: 255,
microVersion: 0,
error_correction_level: errorCorrectionLevel,
data_mask: dataMask,
})