Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multipass
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
multipass
Commits
35db4a64
Commit
35db4a64
authored
5 years ago
by
Daniel Friesel
Browse files
Options
Downloads
Patches
Plain Diff
ptalog barcode generation: decrease module size, increase quiet zone
parent
87e60ac8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/object/ptalog.h
+6
-6
6 additions, 6 deletions
include/object/ptalog.h
with
6 additions
and
6 deletions
include/object/ptalog.h
+
6
−
6
View file @
35db4a64
...
...
@@ -97,18 +97,18 @@ class PTALog {
#ifdef PTALOG_GPIO_BAR
void
startTransition
(
char
const
*
code
,
uint8_t
code_length
)
{
// TODO increase sleep duration: quiet zone must be at least 10x long
// (100ms for 10ms per bar, oder 50ms for 5ms per bar)
arch
.
sleep_ms
(
20
);
// Quiet zone (must last at least 10x longer than a module)
arch
.
sleep_ms
(
60
);
for
(
uint8_t
byte
=
0
;
byte
<
code_length
;
byte
++
)
{
for
(
uint16_t
mask
=
0x01
;
mask
<=
0x80
;
mask
<<=
1
)
{
// a single module, which is part of a bar
gpio
.
write
(
sync_pin
,
code
[
byte
]
&
mask
?
1
:
0
);
arch
.
sleep_ms
(
10
);
arch
.
sleep_ms
(
5
);
}
}
gpio
.
write
(
sync_pin
,
0
);
//
TODO increase sleep duration (see above)
arch
.
sleep_ms
(
2
0
);
//
Quiet zone
arch
.
sleep_ms
(
6
0
);
}
#else
inline
void
startTransition
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment