mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add notes about coding capacity:
40 bytes gives 320 bits which fits nicely into a version 3 code, which allows 4 pixels per module rendering. if we have to move to 3 pixels per module, the next code up that optimally uses the full screen is version 6. This would give 102 bytes of transfer in a single scan. The equation for capacity is: `binary_bytes = floor((alphanumeric_capacity / 3) × 2)` where `alphameric_capacity` is the capacity of the QR code version per spec lookup table.
This commit is contained in:
parent
c3a0a50c9e
commit
9ade5a4a0d
1 changed files with 11 additions and 0 deletions
|
|
@ -129,6 +129,17 @@ impl<'a> ShellCmdApi<'a> for Test {
|
||||||
todo!("Fix this to use DCDC2 for keepon (as per baosec v2)");
|
todo!("Fix this to use DCDC2 for keepon (as per baosec v2)");
|
||||||
}
|
}
|
||||||
"qrshow" => {
|
"qrshow" => {
|
||||||
|
// note that 40 bytes gives 320 bits which fits nicely into a version 3 code,
|
||||||
|
// which allows 4 pixels per module rendering.
|
||||||
|
// if we have to move to 3 pixels per module, the next code up that optimally
|
||||||
|
// uses the full screen is version 6. This would give 102 bytes of transfer
|
||||||
|
// in a single scan.
|
||||||
|
//
|
||||||
|
// The equation for capacity is:
|
||||||
|
// `binary_bytes = floor((alphanumeric_capacity / 3) × 2)`
|
||||||
|
//
|
||||||
|
// where `alphameric_capacity` is the capacity of the QR code version
|
||||||
|
// per spec lookup table.
|
||||||
let modals = modals::Modals::new(&_env.xns).unwrap();
|
let modals = modals::Modals::new(&_env.xns).unwrap();
|
||||||
let mut test_data = [0u8; 40];
|
let mut test_data = [0u8; 40];
|
||||||
for (i, d) in test_data.iter_mut().enumerate() {
|
for (i, d) in test_data.iter_mut().enumerate() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue