mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
detector builds but does not work
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user