Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ainigma
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
Ainigma
Commits
7b79c157
Commit
7b79c157
authored
7 years ago
by
Werner Sembach
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
056604a9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Util.cpp
+1
-20
1 addition, 20 deletions
src/Util.cpp
with
1 addition
and
20 deletions
src/Util.cpp
+
1
−
20
View file @
7b79c157
...
@@ -148,31 +148,12 @@ extern "C" bool simulate_spring(struct spring springs[], int len) {
...
@@ -148,31 +148,12 @@ extern "C" bool simulate_spring(struct spring springs[], int len) {
dc_set
(
0
,
0
);
dc_set
(
0
,
0
);
}
}
}
}
return
springs
[
i
].
solved
;
return
springs
[
i
].
solved
;
}
}
}
}
// in case no threshold is "reached" (e.g. the struct params are faulty)
// in case no threshold is "reached" (e.g. the struct params are faulty)
// the box shouldn't be unopenable then
// the box shouldn't be unopenable then
return
true
;
return
true
;
/*old stuff without params:
if (adc_value < 256) {
//potty protection deadzone
dc_set(0, 0);
}
else if(adc_value > (4096 - 256)) {
//spring is "broken"
dc_set(0, 0);
return true;
}
else {
//main simulation
dc_set(DC_RIGHT, adc_value / 4096.0 * 255);
}
return false;
*/
}
}
// turns the motor real fast if above certain position
// turns the motor real fast if above certain position
...
...
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